[User] When was the getTokenLargestAccounts method on QuickNode last updated?

[Assistant] The getTokenLargestAccounts method on QuickNode was last updated on January 2, 2025.

ZeEXfrjE"},{"encoding": "jsonParsed"}]}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free
Previous
getTokenAccountsByDelegate
Next
getTokenLargestAccounts
Chat with our community
Check out our product changelog
Check on the status of our services
Read our blog for the latest announcements
Want the latest news in Web3?
We send out the #Web3Vibes newsletter with the coolest stuff in Blockchain every month. Sign up below!

hi@example.com
getTokenLargestAccounts RPC Method
Returns the 20 largest accounts of a particular SPL Token type. The API credit value for this method is 30.
Updated on
Jan 2, 2025
Please note that, in addition to the plan-level rate limits, the getTokenLargestAccounts method has a specific rate limit of 50 requests per second. This limit may change without notice to ensure system stability. For high-demand use cases, please reach out to discuss potential solutions.
Parameters
pubkey
string
The Pubkey of token Mint to query encoded as base-58 string
object
array
The configuration object with the following fields:
commitment
string
The level of commitment required for the query. The options include:
finalized
string
The node will query the most recent block confirmed by the supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block as finalized
confirmed
string
The node will query the most recent block that has been voted on by the supermajority of the


[User] What types of responses can be inspected using the Blinks Inspector in Solana?

[Assistant]
Using the Blinks Inspector tool in Solana, you can inspect, debug, and test various types of responses directly in your browser. Specifically, you can view the following:

1. **GET Response Payloads**: This includes the data returned from a GET request made to your linked Actions.
2. **POST Response Payloads**: This includes the data returned from a POST request made to your linked Actions.
3. **Response Headers**: You can inspect the headers that are part of the HTTP responses for both GET and POST requests.
4. **Test Inputs**: You can test all inputs to each of your linked Actions to see how they behave with different data.

This functionality allows developers to ensure that their Actions are working correctly and to troubleshoot any issues that may arise.

 may be visited outside of the non-supporting client.

Sharing a link to a website that is linked to an Actions API via an actions.json file on the website's domain root.

For example, https://alice.com/actions.json maps https://alice.com/donate, a website URL at which users can donate to Alice, to API URL https://actions.alice.com/donate, at which Actions for donating to Alice are hosted.

Embedding an Action URL in an “interstitial” site URL that understands how to parse Actions.

https://example.domain/?action=<action_url>

Clients that support blinks should be able to take any of the above formats and correctly render an interface to facilitate executing the action directly in the client.

For clients that do not support blinks, there should be an underlying website (making the browser become the universal fallback).

If a user taps anywhere on a client that is not an action button or text input field, they should be taken to the underlying site.

Blink Testing and Verification #
While Solana Actions and blinks are a permissionless protocol/specification, client applications and wallets are still required to ultimately facilitate users to sign the transaction.

Info
Use the Blinks Inspector tool to inspect, debug, and test your blinks and actions directly in your browser. You can view the GET and POST response payloads, response headers, and test all inputs to each of your linked Actions.

Each client application or wallets may have different requirements on which Action


[User] What filtering options are available for the Trade in the DEXTradeByTokens query using Bitquery?

[Assistant]
In the `DEXTradeByTokens` query using Bitquery, you can filter trades based on the following options:

1. **Currency**: You can filter trades by the currency involved in the trade. This is done using the `MintAddress` of the currency. For example, you can specify a particular currency's `MintAddress` to retrieve trades that involve that currency.

2. **Side**: You can also filter based on the side of the trade, which indicates whether the trade was a buy or sell. This is similarly done by specifying the `MintAddress` of the currency involved in the trade's side.

Here is an example of how you can apply these filters in your query:

```graphql
{
  Solana {
    DEXTradeByTokens(
      where: {
        Trade: {
          Currency: {
            MintAddress: { is: "6D7NaB2xsLd7cauWu1wKk6KBsJohJmP2qZH9GEfVi5Ui" }
          },
          Side: {
            Currency: {
              MintAddress: { is: "So11111111111111111111111111111111111111112" }
            }
          }
        }
      }
    ) {
      ...
    }
  }
}
```

In this example, the query filters trades where the currency's `MintAddress` matches a specific value and the side's currency also matches another specified `MintAddress`. This allows for targeted retrieval of trade data based on specific currencies and their roles in the trade.

okens, you can use pre-made aggregates to optimize performance. The aggregates flag provides three options to control the use of these aggregates:

aggregates: only: This option uses only the pre-made aggregates, which can significantly increase the speed of the response.
aggregates: yes: This option uses both pre-made aggregates and individual transaction data.
aggregates: no: This option does not use any pre-made aggregates.
When using the aggregates: only option, you need to include the mintaddress field in the response to ensure proper aggregation and filtering.

{
  Solana(aggregates: only) {
    DEXTradeByTokens(
      orderBy: {descendingByField: "Block_Timefield"}
      where: {Trade: {Currency: {MintAddress: {is: "6D7NaB2xsLd7cauWu1wKk6KBsJohJmP2qZH9GEfVi5Ui"}}, Side: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}}}}
      limit: {count: 10}
    ) {
      Block {
        Timefield: Time(interval: {in: minutes, count: 1})
      }
      volume: sum(of: Trade_Amount)
      Trade {
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Slot)
        close: Price(maximum: Block_Slot)
        Currency {
          MintAddress
        }
      }
      count
    }
  }
}

Solana Trader API
In this section we will see how to get Solana trader information using our API. More queries on DEX trades including latest trades, OHLC, and other data points can be found in the Solana DEX Trade


[User] What HTTP method is used to fetch transactions from Helius for a specific address?

[Assistant] The HTTP method used to fetch transactions from Helius for a specific address is **GET**. You would use the endpoint `/v0/addresses/{address}/transactions` to retrieve the transactions for the specified address.

f Transaction Types and Sources, please see Transaction Types. With no parameters set, this will return the latest transactions for an address.

We only parse NFT, Jupiter, and SPL related transactions. Do not rely on these parsers for DeFi or non-NFT, Jupiter, and SPL transactions.

Occasionally, this endpoint may return an incomplete set of transactions due to internal timeouts during data retrieval.

To mitigate this issue, we recommend to:

First, call getSignaturesForAddress to retrieve a batch of transaction signatures.

Next, use the /v0/transactions endpoint with the received signatures.

If any transactions are missing from the response. You can retry fetching these transactions.

v0/addresses/:address/transactions
GEThttps://api.helius.xyz/v0/addresses/{address}/transactions
Path parameters

addressstring
The address to query for.

Query parameters

Response

200
Returns an array of enriched transactions.

Body

application/json
descriptionstring
Example: "Human readable interpretation of the transaction"
typeTransactionType (enum)
UNKNOWN
NFT_BID
NFT_GLOBAL_BID
NFT_GLOBAL_BID_CANCELLED
NFT_BID_CANCELLED
NFT_LISTING
NFT_CANCEL_LISTING
NFT_SALE
NFT_MINT
NFT_AUCTION_CREATED
NFT_AUCTION_UPDATED
NFT_AUCTION_CANCELLED
NFT_PARTICIPATION_REWARD
NFT_MINT_REJECTED
CREATE_STORE
WHITELIST_CREATOR
ADD_TO_WHITELIST
REMOVE_FROM_WHITELIST
AUCTION_MANAGER_CLAIM_BID
EMPTY_PAYMENT_ACCOUNT
UPDATE_PRIMARY_SALE_METADATA
ADD_TOKEN_TO_VAULT
ACTIVATE_VAULT
INIT_VAULT
INIT_BANK
INIT_STAKE
M


[User] What is the purpose of the 'SystemProgram' in the context of Solana transactions?

[Assistant]
The `SystemProgram` in Solana is a built-in program that provides basic functionalities for managing accounts and performing operations such as transferring SOL (the native currency of Solana). It serves as the foundation for many transactions on the Solana blockchain.

In the context of transactions, the `SystemProgram` is primarily used for:

1. **Account Creation**: It allows users to create new accounts on the Solana blockchain.
2. **Transfer of SOL**: It facilitates the transfer of SOL between accounts, which is essential for various operations and interactions within the Solana ecosystem.

Here’s an example of how the `SystemProgram` is used to create a transaction that transfers SOL from one account to another:

```javascript
import {
  Transaction,
  SystemProgram,
  Keypair,
  Connection,
  clusterApiUrl,
  LAMPORTS_PER_SOL,
} from "@solana/web3.js";

(async () => {
  // Create a connection to the Solana cluster
  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");

  // Generate keypairs for the fee payer and the sender (Alice)
  const feePayer = Keypair.generate();
  const alice = Keypair.generate();
  const bob = Keypair.generate();

  // Airdrop SOL to fee payer and Alice
  await connection.confirmTransaction(
    await connection.requestAirdrop(feePayer.publicKey, LAMPORTS_PER_SOL),
  );
  await connection.confirmTransaction(
    await connection.requestAirdrop(alice.publicKey, LAMPORTS_PER_SOL),
  );

  // Create a transaction to transfer SOL from Alice to Bob
  let tx = new Transaction().add(
    SystemProgram.transfer({
      fromPubkey: alice.publicKey,
      toPubkey: bob.publicKey,
      lamports: LAMPORTS_PER_SOL / 100, // Transfer a small amount of SOL
    })
  );

  // Sign and send the transaction (not shown here)
})();
```

In this example, the `SystemProgram.transfer` method is used to create a transfer instruction that specifies the sender (`fromPubkey`), the recipient (`toPubkey`), and the amount of SOL to transfer (`lamports`). This instruction is then added to the transaction, which can be signed and sent to the network.

  return {
    transaction: new VersionedTransaction(
      new TransactionMessage({
        instructions,
        recentBlockhash: recentBlockhash.blockhash,
        payerKey: signer.publicKey,
      }).compileToV0Message(lookupTables),
    ),
    recentBlockhash,
  };
}

Offline Transactions
Sign Transaction #
To create an offline transaction, you have to sign the transaction and then anyone can broadcast it on the network.

sign-transaction.ts
import {
  clusterApiUrl,
  Connection,
  Keypair,
  Transaction,
  SystemProgram,
  LAMPORTS_PER_SOL,
  Message,
} from "@solana/web3.js";
import * as nacl from "tweetnacl";
import * as bs58 from "bs58";

// to complete a offline transaction, I will separate them into four steps
// 1. Create Transaction
// 2. Sign Transaction
// 3. Recover Transaction
// 4. Send Transaction

(async () => {
  // create connection
  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");

  // create a example tx, alice transfer to bob and feePayer is `feePayer`
  // alice and feePayer are signer in this tx
  const feePayer = Keypair.generate();
  await connection.confirmTransaction(
    await connection.requestAirdrop(feePayer.publicKey, LAMPORTS_PER_SOL),
  );
  const alice = Keypair.generate();
  await connection.confirmTransaction(
    await connection.requestAirdrop(alice.publicKey, LAMPORTS_PER_SOL),
  );
  const bob = Keypair.generate();

  // 1. Create Transaction
  let tx = new Transaction().add(
    SystemProgram.transfe


[User] How does Helius facilitate the liquidation of bonds during an auction?

[Assistant]
Helius facilitates the liquidation of bonds during an auction through the `LIQUIDATE_BOND_ON_AUCTION_CNFT` function. This function is specifically designed to handle the process of liquidating bonds that are up for auction.

When a bond is liquidated, it typically involves selling the bond to recover funds, which can be necessary if the borrower defaults or fails to meet the repayment terms. The auction process allows multiple participants to bid on the bond, ensuring that it can be sold to the highest bidder.

While the documentation does not provide specific code examples for this function, the general usage would involve calling the `LIQUIDATE_BOND_ON_AUCTION_CNFT` function with the necessary parameters that identify the bond and the auction details.

In summary, the liquidation of bonds during an auction in Helius is managed through the `LIQUIDATE_BOND_ON_AUCTION_CNFT` function, which streamlines the process of recovering funds from bonds that need to be sold.

ER
REPAY_PERPETUAL_LOAN
REFINANCE_PERPETUAL_LOAN
CREATE_BOND_AND_SELL_TO_OFFERS_CNFT
REPAY_FBOND_TO_TRADE_TRANSACTIONS_CNFT
REFINANCE_TO_BOND_OFFERS_V2_CNFT
CLAIM_NFT_BY_LENDER_CNFT
LIQUIDATE_BOND_ON_AUCTION_CNFT
MAKE_PERPETUAL_MARKET
UPDATE_PERPETUAL_MARKET
UPDATE_PERPETUAL_OFFER
UPDATE_INTEREST_PERPETUAL_MARKET
BORROW_PERPETUAL
CLAIM_PERPETUAL_LOAN
TERMINATE_PERPETUAL_LOAN
INSTANT_REFINANCE_PERPETUAL_LOAN
BORROW_STAKED_BANX_PERPETUAL
REPAY_STAKED_BANX_PERPETUAL_LOAN
BORROW_CNFT_PERPETUAL
REPAY_CNFT_PERPETUAL_LOAN
CLAIM_CNFT_PERPETUAL_LOAN
REPAY_PARTIAL_PERPETUAL_LOAN
CREATE_COLLECTION
UPDATE_COLLECTION
UPDATE_COLLECTION_OR_CREATOR
UPDATE_FLOOR
DELETE_COLLECTION
CREATE_STATS
UPDATE_STATS
CLEAN
EXPIRE
FIX_POOL
ADMIN_SYNC_LIQUIDITY
CLOSE_POOL
UPDATE_POOL
UPDATE_POOL_COLLECTIONS
UPDATE_POOL_STATUS
UPDATE_POOL_MORTGAGE
UPDATE_USABLE_AMOUNT
UPDATE_POOL_WHITELIST
ADD_LIQUIDITY
SYNC_LIQUIDITY
WITHDRAW_LIQUIDITY
TAKE_COMPRESSED_LOAN
REPAY
REPAY_COMPRESSED
LIQUIDATE
TAKE_MORTGAGE
FREEZE
UNFREEZE
SELL_LOAN
BUY_LOAN
EXTEND_LOAN
SELL_NFT
PROPOSE_LOAN
CANCEL_PROPOSAL
POOL_CANCEL_PROPOSAL
ACCEPT_PROPOSAL
EXECUTE_LOAN
EXECUTE_MORTGAGE
LIST_NFT
DELIST_NFT
CLAIM_SALE
BOT_LIQUIDATE
BOT_UNFREEZE
BOT_LIQUIDATE_SELL
BOT_DELIST
BOT_CLAIM_SALE
sourceTransactionSource (enum)
FORM_FUNCTION
EXCHANGE_ART
CANDY_MACHINE_V3
CANDY_MACHINE_V2
CANDY_MACHINE_V1
UNKNOWN
SOLANART
SOLSEA
MAGIC_EDEN
HOLAPLEX
METAPLEX
OPENSEA
SOLANA_PROGRAM_LIBRARY
ANCHOR
PHANTOM
SYSTEM_PROGRAM
STAKE_PROGRAM
COINBASE
CORAL_CUBE
H


[User] Where can developers apply to be verified by Dialect in relation to Solana?

[Assistant] Developers can apply to be verified by Dialect at the following URL: [dial.to/register](https://dial.to/register).

ll be rendered as a typical URL.

Developers can apply to be verified by Dialect here: dial.to/register

Specification #
The Solana Actions specification consists of key sections that are part of a request/response interaction flow:

Solana Action URL scheme providing an Action URL
OPTIONS response to an Action URL to pass CORS requirements
GET request to an Action URL
GET response from the server
POST request to an Action URL
POST response from the server
Each of these requests are made by the Action client (e.g. wallet app, browser extension, dApp, website, etc) to gather specific metadata for rich user interfaces and to facilitate user input to the Actions API.

Each of the responses are crafted by an application (e.g. website, server backend, etc) and returned to the Action client. Ultimately, providing a signable transaction or message for a wallet to prompt the user to approve, sign, and send to the blockchain.

Info
The types and interfaces declared within this readme files are often the simplified version of the types to aid in readability.

For better type safety and improved developer experience, the @solana/actions-spec package contains more complex type definitions. You can find the source code for them here.

URL Scheme #
A Solana Action URL describes an interactive request for a signable Solana transaction or message using the solana-action protocol.

The request is interactive because the parameters in the URL are used by a client to make a series of standardiz


[User] How can I use the /search endpoint in GeckoTerminal to find specific coins?

[Assistant]
To use the `/search` endpoint in GeckoTerminal to find specific coins, you can make a GET request to the endpoint with your search query. This endpoint allows you to search for coins, categories, and markets listed on CoinGecko.

### Example Usage

Here’s an example of how you might structure your request:

```http
GET /search?query=bitcoin
```

In this example, replace `bitcoin` with the name or symbol of the coin you are looking for. The response will include information about the coins that match your search query, along with any relevant categories and markets.

### Important Notes
- Ensure that your query is URL-encoded if it contains spaces or special characters.
- The response will provide a list of results that match your search criteria, allowing you to find specific coins easily.

This is how you can effectively use the `/search` endpoint to locate specific coins in GeckoTerminal.

o.
👑 /token_lists/{asset_platform_id}/all.json	Get full list of tokens of a blockchain network (asset platform) that is supported by Ethereum token list standard
/search	Search for coins, categories and markets listed on CoinGecko
/search/trending	Query trending search coins, nfts and categories on CoinGecko in the last 24 hours
/global	Query cryptocurrency global data including active cryptocurrencies, markets, total crypto market cap and etc
/global/decentralized_finance_defi	Query cryptocurrency global decentralized finance (defi) data including defi market cap, trading volume
💼 /global/market_cap_chart	Query historical global market cap and volume data by number of days away from now
/companies/public_treasury/{coin_id}	Query public companies’ bitcoin or ethereum holdings

💼 Onchain DEX Endpoints (GeckoTerminal)
Endpoint	Description
/onchain/simple/networks/{..}/token_price/{addresses}	Get token price based on the provided token contract address on a network
/onchain/networks	Query all the supported networks on GeckoTerminal
/onchain/networks/{network}/dexes	Query all the supported decentralized exchanges (dexes) based on the provided network on GeckoTerminal
/onchain/networks/trending_pools	Query all the trending pools across all networks on GeckoTerminal
/onchain/networks/{network}/trending_pools	Query the trending pools based on the provided network
/onchain/networks/{network}/pools/{address}	Query the specific pool based on the provided network and pool address
/oncha


[User] How do you specify the number of samples to return in the body parameters for an Alchemy API call?

[Assistant]
To specify the number of samples to return in the body parameters for an Alchemy API call, you use the `params` field, which is an array of `int64s`. This array should contain the number of samples you want to return, with a maximum limit of 720.

Here’s an example of how to structure your API call to request a specific number of samples:

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "getRecentPerformanceSamples",
  "params": [10]  // This requests 10 samples
}
```

In this example, the `params` array contains the value `10`, indicating that you want to return 10 recent performance samples. If you want to request the maximum of 720 samples, you would set it like this:

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "getRecentPerformanceSamples",
  "params": [720]  // This requests the maximum of 720 samples
}
```

Make sure to adjust the number in the `params` array according to your needs, keeping in mind the maximum limit.

ur in a given time window.

Path Params
apiKey
string
required
Defaults to docs-demo
For higher throughput, create your own API key

docs-demo
Body Params
id
integer
Defaults to 1
1
jsonrpc
string
Defaults to 2.0
2.0
method
string
Defaults to getRecentPerformanceSamples
getRecentPerformanceSamples
params
array of int64s
Array of number of samples to return (maximum 720).

ADD int64

curl --request POST \
     --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "getRecentPerformanceSamples"
}
'

Response

200
Response body
object
id
integer
jsonrpc
string
result
array of objects
Array of RpcPerfSample objects.

object
slot
int64
u64 - Slot in which sample was taken at.

numTransactions
int64
u64 - Number of transactions in sample.

numSlots
int64
u64 - Number of slots in sample.

samplePeriodSecs
int16
u16 - Number of seconds in a sample window.

getSignaturesForAddress
post
https://{network}.g.alchemy.com/v2/{apiKey}
Returns signatures for confirmed transactions that include the given address in their accountKeys list. Returns signatures backwards in time from the provided signature or most recent confirmed block.

Parameters
<base-58 encoded string> - account address
<object> - (optional) Config object:
limit: (optional)<number> - maximum transaction signatures to return (between 1 and 1,000, default: 1,000).
before:


[User] What is the significance of the Position account address in Jupiter for traders' open positions?

[Assistant]
The Position account address in Jupiter is significant for traders' open positions because it serves as a unique identifier for each trader's position. Here are the key points regarding its significance:

1. **Consistency**: Traders will always have the same Position account address for their open positions. This consistency allows traders to easily manage and reference their positions without needing to track multiple addresses.

2. **Limited Positions**: Each trader is limited to having nine open positions at one time, which are predefined (e.g., Long SOL, Long wETH, Long wBTC, and various Short positions with different collateral options). The Position account address helps in organizing and managing these limited positions effectively.

3. **Unique PositionRequest Accounts**: Each Position can have multiple PositionRequest accounts, which are unique to each trade request. The Position account address is used in deriving these PositionRequest account addresses, ensuring that each trade request is associated with the correct Position.

In summary, the Position account address is crucial for maintaining order and clarity in managing a trader's open positions within the Jupiter platform.

 seeds. This means traders will always have the same Position account address for their open positions.

This also means that traders only have nine positions available at one time:

Long SOL
Long wETH
Long wBTC
Short SOL (USDC as collateral)
Short SOL (USDT as collateral)
Short wETH (USDC as collateral)
Short wETH (USDT as collateral)
Short wBTC (USDC as collateral)
Short wBTC (USDT as collateral)
PositionRequest account
A Position can have many PositionRequest accounts as each trade request is unique.

The PositionRequest account's address is a program-derived address (PDA) derived from the underlying Position account's address, several constant seeds, and a random integer seed which makes each PositionRequest account unique.

info
The following is an example of a PositionRequest account: https://solscan.io/account/DNnX2B1oiYqKLrbLLod1guuaZA28DQwJ8HuHsgDafoQK

The PositionRequest account contains the following data:

owner: The public key / address for the trader's wallet.

pool: The public key / address for the Jupiter Perpetuals liquidity pool account.

custody: The public key / address for the position request position's custody account. A custody account in the Jupiter Perpetuals exchange contains information for the token that's being traded against for the underlying position.

For example, a long SOL position will have the custody account 7xS2gz2bTp3fwCC7knJvUWTEU9Tycczu6VhJYKgi1wdz which contains important data like the custody's price impact fee scalar, tokens lock


[User] What is the consequence of allocating rewards to farms on Raydium once the farm has been created?

[Assistant] Once rewards are allocated to farms on Raydium, they are final and cannot be withdrawn. This means that after the creation of a farm, the allocated rewards are locked in and cannot be adjusted or taken back. Additionally, if there is a need to extend or adjust the rewards rate, this can only be done 72 hours prior to the end of the current farming period. Therefore, it is crucial for users to carefully consider their reward allocations when creating a farm.

ulation: Raydium’s UI features three different estimated APR calculations to give concentrated liquidity providers and pool creators a reference for potential yield.

Rewards allocated to farms are final and cannot be withdrawn once the farm is created. Extending or adjusting the rewards rate can only be done 72 hours prior to the end of the current farming period, make sure to read part 2 of the guide below for specifics!

Creating a CLMM pool
CLMM pools should be live on the UI approx 5 minutes after creation.

Users and project teams can create a concentrated liquidity pool on Raydium in 3 easy steps.

After connecting your wallet, navigate to “Liquidity” on the top of the page. Click on the “Create" button on the top right of the page.

Select “Concentrated Liquidity” to get started!

First, select tokens & fee tier

The Base Token is the first token that appears in a token pair quotation. Consequently, the second token in the pair is a Quote Token. Quote Tokens represent the number of tokens needed to purchase 1 Base Token.

Common quote tokens include SOL, USDC or other stablecoins.

The selected fee is the amount traders will pay to trade the pair. Liquidity providers earn 100% of token emissions and 84% of trading fees, with 12% and 4% of fees allocated to RAY buybacks and treasury, respectively.

Fee Tiers: Pool creators can choose from 4 fee tiers

0.01% - best for very stable assets

0.05% - best for pegged-assets and high volume pairs

0.25% - best for most


[User] What are the implications of using the minimum amount of compute units for transaction fees in Solana?

[Assistant]
Using the minimum amount of compute units for transaction fees in Solana has several implications:

1. **Cost Efficiency**: By requesting only the minimum amount of compute units required for execution, users can minimize their transaction fees. This is particularly beneficial for users who frequently interact with the blockchain, as it can lead to significant savings over time.

2. **Resource Optimization**: Solana's architecture allows for parallel execution of transactions through its Sealevel runtime. By using the minimum compute units, users contribute to more efficient resource allocation on the network. This helps maintain high throughput and performance, as it allows validators to process more transactions simultaneously.

3. **Transaction Success**: If a transaction requests fewer compute units than necessary for execution, it may fail due to insufficient resources. Therefore, it is crucial to accurately estimate the compute units required for a transaction to ensure it can be executed successfully.

4. **Network Dynamics**: The compute unit price is specified in increments of 0.000001 lamports per compute unit. If many users consistently request the minimum compute units, it could influence the overall demand and pricing dynamics of compute units on the network.

In summary, while using the minimum compute units can lead to lower fees and more efficient use of network resources, it is essential to ensure that the requested amount is sufficient for the transaction to succeed.

pute units by the compute-unit price (specified in increments of 0.000001 lamports per compute unit) rounded up to the nearest lamport.

Transactions should request the minimum amount of compute units required for execution to minimize fees.

public key (pubkey) #
The public key of a keypair.

rent #
Fee paid by Accounts and Programs to store data on the blockchain. When accounts do not have enough balance to pay rent, they may be Garbage Collected.

See also rent exempt below. Learn more about rent here: What is rent?.

rent exempt #
Accounts that maintain a minimum lamport balance that is proportional to the amount of data stored on the account. All newly created accounts are stored on-chain permanently until the account is closed. It is not possible to create an account that falls below the rent exemption threshold.

root #
A block or slot that has reached maximum lockout on a validator. The root is the highest block that is an ancestor of all active forks on a validator. All ancestor blocks of a root are also transitively a root. Blocks that are not an ancestor and not a descendant of the root are excluded from consideration for consensus and can be discarded.

runtime #
The component of a validator responsible for program execution.

Sealevel #
Solana's parallel run-time for onchain programs.

shred #
A fraction of a block; the smallest unit sent between validators.

signature #
A 64-byte ed25519 signature of R (32-bytes) and S (32-bytes). With the requirement that R is


[User] What does the `allowOwnerOffCurve` parameter do when obtaining an associated token address in Solana?

[Assistant]
The `allowOwnerOffCurve` parameter in the `getAssociatedTokenAddress` function allows for the possibility of the owner’s public key being off the standard Ed25519 curve.

When you call `getAssociatedTokenAddress`, you typically provide the mint public key and the owner's public key to calculate the associated token account (ATA) address. By default, this function assumes that the owner's public key is on the standard curve. However, if you are working with a wallet or keypair that is not on the standard curve, you can set `allowOwnerOffCurve` to `true`. This will enable the function to compute the associated token address even if the owner's public key does not conform to the typical curve constraints.

Here is an example of how to use the `allowOwnerOffCurve` parameter:

```javascript
let ata = await getAssociatedTokenAddress(
  mintPubkey, // mint
  alice.publicKey, // owner
  true // allowOwnerOffCurve
);
```

In this example, setting `allowOwnerOffCurve` to `true` allows the function to compute the associated token address for `alice.publicKey` even if it is off the curve.

t {
  createAssociatedTokenAccount,
  getAssociatedTokenAddress,
  createAssociatedTokenAccountInstruction,
} from "@solana/spl-token";
import bs58 from "bs58";

(async () => {
  // connection
  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");

  // 5YNmS1R9nNSCDzb5a7mMJ1dwK9uHeAAF4CmPEwKgVWr8
  const feePayer = Keypair.fromSecretKey(
    bs58.decode(
      "588FU4PktJWfGfxtzpAAXywSNt74AvtroVzGfKkVN1LwRuvHwKGr851uH8czM5qm4iqLbs1kKoMKtMJG4ATR7Ld2",
    ),
  );

  // G2FAbFQPFa5qKXCetoFZQEvF9BVvCKbvUZvodpVidnoY
  const alice = Keypair.fromSecretKey(
    bs58.decode(
      "4NMwxzmYj2uvHuq8xoqhY8RXg63KSVJM1DXkpbmkUY7YQWuoyQgFnnzn6yo3CMnqZasnNPNuAT2TLwQsCaKkUddp",
    ),
  );

  const mintPubkey = new PublicKey(
    "2SKpuBU9ksneBZD4nqbZkw75NE11HsSHsGRtW2BZh5aQ",
  );

  // 1) use build-in function
  {
    let ata = await createAssociatedTokenAccount(
      connection, // connection
      feePayer, // fee payer
      mintPubkey, // mint
      alice.publicKey, // owner,
    );
    console.log(`ATA: ${ata.toBase58()}`);
  }

  // or

  // 2) composed by yourself
  {
    // calculate ATA
    let ata = await getAssociatedTokenAddress(
      mintPubkey, // mint
      alice.publicKey, // owner
    );
    console.log(`ATA: ${ata.toBase58()}`);

    // if your wallet is off-curve, you should use
    // let ata = await getAssociatedTokenAddress(
    //   mintPubkey, // mint
    //   alice.publicKey // owner
    //   true, // allowOwnerOffCurve
    // );


[User] How can I deploy the Helius RPC proxy to Cloudflare, and what is its purpose?

[Assistant]
To deploy the Helius RPC proxy to Cloudflare, you can follow these steps:

1. **Visit the GitHub Repository**: Go to the Helius RPC proxy GitHub repository at [helius-labs/helius-rpc-proxy](https://github.com/helius-labs/helius-rpc-proxy).

2. **One-Click Deploy**: The repository provides a simple, open-source RPC proxy that you can deploy with just one click. Look for the deployment instructions in the repository's README file, which typically includes a button or link to deploy to Cloudflare.

3. **Set Up Your Cloudflare Account**: If you don't already have a Cloudflare account, you'll need to create one. Follow the prompts to set up your account and configure your domain if necessary.

4. **Configure the Proxy**: After deploying the proxy, you may need to configure it to point to your Helius API endpoints and set any necessary access controls.

### Purpose of the Helius RPC Proxy

The primary purpose of the Helius RPC proxy is to protect your API keys from leaking. When working with RPCs or APIs on the client side, there is a risk that your API keys could be exposed to malicious actors. If someone gains access to your keys, they could misuse them, leading to unwanted charges or rate limit issues.

By using the Helius RPC proxy, you can:

- **Lockdown Endpoints**: Configure access control rules to restrict which IPs and domains can make requests to your Helius API.
- **Enhance Security**: The proxy acts as an intermediary, helping to keep your API keys secure and reducing the risk of them being exposed in client-side code.

This setup helps ensure that your Helius API keys remain protected while allowing you to interact with the Helius services securely.

"application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getCompressedMintTokenHolders",
      "params": {
        "mint": "11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB"
      }
    }),
});
const data = await response.json();
Test it
Response

200
Copy
{
  "context": {
    "slot": 100
  },
  "value": {
    "cursor": "3J98t1WpEZ73CNm",
    "items": [
      {
        "balance": 100,
        "owner": "11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB"
      }
    ]
  }
}
Previous
getIndexerHealth
Next
RPC Proxy — Protect Your Keys
Last updated 2 months ago

Was this helpful?

Export as PDF
Guides
🔓
RPC Proxy — Protect Your Keys
How to stop your Helius API keys from leaking with 1 click.

A common problem when working with RPCs or APIs on the client side is your API keys leaking.

Malicious actors can run up your quota or rate limits if they get access to your keys.

Helius provides access controls for this.

For example, you can lockdown your endpoints to only serve requests for certain IPs and Domains:

Configure RPC Access Control Rules in the Endpoints section of your dashboard.
That said, using a proxy is the better solution.

We've setup a simple, open-source RPC proxy that you can deploy with 1-click to Cloudflare.

You can check it out below:

Logo
GitHub - helius-labs/helius-rpc-proxy: This repo hosts a one-click-deploy Cloudflare worker that proxies RPC requests to Helius.
GitHub
Previous
getCompressedMintToken


[User] What is the purpose of the 'mucho coverage' command in the Solana Toolkit?

[Assistant]
The `mucho coverage` command in the Solana Toolkit is used to run a code coverage test on all of your Rust tests. It generates a report as an HTML page that provides metrics on where additional tests may be needed to improve your current code coverage.

It's important to note that this tool currently only works on tests written in Rust and is not compatible with a JavaScript test suite.

olkit, and is still a WIP. Please post all feedback as a GitHub issue here.

Installation #
Install the Solana Toolkit by running the following command:

npx -y mucho@latest install

Build #
mucho build

Start Localnet #
mucho validator

Run Tests #
Anchor Programs:

anchor test

Native Programs:

cargo test

Deploy #
mucho deploy

For more information on local validator customization and commands, read the Solana Test Validator Guide.

Solana Code Coverage Tool
Info
This is a beta version of the Solana Toolkit, and is still a WIP. Please post all feedback as a GitHub issue here.

mucho coverage

Overview #
This command will run a code coverage test on all of your Rust tests and then generates a report as an HTML page providing metrics on where additional tests may be needed to improve your current code coverage.

Info
Currently, this tool only works on tests written in Rust and is not compatible with a JavaScript test suite.

Additional Resources #
Source Code

Solana Fuzz Tester
Info
This is a beta version of the Solana Toolkit, and is still a WIP. Please post all feedback as a GitHub issue here.

Info
The Trident fuzz tester is still a WIP and currently only Anchor compatible may require some manual work to complete tests.

Initialize Fuzz Tests #
Navigate to an Anchor based workspace and run:

trident init

This command does the following:

Builds the Anchor-based project.
Reads the generated IDL.
Based on the IDL creates the fuzzing template.
Define Fuzz Accounts #
Defin


[User] How can project teams in Meteora utilize bonding curves to enhance their token sale mechanisms?

[Assistant]
Project teams in Meteora can utilize bonding curves to enhance their token sale mechanisms in several innovative ways. Bonding curves are mathematical functions that define the relationship between the supply of a token and its price, allowing for dynamic pricing based on demand. Here are some key aspects of how bonding curves can be implemented:

1. **Token Launch Mechanism**: Project teams can use bonding curves to create a structured token sale that rewards early buyers. As demand for the token increases, the price will rise according to the bonding curve, incentivizing early investment.

2. **Flexible Token Design**: Teams can customize their bonding curves based on their specific goals. For example, they might design a curve that starts with a low price to attract initial buyers and gradually increases as more tokens are sold. This can help create urgency and drive early participation.

3. **Minimum Token Buyback Price**: By implementing a bonding curve, project teams can establish a minimum buyback price for their tokens. This creates a floor price for the token, providing investors with a sense of security and potentially reducing the risk of price drops after the sale.

4. **Organic Liquidity Growth**: Bonding curves can facilitate organic liquidity growth for tokens. As the price of the token increases with demand, it can attract more liquidity providers (LPs) who are interested in capturing the trading volume and associated fees.

5. **Dynamic Pricing**: The dynamic nature of bonding curves allows project teams to adjust the token price based on market conditions. This can help maintain a balance between supply and demand, ensuring that the token remains attractive to buyers.

By leveraging these aspects of bonding curves, project teams in Meteora can create more engaging and effective token sale mechanisms that not only attract initial buyers but also sustain interest and liquidity over time.

ciency.

Zero Slippage: Trading within an active bin has zero slippage or price impact. This makes it easier for LPs to concentrate their liquidity even further and capture more volume and fees than they could before.

Dynamic Fees: LPs earn dynamic swap fees during high market volatility to compensate for impermanent loss. This is because the fees charged on swaps increase with volatility, which helps to offset the losses that LPs can experience in volatile markets.

Flexible Liquidity: LPs can build flexible liquidity distributions according to their strategies. For example, an LP could concentrate their liquidity in a narrow price range around the current market price to minimize slippage, or they could spread their liquidity across a wider price range to reduce effects of impermanent loss.

For Project Teams
New Creative Ways to Launch Tokens: DLMM opens up new creative ways for project teams to launch their tokens. For example, a project team could use DLMM to implement a bonding curve, which is a type of token sale mechanism that rewards early buyers.

Flexible Token Design: Project teams can design their own bonding curves depending on how they plan to sell their tokens. For example, a project team could use a bonding curve to sell tokens and use the funds there to support a minimum token buyback price guaranteeing a token floor price.

Organic Liquidity Growth: DLMM can help project teams organically grow liquidity for their tokens. For example, a project team could u


[User] How can users of Jupiter manage their cookie preferences according to the Privacy Policy?

[Assistant]
According to the Privacy Policy, users of Jupiter can manage their cookie preferences by referring to Section 5, titled “COOKIES AND AUTOMATICALLY-COLLECTED DATA.” This section provides information on how cookies are used and how users can change their cookie choices.

However, the specific details on how to manage these preferences are not included in the provided snippet. Users are encouraged to review Section 5 of the Privacy Policy for comprehensive guidance on managing their cookie settings.

re visitors to the Interface with regards to the Personal Data that they share and/or which is collected within Jupiter Interface. This Privacy Policy is not applicable to any Personal Data collected offline or via channels other than the Interface. Please read this Privacy Policy carefully to understand our policies and practices regarding your data and how it will be treated by the Interface.

IF YOU DO NOT HAVE THE RIGHT, POWER AND AUTHORITY TO ACT ON BEHALF OF AND BIND THE BUSINESS, ORGANIZATION, OR OTHER ENTITY YOU REPRESENT, PLEASE DO NOT ACCESS OR OTHERWISE USE THE INTERFACE. IF YOU ARE INTERESTED IN HOW WE USE COOKIES AND YOU CAN CHANGE YOUR COOKIE CHOICE, PLEASE SEE SECTION 5 “COOKIES AND AUTOMATICALLY-COLLECTED DATA”

1. Changes to this Agreement
If our data processing practices change, we will update this Privacy Policy accordingly to let you know of them upfront and give you a possibility to either provide your consent, object to a particular processing, or undertake other action you are entitled to under the Regulation. Please keep track of any changes we may introduce to this Privacy Policy. Your continued access to and use of the Interface constitutes your awareness of all amendments made to this Privacy Policy as of the date of your accessing and use of the Interface. Therefore, we encourage you to review this Privacy Policy regularly as you shall be bound by it. If, for some reason, you are not satisfied with our personal data processing practices, your imme


[User] In Raydium, how can a user set the price range for their liquidity position?

[Assistant]
In Raydium, a user can set the price range for their liquidity position in a Concentrated Liquidity pool by following these steps:

1. After selecting ‘Liquidity’ from the navigation menu and connecting a wallet, the user can either input a token mint/pool address/ticker in the search bar or browse the pool list to find the desired pool.

2. Once the desired pool is selected, the user will see a graph with sliders that allow them to set the price range for their position.

3. The user can adjust the price range by:
   - Using the sliders on the graph.
   - Manually entering the minimum and maximum price values.
   - Clicking the + and - buttons to fine-tune the price range.

4. Additionally, the user can choose the price base token in the top right corner of the window. This allows the user to view the price in different formats, such as USDC per SOL or SOL per USDC.

By following these steps, the user can effectively set the price range for their liquidity position in the Concentrated Liquidity pool.

rated solution check Raydium SDK here:https://github.com/raydium-io/raydium-sdk-V2/tree/master

Need help troubleshooting for errors? feel free to ask questions to our dev community on Discord.

Providing Concentrated Liquidity (CLMM)
How to provide liquidity in a Concentrated Liquidity pool
Impermanent loss can be significant in CLMM pools. A positive return is not guaranteed! Make sure to understand the risks before providing concentrated liquidity.

If you haven't heard about Concentrated liquidity we recommend reading the following article.

Select ‘Liquidity’ on the navigation menu.

After connecting a wallet, either input a token mint/pool address/ticker in the search bar or browse the pool list, then click 'Deposit' on the desired pool.

3. Set the price range for the position using the sliders on the graph, manually entering the min price and max price, or clicking the + and - buttons.

Note: Price base token can be chosen in the top right corner of the window if preferred when selecting price range. For example, you can view the price as USDC per SOL, or SOL per USDC.

4. Enter the deposit amounts for each token. Note that amounts must match the deposit ratio shown, and which is determined by the selected price range.

5. Click 'Create position', double-check the details of the position, then click 'Confirm Deposit'.

6. That's it! An NFT that represents the position will now be visible in your wallet!

IMPORTANT: If an NFT is lost, sold, or burnt, the liquidity


[User] How can I retrieve the normal and stable fee bps using QuickNode?

[Assistant]
To retrieve the normal and stable fee basis points (bps) using QuickNode, you can use the `/limit-orders/fee` REST API endpoint. This endpoint does not require any parameters and will return a data object containing the fee information.

Here’s how you can make a request to this endpoint using cURL:

```bash
curl --location --request GET 'https://public.jupiterapi.com/limit-orders/fee'
```

The response will include an object with the following properties:

- `normalFeeBps`: An integer representing the normal fee basis points.
- `stableFeeBps`: An integer representing the stable fee basis points.

This allows you to access the fee structure associated with limit orders.

ease reach out to support.
Parameters
This method does not accept any parameters
Returns
fee
object
The data object which contain the following properties:
normalFeeBps
integer
The normal fee bps
stableFeeBps
integer
The stable fee bps
Request

Curl
curl --location --request GET 'https://public.jupiterapi.com/limit-orders/fee'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free
Previous
/limit-orders/open
Next
/limit-orders/history
Chat with our community
Check out our product changelog
Check on the status of our services
Read our blog for the latest announcements
Want the latest news in Web3?
We send out the #Web3Vibes newsletter with the coolest stuff in Blockchain every month. Sign up below!

hi@example.com
/limit-orders/history REST API Endpoint
Returns a list of all Jupiter Limit Orders associated to a wallet and their trades. Results are paginated with 10 orders per page.
Updated on
Dec 12, 2024
Please note that this method is only available for paid subscribers of Metis - Jupiter V6 Swap API. This endpoint is currently in BETA. If you have any feedback or run into any issues, please reach out to support.
Query Parameters
wallet
string
REQUIRED
The wallet address of the user who wants to get their order history
page
integer
The page number of the results, starts from page 1
Returns
orders
array
Array of order objects containing order details and trades
userPubkey
string
The public key of the user who created the o


[User] What is the purpose of the 'network' path parameter in the CoinGecko API?

[Assistant]
The 'network' path parameter in the CoinGecko API is required to specify the network ID for which you want to retrieve the latest pools. This parameter is essential because it allows the API to return data relevant to a specific blockchain network, such as Ethereum, Solana, or others listed in the `/networks` endpoint.

For example, when making a request to get new pools on a specific network, you would include the network ID in the URL path. Here’s how it would look in a cURL request:

```bash
curl --request GET \
     --url https://pro-api.coingecko.com/api/v3/onchain/networks/{network}/new_pools \
     --header 'accept: application/json'
```

In this example, you would replace `{network}` with the actual network ID you are interested in. This ensures that the response contains the latest pools associated with that particular network.

0 seconds
GeckoTerminal equivalent page (example): https://www.geckoterminal.com/explore/new-crypto-pools/solana
Path Params
network
string
required
network id
*refers to /networks

Query Params
include
string
attributes to include, comma-separated if more than one to include
Available values: base_token, quote_token, dex

page
integer
page through results, maximum 10 pages
Default value: 1

Response

200
Get latest pools on a network

Response body
object
data
array of objects
object
id
string
type
string
attributes
object

attributes object
relationships
object

relationships object
included
array of objects
object
id
string
type
string
attributes
object

attributes object
Updated 21 days ago

Top Pools by Dex
New Pools List
Did this page help you?
Language

Shell

Node

Ruby

PHP

Python
Credentials
x-cg-pro-api-key

Log in to use your API keys
1
curl --request GET \
2
     --url https://pro-api.coingecko.com/api/v3/onchain/networks/network/new_pools \
3
     --header 'accept: application/json'

Try It!
RESPONSE
62
        "reserve_in_usd": "163988541.3812"
63
      },
64
      "relationships": {
65
        "base_token": {
66
          "data": {
67
            "id": "eth_0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
68
            "type": "token"
69
          }
70
        },
71
        "quote_token": {
72
          "data": {
73
            "id": "eth_0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
74
            "type": "token"
75
          }
76
        },
77
        "dex": {


[User] What is the URL for withdrawing SOL payments from a pool on Magic Eden?

[Assistant]
The URL for withdrawing SOL payments from a pool on Magic Eden is:

```
https://api-mainnet.magiceden.dev/v2/instructions/mmm/sol-withdraw-buy
```

You can use this endpoint to get instructions for withdrawing SOL from a specified pool.

te-pool?reinvestBuy=true&reinvestSell=true' \
3
     --header 'accept: application/json'

Try It!
RESPONSE
Click Try It! to start a request and see the response here! Or choose an example:
application/json

200

Get instruction to deposit an sol payment into a pool
get
https://api-mainnet.magiceden.dev/v2/instructions/mmm/sol-deposit-buy
Log in to see full request history
time	status	user agent
Make a request to see history.
0 Requests This Month

Query Params
pool
string
required
Public key of pool to deposit into

paymentAmount
number
required
The of SOL to deposit

priorityFee
number
Priority fee (in microlamports) to reprioritize the transaction against others

Response

200
successful operation

Updated 9 months ago

Get instruction to update an existing pool
Get instruction to withdraw sol payment from a pool
Did this page help you?
Language

Shell

Node

Ruby

PHP

Python
Credentials
Bearer
auth-scheme
token

URL

https://api-mainnet.magiceden.dev/v2
/instructions/mmm/sol-deposit-buy
1
curl --request GET \
2
     --url https://api-mainnet.magiceden.dev/v2/instructions/mmm/sol-deposit-buy \
3
     --header 'accept: application/json'

Try It!
RESPONSE
Click Try It! to start a request and see the response here! Or choose an example:
application/json

200

Get instruction to withdraw sol payment from a pool
get
https://api-mainnet.magiceden.dev/v2/instructions/mmm/sol-withdraw-buy
Log in to see full request history
time	status	user agent
Make a request to see history.
0


[User] What is an example URL for querying the price of a token using its contract address on CoinGecko?

[Assistant]
To query the price of a token using its contract address on CoinGecko, you can use the `/simple/token_price/{id}` endpoint. Here is an example URL for querying the price of a token:

```
https://pro-api.coingecko.com/api/v3/simple/token_price/ethereum?contract_addresses=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&vs_currencies=usd&x_cg_pro_api_key=YOUR_API_KEY
```

In this example:
- `id` is set to `ethereum`, which is the asset platform ID.
- `contract_addresses` is set to `0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48`, which is the contract address of the token.
- `vs_currencies` is set to `usd`, indicating that the price should be returned in US Dollars.
- `YOUR_API_KEY` should be replaced with your actual CoinGecko API key.

 in US Dollars.

How to obtain Coin ID aka API ID? There are 3 options:

Use /coins/list endpoint

Example of responses:

json

[
  ......
  {
  "id": "bitcoin", 👈
  "symbol": "btc",
  "name": "Bitcoin"
  },
  ......
]
View the full list of coins with api id, symbol and name using this Google Sheet

Look for the "API Id“ by visiting the info section of a coin page on CoinGecko

[Bitcoin Coin Page](https://www.coingecko.com/en/coins/bitcoin)
Bitcoin Coin Page

b. Contract Address
Other than using Coin ID, you may also query price & market data of a coin using contract address:

Using /simple/token_price/{id} endpoint as example:

https://pro-api.coingecko.com/api/v3/simple/token_price/ethereum?contract_addresses=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&vs_currencies=usd&x_cg_pro_api_key=YOUR_API_KEY

There are 3 parameters values required to apply for this endpoint:

id: Ethereum (Asset Platform ID)
contract_addresses: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 (Contract Address)
vs_currencies: usd (Target Currencies)
How to obtain Coins/Tokens Contract Address

Use /coins/list endpoint (include_platform=true)
Example of responses:

json

[
  ......
	{
    "id": "1inch",
    "symbol": "1inch",
    "name": "1inch",
    "platforms": {
      "ethereum": "0x111111111117dc0aa78b770fa6a738034120c302",
      "avalanche": "0xd501281565bf7789224523144fe5d98e8b28f267",
      "binance-smart-chain": "0x111111111117dc0aa78b770fa6a738034120c302",
      "near-protocol": "111111111117dc0aa7


[User] Where can developers find specific code examples for using durable nonces and priority fees together on Solana?

[Assistant] Developers can find specific code examples for using durable nonces and priority fees together in the Solana developer guide. This guide provides detailed instructions and examples that demonstrate how to implement these features in your Solana applications.

e detected as such.

If you ARE using Durable Transaction Nonces, the AdvanceNonceAccount instruction MUST be specified FIRST in the instructions list, even when the compute budget instructions are used to specify priority fees.

You can find a specific code example using durable nonces and priority fees together in this developer guide.

Supporting the SPL Token Standard #
SPL Token is the standard for wrapped/synthetic token creation and exchange on the Solana blockchain.

The SPL Token workflow is similar to that of native SOL tokens, but there are a few differences which will be discussed in this section.

Token Mints #
Each type of SPL Token is declared by creating a mint account. This account stores metadata describing token features like the supply, number of decimals, and various authorities with control over the mint. Each SPL Token account references its associated mint and may only interact with SPL Tokens of that type.

Installing the spl-token CLI Tool #
SPL Token accounts are queried and modified using the spl-token command line utility. The examples provided in this section depend upon having it installed on the local system.

spl-token is distributed from Rust crates.io via the Rust cargo command line utility. The latest version of cargo can be installed using a handy one-liner for your platform at rustup.rs. Once cargo is installed, spl-token can be obtained with the following command:

cargo install spl-token-cli

You can then check the installed version to


[User] How can you customize the zIndex of the outer-most container in Jupiter?

[Assistant]
To customize the `zIndex` of the outer-most container in Jupiter, you can use the `containerStyles` property when initializing Jupiter. Here’s how you can set a custom `zIndex`:

```javascript
window.Jupiter.init({
  containerStyles: { zIndex: 100 },
});
```

In this example, the `zIndex` is set to `100`. You can adjust the value as needed to fit your design requirements.

iter._instance) {
  window.Jupiter.resume();
}

window.Jupiter.close();

Strict Token List
strictTokenList?: boolean;
Default: true
The Jupiter Token List API is an open, collaborative, and dynamic token list to make trading on Solana more transparent and safer for users and developers. It is true by default to ensure that only validated tokens are shown.

Learn more at: https://station.jup.ag/docs/token-list/token-list-api

Default Explorer
defaultExplorer?: 'Solana Explorer' | 'Solscan' | 'Solana Beach' | 'SolanaFM';
Default: Solana Explorer
The default explorer is set to Solana Explorer;

You can change the default explorer by passing in the explorer name to the defaultExplorer prop.

onSuccess/onSwapError callback
onSuccess() reference can be provided, and will be called when swap is successful.

While onSwapError() will be called when an error has occurred.

window.Jupiter.init({
  onSuccess: ({ txid, swapResult }) => {
    console.log({ txid, swapResult });
  },
  onSwapError: ({ error }) => {
    console.log('onSwapError', error);
  },
});

Customising styles: CSSProperties
Any CSS-in-JS can be injected to the outer-most container via containerStyles API.

Examples:

Custom zIndex
window.Jupiter.init({
  // ...
  containerStyles: { zIndex: 100 },
});

Custom height
window.Jupiter.init({
  // ...
  containerStyles: { maxHeight: '90vh' },
});

Customising className: Tailwind className
Tailwind classes can be injected to the outer-most container via containerClassName API


[User] What does 'finalized' mean in the context of ChainStack?

[Assistant]
In the context of ChainStack, 'finalized' refers to the state of a block in the blockchain. When a block is marked as 'finalized', it indicates that the block has been confirmed by the cluster and is considered permanent. This means that the transactions included in that block are now irreversible and have been accepted as part of the blockchain's history.

Finalization is an important aspect of blockchain technology as it ensures the integrity and reliability of the data stored on the blockchain. Once a block is finalized, it cannot be altered or removed, providing a secure and trustworthy record of transactions.

.
finalized — the block is finalized by the cluster.
Response
value — the account information:
lamports — the account's current balance.
owner — the public key of the program that owns the account.
executable — whether the account is marked as executable.
rentEpoch — the epoch at which this account will next owe rent.
data — the account's data, represented as a base64 string.
Use case
A practical use case for getAccountInfo is to retrieve the current balance of a Solana account. This can be useful for wallets or other applications that need to display or make use of this information.

Try the getAccountInfo RPC method yourself
Body Params
id
integer
Defaults to 1
1
jsonrpc
string
Defaults to 2.0
2.0
method
string
Defaults to getAccountInfo
getAccountInfo
params
array
Defaults to 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM,[object Object]

Option 1
The public key of the account

9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM

Option 2

Option 1
The public key of the account

9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM

Option 2

ADD
Response

200
Account information

Updated 11 months ago

Getting started | Solana
getBalance | Solana
Did this page help you?
Language

Shell

Node

Ruby

PHP

Python
1
curl --request POST \
2
     --url https://nd-326-444-187.p2pify.com/9de47db917d4f69168e3fed02217d15b/ \
3
     --header 'accept: application/json' \
4
     --header 'content-type: application/json' \
5
     --data '
6
{
7
  "id": 1,
8
  "jsonrpc": "2.0",
9
  "method": "getAcco


[User] What happens if there's an error when sending a local transaction in Pump Portal?

[Assistant]
If there's an error when sending a local transaction in Pump Portal, the error message will be logged to the console. The code snippet provided includes a `try-catch` block that captures any exceptions during the transaction process. If an error occurs, the catch block will execute, and the error message will be displayed using `console.error(e.message);`.

Here’s the relevant part of the code that handles errors:

```javascript
try {
    // Code to send local transaction
} catch(e) {
    console.error(e.message); // log error
}
```

Additionally, if the response from the transaction is not successful, the status text of the response will be logged as an error:

```javascript
if (!response.ok) {
    console.log(response.statusText); // log error
}
```

This means that both the specific error message from the exception and the general status text from the response will be available for debugging purposes.

                  "params": [
                    encodedSignedTransactions
                    ]
                })
            });
            console.log(jitoResponse);
        } catch(e){
            console.error(e.message);
        }
        for(let i = 0; i < signatures.length; i++){
            console.log(`Transaction ${i}: https://solscan.io/tx/${signatures[i]}`);
        }
    } else {
        console.log(response.statusText); // log error
    }
}

sendLocalCreateBundle();

Fees
Data API
There is no charge to use the Data API.

Local Transaction API
We take a 0.5% fee on each Local trade. (Note: the fee is calculated before any slippage, so the actual fee amount may not be exactly 0.5% of the final trade value.)

Lightning Transaction API
We take a 1% fee on each Lightning trade. (Note: the fee is calculated before any slippage, so the actual fee amount may not be exactly 1% of the final trade value.)

The above fees do not include Solana network fees, or any fees charged by the Pump.fun bonding curve.

TERMS OF USE
BY USING PUMPPORTAL SERVICES YOU AGREE TO THE TERMS OF USE

**** PumpPortal IS NOT AFFILIATED, AND HAS NO BUSINESS RELATIONSHIP WITH PUMP.FUN OR RAYDIUM. ****

PumpPortal, https://pumpportal.fun, an application programming interface (the “Interface”).

The Interface is software governed by and belongs to PumpPortal. The Interface provides data related to virtual currency exchanges.

These Terms of Use and any terms and conditions incorporated herein by


[User] What are the steps involved in updating a message account on Solana?

[Assistant]
To update a message account on Solana, you would typically follow these steps:

1. **Create a Message Account**: Before updating a message account, you need to have one created. This involves defining the account structure and initializing it with a message.

2. **Prepare the Update Instruction**: You will need to create an instruction that specifies how to update the message account. This usually includes the new message content and may involve specifying the account's public key.

3. **Send the Transaction**: Once the update instruction is prepared, you will send a transaction that includes this instruction to the Solana network.

4. **Confirm the Transaction**: After sending the transaction, you should confirm that it has been processed successfully. This can be done by checking the transaction signature.

### Example Code for Updating a Message Account:

Here is a simplified example of how you might update a message account:

```javascript
const { Connection, Keypair, Transaction, SystemProgram, sendAndConfirmTransaction } = require('@solana/web3.js');

// Assume you have the public key of the message account and the new message
const messageAccountPublicKey = 'YOUR_MESSAGE_ACCOUNT_PUBLIC_KEY';
const newMessage = 'Hello, Solana!';

// Create a connection to the Solana cluster
const connection = new Connection('https://api.devnet.solana.com');

// Create a transaction
const transaction = new Transaction().add(
  // Update instruction (this is a placeholder, actual implementation will vary)
  SystemProgram.update({
    keys: [{ pubkey: messageAccountPublicKey, isSigner: true }],
    data: Buffer.from(newMessage),
  })
);

// Send the transaction
const signature = await sendAndConfirmTransaction(connection, transaction, { signers: [yourKeypair] });

console.log('Transaction Signature:', signature);
```

### Important Notes:
- Replace `'YOUR_MESSAGE_ACCOUNT_PUBLIC_KEY'` with the actual public key of the message account you want to update.
- The `SystemProgram.update` method is a placeholder; you will need to implement the actual logic for updating your specific message account based on your program's requirements.
- Ensure that you handle errors and confirm the transaction signature to verify that the update was successful.

By following these steps, you can successfully update a message account on Solana.

..
  anchor.test.ts:
  pda
    {
  "user": "3z9vL1zjN6qyAFHhHQdWYRTFAcy69pJydkZmSFBKHg1R",
  "message": "Hello, World!",
  "bump": 254
}
    Transaction Signature: https://solana.fm/tx/qGsYb87mUUjeyh7Ha7r9VXkACw32HxVBujo2NUxqHiUc8qxRMFB7kdH2D4JyYtPBx171ddS91VyVrFXypgYaKUr?cluster=devnet-solana
    ✔ Create Message Account (842ms)
    {
  "user": "3z9vL1zjN6qyAFHhHQdWYRTFAcy69pJydkZmSFBKHg1R",
  "message": "Hello, Solana!",
  "bump": 254
}
    Transaction Signature: https://solana.fm/tx/3KCDnNSfDDfmSy8kpiSrJsGGkzgxx2mt18KejuV2vmJjeyenkSoEfs2ghUQ6cMoYYgd9Qax9CbnYRcvF2zzumNt8?cluster=devnet-solana
    ✔ Update Message Account (946ms)
    Expect Null: null
    Transaction Signature: https://solana.fm/tx/3M7Z7Mea3TtQc6m9z386B9QuEgvLKxD999mt2RyVtJ26FgaAzV1QA5mxox3eXie3bpBkNpDQ4mEANr3trVHCWMC2?cluster=devnet-solana
    ✔ Delete Message Account (859ms)
  3 passing (3s)

You can then inspect the SolanFM links to view the transaction details, where you'll find the CPIs for the transfer instructions within the update and delete instructions.

Update CPI
Update CPI

Delete CPI
Delete CPI

If you encounter any errors, you can reference the final code.

Next Steps #
You've completed the Solana Quickstart guide! You've learned about accounts, transactions, PDAs, CPIs, and deployed your own programs.

Visit the Core Concepts pages for more comprehensive explanations of the topics covered in this guide.

Additional learning resources can be found on the Developer Resources page.

Explore More


[User] How does Raydium calculate the APR for liquidity pools?

[Assistant]
Raydium calculates the APR (Annual Percentage Rate) for liquidity pools based on two main components:

1. **Maker Fees**: These are the fees paid for swaps that occur through the pool. The yield from these fees contributes to the overall APR.

2. **Reward Emissions**: This includes the emissions from the liquidity mining rewards associated with the CLMM (Constant Product Automated Market Maker) pools.

The APR displayed on the pools reflects the yield from both maker fees and the rewards emissions. It's important to note that the APR is an extrapolation based on the pool's performance, and previous performance does not guarantee future profits.

For a more detailed understanding, Raydium provides three methods for APR estimation on its CLMM pools, and users are encouraged to read the relevant documentation to understand how each method works.

e to approve the transaction in your wallet. After the transaction confirms, you should be staked and are now earning rewards for staking liquidity pool tokens in farms!

That's it! You're now farming on Raydium.

How to reclaim your LP tokens staked in a farm:
1. click the '-' button next to your position under the 'portfolio' page.

Select the target farm and the number of LP tokens you want to unstake. Click 'Unstake Liquidity' and confirm in your wallet.

That's it, your LP tokens should now appear in your wallet. To reclaim tokens from the pools you can follow this guide.

Liquidity providing FAQ
APRs (annual percentage rate) displayed on Raydium are extrapolations of the pool and farm yield based on the daily (by default) or weekly or monthly performance.

The provided APRs serve as examples only, and it's important to note that previous performance does not ensure future profits.

Raydium displays 3 methods for APR estimation on its CLMM pools, please read this article to understand the way each method works.

APR displayed on pools:

The yield displayed on pools comes from the maker fees (fees paid for swaps going through the pool).
- And reward emissions for CLMM pools.

APR displayed on ecosystem farms:
Include both maker fees and the farms' emissions.

Yes, you can redeem liquidity tokens for a proportional share of the pool at any time.

For standard AMM pools:
If you staked your LP tokens in a farm, you'll need to unstake them first.

Constant Product pools
L


[User] What type of data does the result object return from the getVoteAccounts RPC Method in QuickNode?

[Assistant]
The `result` object returned from the `getVoteAccounts` RPC Method in QuickNode is a JSON object that contains information about both current and delinquent voting accounts. Specifically, it includes an array of JSON objects with the following fields:

1. **current**: This field contains the current accounts and includes the following subfields:
   - **activatedStake**: The stake, in lamports, delegated to this voting account.

2. **delinquent**: This field contains the delinquent accounts, which also includes similar information structured in a similar manner.

The overall structure of the `result` object can be summarized as follows:

```json
{
  "current": [
    {
      "activatedStake": <lamports_value>,
      // additional fields related to the current account
    },
    // more current accounts
  ],
  "delinquent": [
    {
      // fields related to the delinquent account
    },
    // more delinquent accounts
  ]
}
```

This structure allows users to easily access the stake information for both current and delinquent voting accounts.

nth. Sign up below!

hi@example.com
getVoteAccounts RPC Method
Returns the account info and associated stake for all the voting accounts in the current bank. The API credit value for this method is 30.
Updated on
Sep 20, 2024
Parameters
object
array
The configuration object with the following fields:
commitment
string
The level of commitment required for the query. The options include:
finalized
string
The node will query the most recent block confirmed by the supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block as finalized
confirmed
string
The node will query the most recent block that has been voted on by the supermajority of the cluster
processed
string
The node will query its most recent block. Note that the block may not be complete
votePubkey
string
(optional) Only return results for this validator vote address (base-58 encoded)
keepUnstakedDelinquents
boolean
The boolean value that determines whether or not to filter out delinquent validators with no stake
delinquentSlotDistance
u64
Specify the number of slots behind the tip that a validator must fall to be considered delinquent. The parameter is passed as an integer and it's not recomended to specify this argument
Returns
result
A JSON object of current and delinquent accounts, each containing an array of JSON objects with the following fields:
current
The current account with the following fields:
activatedStake
The stake, in lamports, delegated to this vote a


[User] How can I customize the container styles in Jupiter?

[Assistant]
You can customize the container styles in Jupiter by using the `containerStyles` option when initializing Jupiter. This allows you to set specific CSS styles for the outer-most container.

Here’s an example of how to set the maximum height of the container to 90% of the viewport height:

```javascript
Jupiter.init({
  containerStyles: { maxHeight: '90vh' },
});
```

Additionally, if you want to use Tailwind CSS classes for more advanced styling, you can utilize the `containerClassName` option. For example, you can set different maximum heights for different screen sizes using Tailwind classes:

```javascript
window.Jupiter.init({
  containerClassName: 'max-h-[90vh] lg:max-h-[600px]',
});
```

This way, you can customize the appearance of the Jupiter container according to your design requirements.

Jupiter.init({
  // ...
  containerStyles: { maxHeight: '90vh' },
});

Customising className: Tailwind className
Tailwind classes can be injected to the outer-most container via containerClassName API.

Example:

Custom breakpoints
window.Jupiter.init({
  // ...
  containerClassName: 'max-h-[90vh] lg:max-h-[600px]',
});

Upcoming feature / Experimentation
 Limit Order
 DCA
 Experiment separate bundle for passthroughWallet
Edit this page

Jupiter Terminal Walkthrough
Jupiter Terminal is an open-sourced, lite version of Jupiter that provides end-to-end swap flow by linking it in your HTML with just a few lines of code.

Jupiter Terminal Links
Demo: See all available modes
Developer Docs: Jupiter Terminal in detail
Repo
Here's a quick preview of the modes available. To see more, go to our Demo page

Demo

Example: Jupiter Terminal integration on a Solana Dapp scaffold
Integrating Jupiter onto your website should be straight-forward. We provide a step-by-step guide here so anyone can do it.

Here's what you can expect from this tutorial: You'll get Jupiter Terminal launching from Solana Dapp in "Modal" mode.

Demo 2

This walkthrough is also available on Youtube:

Watch tutorial on YouTube

Step-by-step Walkthrough
Solana Labs Dapp scaffold Repo: https://github.com/solana-labs/dapp-scaffold

Clone Solana Dapp Scaffold repo into your local machine or working environment.
Update dependencies, in this example it will be pnpm install
Fire up the development environment in your local


[User] How can a user install the spl-token CLI Tool for managing SPL Tokens on Solana?

[Assistant]
To install the SPL Token CLI Tool for managing SPL Tokens on Solana, you need to follow these steps:

1. **Install Rust**: First, you need to have the Rust programming language installed on your system. You can do this by visiting [rustup.rs](https://rustup.rs) and following the instructions for your platform.

2. **Install the SPL Token CLI Tool**: Once you have Rust and the Cargo package manager installed, you can install the SPL Token CLI Tool using the following command in your terminal:

   ```bash
   cargo install spl-token-cli
   ```

3. **Verify the Installation**: After the installation is complete, you can check the installed version of the SPL Token CLI Tool to ensure it was installed correctly.

This process will set you up with the necessary tools to query and modify SPL Token accounts on the Solana blockchain.


[User] How can developers register their app for Wallet Connect in Magic Eden?

[Assistant]
To register your app for Wallet Connect in Magic Eden, follow these steps:

1. **Visit the Wallet Connect Registration Page**: Go to [Wallet Connect's cloud sign-in page](https://cloud.walletconnect.com/sign-in).

2. **Register Your App**: Sign in or create an account if you don't have one. Once logged in, you will need to register your app. During this process, you will receive a **project ID** that is essential for completing your setup.

3. **Use the Project ID**: This project ID will be used in your application to configure Wallet Connect with the Magic Eden wallet.

By following these steps, you will successfully register your app for Wallet Connect integration with Magic Eden.

 notice a lot more structure with the parameters needed to invoke signer.sendTransaction . Due to the abstraction and wide use of libraries like ethers, we recommend this method when constructing your evm transactions.

📘
EVM
Library Integrations
Here we will cover a number of EVM wallet connection frameworks that are compatible with the ME wallet. There are numerous benefits for using any of these solutions as they provide an even greater level of abstraction away from the provider and come with native support for many popular injected wallets.

Specifically, we will look at:

Wallet Connect

Rainbow Kit

Wagmi

We'll ignore other solutions that don't (yet) have native integration for the ME wallet, even if you are able to use it via EIP-6963

Wallet Connect
the ME wallet works out of the box with the wallet connect Appkit / Web3modal. Their documentation is extensive, so we will keep this short.

Here we'll walk through an example in React, but check out their docs for other compatible frameworks.

Install Dependencies
Copy
npm install @web3modal/wagmi wagmi viem @tanstack/react-query
Register your App
Head to https://cloud.walletconnect.com/sign-in to register your app. You'll need the project Id to complete your setup

Implementation
The implementation steps make use of Wagmi, and the defaultWagmiConfig we can import from web3Modal. We can customize this to strictly make use of the ME wallet or any specific wallet, but the default config is good for our use case.

Here


[User] What should I do if I receive a 401 Unauthorized error when using Helius?

[Assistant]
If you receive a 401 Unauthorized error while using Helius, it indicates that there is an issue with your API key or that access is restricted due to Access Control Rules. Here are the steps you should take to resolve this error:

1. **Check Your API Key**: Ensure that the API key you are using is correct. Verify that there are no typos or errors in the key.

2. **Access Control Rules**: Confirm that your API key has the necessary permissions to access the specific resources or endpoints you are trying to use. If there are any access control rules set up, make sure your key complies with them.

By following these steps, you should be able to resolve the 401 Unauthorized error. If the issue persists after checking your API key and access permissions, consider reaching out to Helius support for further assistance.

saction. It is available as an add-on to any Helius plan, and pricing is based on your sendTransaction TPS (transaction per second).

Submit this intake form to request access, and our sales team will be in touch.

⁉
Common Error Codes
Learn about common RPC error messages and potential solutions. If you experience persistent issues, contact Helius support.

When interacting with Helius RPC endpoints, you may encounter the following standard HTTP error codes that indicate the status of your requests:

Error Code
Error Message
Description
Potential Solution
401

Unauthorized

Invalid API key or restricted access due to Access Control Rules.

Ensure your API key is correct and has the necessary permissions.

429

Too Many Requests

Exceeded Rate Limits.

Check "Rate Limited Requests" graph in your RPC metrics dashboard in Usage section.

Implement rate limiting from your side or upgrade the plan for increased rate limits.

Check our Pricing & Rate limits page for details.

500

Internal Server Error

Generic server-side issue.

Contact Helius support for assistance

503

Service Unavailable

Server is temporarily overloaded or under maintenance.

Retry the request after some time, if the issue persists contact Helius support.

504

Gateway Timeout

Client did not receive a timely response from the server.

This could indicate network issues.

Check your network connection and retry, if the issue persists contact

🔗
HTTP
Solana nodes accept HTTP requests using the JSON-RPC


[User] What is the format of the address output when running the create-token command in Solana?

[Assistant]
When you run the `create-token` command in Solana, the address output is displayed in the following format:

```
99zqUzQGohamfYxyo8ykTEbi91iom3CLmwCA75FK5zTg
```

This address is a unique identifier for the new token (mint account) that you have created. It is a string of alphanumeric characters and is used to reference the specific token within the Solana network.

run the solana airdrop command in the Playground terminal. You can also get devnet SOL using the public web faucet.

solana airdrop 2

Run spl-token --help for a full description of available commands.

spl-token --help

Alternatively, you can install the spl-token CLI locally using the following command. This requires first installing Rust.

Info
In the following sections, the account addresses displayed when you run the CLI command will differ from the example output shown below. Please use the address shown in your Playground terminal when following along. For example, the address output from the create-token is the mint account where your Playground wallet is set as the mint authority.

Create a New Token #
To create a new token (mint account) run the following command in the Solana Playground terminal.

spl-token create-token

You should see an output similar to the following below. You can inspect both the token and transaction details on Solana Explorer using the Address and Signature.

In the example output below, the unique identifier (address) of the new token is 99zqUzQGohamfYxyo8ykTEbi91iom3CLmwCA75FK5zTg.

Terminal
Creating token 99zqUzQGohamfYxyo8ykTEbi91iom3CLmwCA75FK5zTg

Address:  99zqUzQGohamfYxyo8ykTEbi91iom3CLmwCA75FK5zTg
Decimals:  9

Signature: 44fvKfT1ezBUwdzrCys3fvCdFxbLMnNvBstds76QZyE6cXag5NupBprSXwxPTzzjrC3cA6nvUZaLFTvmcKyzxrm1

New tokens initially have no supply. You can check the current supply of a token using the following command:

spl-token


[User] Which HTTP response format should I expect when successfully editing a webhook in Helius?

[Assistant]
When successfully editing a webhook in Helius, you can expect an HTTP response with a status code of 200 OK. The response will typically include a JSON object that confirms the successful update of the webhook. However, the specific structure of the response body is not detailed in the provided documentation snippet.

For example, a successful response might look like this:

```json
{
  "success": true,
  "message": "Webhook updated successfully",
  "webhookID": "your_webhook_id"
}
```

Make sure to check the actual response you receive for the exact format, as it may vary.

od: 'GET',
          headers: {
            'Content-Type': 'application/json',
          }
        }
      );
      const data = await response.json();
      console.log({ data });
    } catch (e) {
      console.error("error", e);
    }
  };
  getWebhook();
Previous
Get All Webhooks
Next
Edit Webhook
Last updated 1 month ago

On this page
Data Streaming
🪝
Webhooks
📘
API Reference
Edit Webhook
Programatically edit a Helius webhook.

Note: It may take up to 2 minutes for webhook changes to take effect!

PUT /webhooks/:webhookID
Edits a webhook.
PUThttps://api.helius.xyz/v0/webhooks/{webhookID}
Path parameters

webhookIDstring
The webhook ID.

Query parameters

api-keystring
The api key.

Body

application/json
webhookURLstring
transactionTypesarray of TransactionType (enum)

itemsTransactionType (enum)
UNKNOWN
NFT_BID
NFT_BID_CANCELLED
NFT_LISTING
NFT_CANCEL_LISTING
NFT_SALE
NFT_MINT
NFT_AUCTION_CREATED
NFT_AUCTION_UPDATED
NFT_AUCTION_CANCELLED
NFT_PARTICIPATION_REWARD
NFT_MINT_REJECTED
CREATE_STORE
WHITELIST_CREATOR
ADD_TO_WHITELIST
REMOVE_FROM_WHITELIST
AUCTION_MANAGER_CLAIM_BID
EMPTY_PAYMENT_ACCOUNT
UPDATE_PRIMARY_SALE_METADATA
ADD_TOKEN_TO_VAULT
ACTIVATE_VAULT
INIT_VAULT
INIT_BANK
INIT_STAKE
MERGE_STAKE
SPLIT_STAKE
SET_BANK_FLAGS
SET_VAULT_LOCK
UPDATE_VAULT_OWNER
UPDATE_BANK_MANAGER
RECORD_RARITY_POINTS
ADD_RARITIES_TO_BANK
INIT_FARM
INIT_FARMER
REFRESH_FARMER
UPDATE_FARM
AUTHORIZE_FUNDER
DEAUTHORIZE_FUNDER
FUND_REWARD
CANCEL_REWARD
LOCK_REWARD
PAYOUT
VALIDATE_SAFETY_DEPO


[User] How does Magic Eden indicate a successful API response?

[Assistant]
Magic Eden indicates a successful API response with a status code of **200**. This status code signifies that the request was processed successfully, and the expected data is returned in the response.

Here is an example of how a successful API response might be structured in a request using cURL:

```bash
curl --request GET \
     --url https://api-mainnet.magiceden.dev/v2/tokens/{token_mint} \
     --header 'accept: application/json'
```

If the request is successful, you would receive a response with a **200** status code along with the relevant data in JSON format.

ring
required
Mint address of the token or asset ID of compressed NFT

Query Params
offset
integer
The number of items to skip, default 0, min 0

limit
integer
The numbers of items to return, default 100, min 1, max 500

Responses

200
success response

400
Token not found

Updated about 1 year ago

Get received offers for a token
Get token metadata by mint address
Did this page help you?
Language

Shell

Node

Ruby

PHP

Python
URL

https://api-mainnet.magiceden.dev/v2
/tokens/{token_mint}/activities
1
curl --request GET \
2
     --url https://api-mainnet.magiceden.dev/v2/tokens/token_mint/activities \
3
     --header 'accept: application/json'

Try It!
RESPONSE
Click Try It! to start a request and see the response here! Or choose an example:
application/json

200

400

Get token metadata by mint address
get
https://api-mainnet.magiceden.dev/v2/tokens/{token_mint}
Log in to see full request history
time	status	user agent
Make a request to see history.

Path Params
token_mint
string
required
Mint address of the token or asset ID of compressed NFT

Responses

200
success response

400
Token not found

Updated about 1 year ago

Get activities for a token
wallets
Did this page help you?
Language

Shell

Node

Ruby

PHP

Python
URL

https://api-mainnet.magiceden.dev/v2
/tokens/{token_mint}
1
curl --request GET \
2
     --url https://api-mainnet.magiceden.dev/v2/tokens/token_mint \
3
     --header 'accept: application/json'

Try It!
RESPONSE
Click Try It! to start a request and


[User] What is the importance of the Witness field for segwit addresses in Magic Eden?

[Assistant]
The Witness field is crucial for Segregated Witness (SegWit) addresses in Magic Eden because it allows for a different way of working with transaction locks. SegWit, introduced by BIP 141, separates the signature data (witness data) from the transaction data, which helps to reduce the size of transactions and improve scalability.

In the context of creating Partially Signed Bitcoin Transactions (PSBTs), the Witness field is necessary to include the relevant witness data for segwit transactions. This separation not only enhances the efficiency of transactions but also enables the use of more complex scripts and improves the overall transaction processing on the Bitcoin network.

By utilizing the Witness field, developers can ensure that their transactions are compatible with the SegWit protocol, which is essential for taking advantage of the benefits that SegWit offers, such as lower fees and faster confirmations.

ript and unlocking/locking UTXOs, check out this resource.

Additionally, the introduction of Segragated Witness (BIP 141), brought around a different way of working with these locks, which is why the Witness field is needed for segwit addresses.

You can find the given scriptPubKey for a UTXO transaction id from the mempool APIs as well:

Copy
/**
 * Fetches the scriptPubKey for a given UTXO transactionId from the mempool.space API.
 * This is necessary for creating a PSBT for a segwit transaction.
 *
 * @param {string} txId The transaction ID of the UTXO.
 * @param {number} vout The vout index of the UTXO.
 * @returns {Promise<string>} A promise that resolves with the hex representation of the scriptPubKey.
 * @throws {Error} If the request to the mempool.space API fails, or if the scriptPubKey is not found for the given vout.
 */
export const fetchScriptPubKey = async (txId: string, vout: number): Promise<string> => {
    const response = await fetch(`https://mempool.space/api/tx/${txId}`);
    if (!response.ok) {
        throw new Error('Error fetching transaction details from mempool.space API.');
    }
    const transaction = await response.json();
    if (transaction.vout && transaction.vout.length > vout && transaction.vout[vout].scriptpubkey) {
        return transaction.vout[vout].scriptpubkey;
    } else {
        throw new Error('scriptPubKey not found for the given vout.');
    }
};
Creating PSBTs
Now for the fun part! We've put together all the pieces, now let's


[User] Where can I find the list of methods supported by Alchemy for the Solana API?

[Assistant] You can find the list of all the methods supported by Alchemy for the Solana API on the Solana API Endpoints page. This page provides detailed information about each method available for interacting with the Solana blockchain through Alchemy's API.

ct with on-chain data, send transactions, and deploy contracts by leveraging Alchemy's API endpoints. The API follows a JSON-RPC standard, a lightweight, remote procedure call (RPC) protocol that is commonly used when interacting with blockchain data.

How can I get started using the Solana API?
Explained in the Solana API Quickstart Guide.

What methods does Alchemy support for the Solana API?
You can find the list of all the methods Alchemy support for the Solana API on the Solana API Endpoints page.

Methods
getTokenLargestAccounts
getTokenAccountsByDelegate

getAccountInfo
post
https://{network}.g.alchemy.com/v2/{apiKey}
Returns all information associated with the account of provided Pubkey.

Parameters
<base-58 encoded string> - Pubkey of account to query

<object> - (optional) Config object:

encoding: (optional) <string> - data encoding for each returned transaction
Accepts one of the following strings:
["json" (Default), "jsonParsed", "base58" (slow), "base64"]
"jsonParsed" encoding attempts to use program-specific parsers to make the transaction.message.instructions list more human-readable; if a parser cannot be found, the instruction falls back to default JSON.

dataSlice: (optional) <object> - limits the returned account data using the provided offset: <usize> and length: <usize> fields
Only available for "base58", "base64" or "base64+zstd" encodings.
curl --request POST \
     --url https://solana-mainnet.g.alchemy.com/v2/docs-demo \
     --header 'accept: applic


[User] What are the implications of setting 'denominatedInSol' to 'false' in transaction requests within Pump Portal?

[Assistant]
Setting `denominatedInSol` to `false` in transaction requests within Pump Portal indicates that the amounts specified in the transaction are not denominated in SOL (the native cryptocurrency of the Solana blockchain). Instead, this setting implies that the amounts are likely specified in the token's own denomination, which could be a custom token or another asset.

Here are the implications of this setting:

1. **Token-Specific Amounts**: When `denominatedInSol` is set to `false`, the amounts provided in the transaction requests (e.g., `amount: 10000000`) are interpreted as the quantity of the specific token being transacted, rather than SOL. This means that the user needs to be aware of the token's decimal places and value relative to SOL.

2. **Transaction Validation**: The transaction processing logic will need to handle the conversion or validation of the token amounts against the current market value or liquidity of the token, as it will not be using SOL as the base currency.

3. **Potential for Confusion**: Users must be cautious when specifying amounts, as they need to ensure they are providing the correct token amounts rather than SOL amounts, which could lead to errors if misunderstood.

4. **Interoperability**: This setting may affect how transactions are interpreted by different parts of the Pump Portal ecosystem or by external services that may expect amounts to be in SOL.

In summary, setting `denominatedInSol` to `false` means that the transaction amounts are in the context of the specific token rather than SOL, which requires careful consideration of the token's value and handling within the transaction logic.

    formData.append("showName", "true");
    let metadataResponse = await fetch("https://pump.fun/api/ipfs", {
    method: "POST",
    body: formData,
    });
    let metadataResponseJSON = await metadataResponse.json();
    const bundledTxArgs = [
        {
            "publicKey": signerKeyPairs[0].publicKey.toBase58(),
            "action": "create",
            "tokenMetadata": {name: tokenMetadata.name, symbol: tokenMetadata.symbol, uri: metadataResponseJSON.metadataUri},
            "mint": mintKeypair.publicKey.toBase58(),
            "denominatedInSol": "false",
            "amount": 10000000,
            "slippage": 10,
            "priorityFee": 0.0001, // priority fee on the first tx is used for jito tip
            "pool": "pump"
        },
        {
            publicKey: signerKeyPairs[1].publicKey.toBase58(),
            "action": "buy",
            "mint": mintKeypair.publicKey.toBase58(),
            "denominatedInSol": "false",
            "amount": 10000000,
            "slippage": 10,
            "priorityFee": 0.00005, // priority fee after first tx is ignored
            "pool": "pump"
        },
        // use up to 5 transactions

    ];
    const response = await fetch(`https://pumpportal.fun/api/trade-local`, {
        method: "POST",
        headers: {
            "Content-Type": "application/json"
        },
        body: JSON.stringify(bundledTxArgs)
    });
    if(response.status === 200){ // successfully generated transactions


[User] How does locking liquidity before trading begins affect fee earnings in Meteora's memecoin pools?

[Assistant]
Locking liquidity before trading begins in Meteora's memecoin pools is crucial for maximizing fee earnings from that liquidity. Here’s how it works:

1. **Permanent Locking of Liquidity**: When a liquidity provider creates a new memecoin pool, the liquidity they provide is sent to a lock token account, which permanently locks it. This process ensures that the liquidity is not accessible for withdrawal or manipulation, providing traders with confidence.

2. **Earning Fees from Locked Liquidity**: By locking the liquidity before trading starts, the fees generated from trades that occur in the pool are captured immediately. This means that the liquidity provider can earn fees from the very first trade, as the liquidity is already locked and eligible for fee earnings.

3. **Scenario Impact**: If the liquidity is deposited into the pool but not locked before trading begins, the fees from that liquidity will not be claimable until it is locked. This creates a gap where the project misses out on potential fee earnings from the initial trading volume. Therefore, locking liquidity before trading ensures that the project can start earning fees right from the start.

In summary, locking liquidity before the pool starts trading allows the project to capture swap fees from the moment trading begins, enhancing the financial sustainability and growth potential of the memecoin project.

emecoin discoverability by traders, bots, and LPs.

Note: Currently, only the memecoin-type Dynamic Pools have Dynamic Fee and Protocol Fee. And only the Meteora team is able to change these fees; projects have no backend access.

How Memecoin Pool Fees Work
Claim fees from permanently-locked liquidity
Memecoin projects permanently lock liquidity to give traders confidence. However, on most DEX platforms, fees earned by this liquidity are lost, limiting a project's financial options.

On Meteora, when a liquidity provider creates a new memecoin pool, the liquidity provided is automatically sent to a lock token account to be permanently locked. Fees and yield are still claimable by the liquidity provider (the wallet that provided the liquidity) forever.

By allowing creators to earn fees from locked liquidity, a creator can choose to lock up more or all of the supply and earn fees by growing volume instead of selling allocations as a source of funding. We believe this will help more memecoins improve and grow over the long-run by creating long-term alignment between projects and holders.

Important reminder
If the project wants to permanently lock liquidity in the Memecoin pool, they should ideally lock the liquidity BEFORE the pool starts trading, so that swap fees from locked liquidity are captured the second trading starts.

In a scenario where:

The pool started trading - t0

Liquidity gets deposited to the pool by the project, but not locked - t1

Subsequently, that li


[User] What type of object can be passed as a parameter to the getStakeMinimumDelegation method in Tatum?

[Assistant]
The `getStakeMinimumDelegation` method in Tatum can take an optional configuration object as a parameter. This object can contain the following field:

- `commitment` (string, optional): This field allows you to specify the level of commitment for the request.

This means you can pass an object like this:

```javascript
const params = {
  commitment: "finalized" // Example value for commitment
};

const res = await tatum.rpc.getStakeMinimumDelegation(params);
```

In this example, `params` is the configuration object that includes the optional `commitment` field.

nt"
}
JSON-RPC Response Example
JSON

{
  "jsonrpc": "2.0",
  "result": 268,
  "id": 1
}

getstakeminimumdelegation
Solana RPC

Archive Method
Only on the full archive nodes. Complex queries might take longer and incur additional cost

How to Use It
JavaScript

// yarn add @tatumio/tatum

import { TatumSDK, Solana, Network } from '@tatumio/tatum'

const tatum = (await TatumSDK.init) < Solana > { network: Network.SOLANA }

const res = await tatum.rpc.getStakeMinimumDelegation()

await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs
Overview
The getStakeMinimumDelegation method is an essential component of Solana's staking process. It returns the minimum delegation amount, expressed in lamports, that is required to stake on the Solana network. The staking process is an integral part of Solana's Proof of Stake consensus mechanism, where stakeholders are rewarded for their participation in securing the network.

This method is commonly used by wallets and staking services to inform their users about the minimum amount required for staking. By delegating a certain amount of Solana tokens, participants can earn staking rewards and contribute to the network's security. The minimum delegation amount is set by the network to prevent spam and maintain a high level of network performance.

Parameters
This method takes the following parameters:

A configuration object (optional): This object can contain the following fields:
commitment (string, optional): The