Solana: Get Balance from Liquidity Account

  • Post author:
  • Post comments:0 Comments

This article provides step-by-step instructions on how to withdraw Wsol balance (also known as WUSD) from your Raydium liquidity account:

Returning Wsol Balance in Raydium: A Step-by-Step Guide

As you are new to programming, you may not be familiar with the different platforms and tools available for cryptocurrency trading. In this article, we will show you how to withdraw Wsol balance (WUSD) from your Raydium liquidity account.

Prerequisites:

  • You have already funded your Raydium wallet with fiat currency.
  • You have connected your Raydium wallet to a reputable exchange or platform such as Binance or Uniswap.
  • You have obtained an API access token for your Raydium account.

Step 1: Enable API access and obtain an access token

To interact with the Raydium API, you need to enable API access and obtain an access token. Follow these steps:

  • Log in to your Raydium dashboard.
  • Click “Settings” (gear icon) > “API Keys”.
  • Click “Create new API key”.
  • Give your API key a name and click “Create”.
  • Select the API endpoint you want to use (e.g. /api/v1/account) and click Create access token.

Step 2: Configure the API request URL

Once you have obtained an access token, you can configure an API request to retrieve your Wsol balance. The API endpoint for this is:

Replace /api/v1/account/liquidity/wsol with the actual URL of your Raydium account.

Step 3: Send the HTTP request

Use a tool like cURL or Postman to send an HTTP request to the API endpoint. Here is an example of using c CURL:

curl -X GET \

\

-H 'Authorization: bearer ' \

-H 'Content-type: application/json'

Replace with your actual access token.

Step 4: Parse the response

The API response will contain a JSON object containing your Wsol balance. You can parse this response using cURL or another tool of your choice. Here is an example:

curl -X GET \

\

-H 'Authorization: bearer ' \

-H 'Content-Type: application/json'

The response will be in JSON format, like this:

{

"liquidity": {

"give": {

"total": "0.00000000000000001" // Wsol balance in base currency units (e.g. USD)

}

}

}

Bottom line:

With these steps, you have successfully retrieved your Wsol balance from your Raydium liquidity account. Remember to keep your access token safe and do not share it with anyone.

I hope this article helps you recover your Wsol balance efficiently! If you have any questions or need further assistance, please feel free to ask.

ETHEREUM MUCH DOES POOLED

Leave a Reply