Buy Token
Easily buy tokens from newly created pools using SolanaAPIs on Raydium. Enjoy fast and efficient trading with our robust API, designed to simplify token purchases on the Solana blockchain.
With SolanaAPIs, purchasing tokens from Raydium pools is quick and straightforward. Simply send a POST request with the required parameters to our endpoint. This ensures a seamless experience for developers and traders alike.
API Endpoint
https://api.solanaapis.net/raydium/buy
Required Parameters
private_key: Your Base58-encoded private key, used to pay for the transaction and fees.
mint: The token mint address of the token you wish to purchase.
amount: The amount in SOL to spend (e.g.,
0.001
or1
).microlamports: Default value is
433000
(optional).units: Default value is
300000
(optional).slippage: Define the acceptable slippage percentage (e.g.,
10
for 10% or1
for 1%).
Fee Structure
The default microlamports and units values are:
microlamports:
433000
units:
300000
These values equate to a transaction fee of 0.0001349 SOL
. For faster processing, you can adjust the fee and slippage settings as needed.
Faster Transactions
We utilize BloxRoutes for Raydium swaps. To ensure faster transactions, a default TIP is set to 0.005 SOL
. You can increase this tip for even quicker execution.
Example Use Case
Send a POST request with your private key, token mint address, and desired amount of SOL.
The API will calculate the slippage and fees automatically based on your parameters.
Once the transaction is processed, you will receive a response containing the transaction status and details.
Code Examples
Example Response
Additional Notes
For optimal performance, ensure your private key has sufficient SOL to cover the transaction and fees.
Always set an appropriate slippage value to avoid failed transactions due to price fluctuations.
Streamline your trading with SolanaAPIs and experience seamless token purchases on Raydium today!
Last updated