LP Withdrawal/Deposit

NOTE: This endpoint is only callable by API keys in the following tiers:

  • Business
  • Developer
  • Enterprise
  • PremiumSharedRpc
  • StarterSharedRpc
  • UltimateSharedRpc

The LP Withdrawal/Deposit endpoint provides the pair of token data that were deposited or withdrawn from a liquidity pool.
Alongside the token data, the endpoint also provides the user account, amount of tokens deposited or withdrawn, and the program id that was used to execute the transaction.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Examples

List withdrawls from LPs involving wSOL on Whirlpool

const axios = require("axios");

const url = "https://rest-api.hellomoon.io/v0/defi/liquidity-pools/withdrawals-deposits";

async function getWithdrawals() {
    const { data } = await axios.post(
        url,
        {
			"programId": "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",
			"actionType": "removeLiquidity",
			"tokenMintA": "So11111111111111111111111111111111111111112"
		},
        {
            headers: {
                Accept: "application/json",
                "Content-Type": "application/json",
                Authorization: "Bearer <your_token>",
            },
        }
    );

    console.log(data);
}
Body Params

body

string

The program id references the lending program that the user account is removing or adding tokens from
optional field

string

The user account is the account that is removing or adding tokens.
optional field

string

First signature in a transaction, which can be used to track and verify the transaction status across the complete ledger.
It is a base-58 encoded string that is uniquely generated for each transaction.
optional field

string

Name of this instruction
optional field

Choose an array of liquidity action types | Choose a single liquidity action type
string

Token mint A is the token address of the first token provided to the liquidity pool.
The USD value of the deposit always needs to be split between the two tokens to ensure equal value on each side.
optional field

string

Token mint B is the token address of the second token provided to the liquidity pool.
The USD value of the deposit always needs to be split between the two tokens to ensure equal value on each side.
optional field

number
1 to 1000

The number of results to return per page
optional field

number
≥ 1

The page number to return
optional field

string

The pagination token to use to keep your position in the results
optional field

Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json