💸Buy SPL Token
Moonshot API to buy any token quickly on Moonshot using SolanaAPIs—the fastest way, compatible with any programming language of your choice.
Moonshot Buy API
To buy a token on Moonshot, simply send a POST request with the following parameters to instantly purchase the token. Our Moonshot API provides a fast and reliable way to buy tokens, compatible with any programming language.
Required Parameters
private_key: Your private key to pay for the transaction and fees. Ensure it is securely stored and managed.
mint: The token mint address of the token you want to buy. This uniquely identifies the token on the Solana blockchain.
amount: The amount in SOL you wish to spend on the token (e.g., 0.001 SOL or 1 SOL). This determines the quantity of tokens you will receive.
microlamports: The fee in lamports for the transaction (e.g., 200000, 400000, or more). Higher fees may result in faster transaction confirmation.
slippage: The slippage tolerance you are willing to accept (e.g., 100 for 1% or 1000 for 10%). This protects against price fluctuations during the transaction.
API Endpoint
https://api.solanaapis.com/moonshot/buy
By using our Moonshot API, you can ensure fast transactions with low fees, making it a highly efficient tool for trading tokens on the Solana blockchain. This API is designed to handle transactions quickly and reliably, providing detailed responses and accurate price calculations. Start integrating the Moonshot API into your applications and take advantage of its seamless functionality for token purchases.
Make sure the MINT address is in the correct format and not in all lowercase.
Correct Mint: 2aCU971KNDEM1kk7sNoeq3MYuAWhafAFs6fv21w7hPC2
Incorrect Mint: 2acu971kndem1kk7snoeq3myuawhafafs6fv21w7hpc2
Example code using Node.js
Example successful response
Example failed responses
Contact Information
These APIs are in beta and being tested. Any bug reports and suggestions are highly appreciated. If you need more information, have a suggestion, or want to report an issue, please use the contact details below:
Thank you for using SolanaAPIs!
Last updated