POST /v1/tx/buy
Builds an unsigned transaction to buy a token with SOL.
- Mode:
exactIn(you specify exact SOL in, token out is estimated) - Auth: required (see API Authentication)
- Errors: see Errors
- Method:
POST - Path:
/v1/tx/buy
Headers
Section titled “Headers”Authorization: Bearer api_your_key_hereContent-Type: application/json{ "mint": "TOKEN_MINT", "solAmount": 0.002, "slippage": 0.05, "priority": "fast"}Fields
Section titled “Fields”mint(string, required): token mint address (Solana address)solAmount(number, required): SOL amount to spendslippage(number, required): decimal, (0 <= slippage < 1). Example:0.05= 5%priority(string, required): see Priority (economy|fast|faster|fastest)
Response
Section titled “Response”{ "success": true, "data": { "submissionToken": "txn_…", "unsignedTransaction": "BASE64_WIRE_TRANSACTION", "expiresAt": "2025-01-01T00:00:00.000Z", "platform": "pump_fun", "inputMint": "So11111111111111111111111111111111111111111", "outputMint": "TOKEN_MINT", "estimates": { "inputAmount": 0.002, "outputAmount": 70598.459309, "priceImpact": 0.00346 }, "priorityCost": 0.000005125 }}submissionTokenlinks this built transaction for submission viaPOST /v1/tx/submit.inputMint/outputMintare from the DEX perspective (what goes in vs what comes out).estimatesare best-effort outputs assuming the market doesn’t move between build and execution.priceImpactshows how much your trade will move the price;0.1means ~10% price impact.