API Documentation
Integrate with our powerful API endpoints for Solana token trading, pump.fun operations, and automated trading bots.
API Endpoints
Pool Information
Pump.fun
Pump Swap AMM Pools
Trading Endpoints
Pump.fun
Pump Swap AMM Pools
RaydiumSoon
MeteoraSoon
Automatic TradingSoon
Get Pool Information
Get pool information for a specific pool.
Endpoint
https://ewr.swapapi.io/api/v1/pool/{poolAddress}
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
poolAddress | path | Yes | Solana pool address |
Headers
Name | Required | Description |
---|---|---|
X-API-Key | Yes | Your API key for authentication |
Example Request
1curl "https://ewr.swapapi.io/api/v1/pool/{poolAddress}" \2 -H "X-API-Key: YOUR_API_KEY"
Responses
1curl "https://ewr.swapapi.io/api/v1/pool/YN4U8xySzuyARUMTNCpMgkkek7nnh2VAkUMdMygpump"23{4 "success": true,5 "data": {6 "poolAddress": "pool_address",7 "baseMint": "base_token_mint",8 "quoteMint": "quote_token_mint",9 "pricing": {...},10 "balances": {...},11 "poolStats": {...}12 }13}
Get Pool Price
Get pool price information.
Endpoint
https://ewr.swapapi.io/api/v1/pool/{poolAddress}/price
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
poolAddress | path | Yes | Solana pool address |
Headers
Name | Required | Description |
---|---|---|
X-API-Key | Yes | Your API key for authentication |
Example Request
1curl "https://ewr.swapapi.io/api/v1/pool/{poolAddress}/price" \2 -H "X-API-Key: YOUR_API_KEY"
Responses
1curl "https://ewr.swapapi.io/api/v1/pool/YN4U8xySzuyARUMTNCpMgkkek7nnh2VAkUMdMygpump/price"23{4 "success": true,5 "data": {6 "price": "0.001234",7 "priceUsd": "0.001234",8 "change24h": "5.67"9 }10}
Get Pool Statistics
Get pool statistics.
Endpoint
https://ewr.swapapi.io/api/v1/pool/{poolAddress}/stats
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
poolAddress | path | Yes | Solana pool address |
Headers
Name | Required | Description |
---|---|---|
X-API-Key | Yes | Your API key for authentication |
Example Request
1curl "https://ewr.swapapi.io/api/v1/pool/{poolAddress}/stats" \2 -H "X-API-Key: YOUR_API_KEY"
Responses
1curl "https://ewr.swapapi.io/api/v1/pool/YN4U8xySzuyARUMTNCpMgkkek7nnh2VAkUMdMygpump/stats"23{4 "success": true,5 "data": {6 "volume24h": "1234.56",7 "liquidity": "9876.54",8 "fees24h": "12.34"9 }10}
Quote to Base Swap Quote
Get quote for Quote to Base token swap (buying base tokens with quote tokens).
Endpoint
https://ewr.swapapi.io/api/v1/swap/quote/quote-to-base
Parameters
Name | Type | Required | Description |
---|---|---|---|
poolAddress | string | Yes | Pool address |
quoteAmount | number | Yes | Amount of quote tokens to swap |
slippage | number | No | Slippage tolerance in basis points (default: 50) |
Example Request
1curl "https://ewr.swapapi.io/api/v1/swap/quote/quote-to-base?poolAddress=value"eAmount=value&slippage=value" \
Responses
1{2 "success": true,3 "data": {4 "inputAmount": "1.0",5 "outputAmount": "1000.0",6 "priceImpact": "0.5",7 "fee": "0.01",8 "slippage": 509 }10}
Base to Quote Swap Quote
Get quote for Base to Quote token swap (selling base tokens for quote tokens).
Endpoint
https://ewr.swapapi.io/api/v1/swap/quote/base-to-quote
Parameters
Name | Type | Required | Description |
---|---|---|---|
poolAddress | string | Yes | Pool address |
baseAmount | number | No | Amount of base tokens to swap |
percentage | number | No | Percentage of wallet balance to sell (1-100). If percentage is set to 100, it will also close the token account to collect SOL back. |
userPublicKey | string | No | User's wallet address (required if using percentage) |
slippage | number | No | Slippage tolerance in basis points (default: 50) |
Example Request
1curl "https://ewr.swapapi.io/api/v1/swap/quote/base-to-quote?poolAddress=value&baseAmount=value&percentage=value&userPublicKey=value&slippage=value" \
Responses
1{2 "success": true,3 "data": {4 "inputAmount": "1000.0",5 "outputAmount": "1.0",6 "priceImpact": "0.5",7 "fee": "0.01",8 "slippage": 509 }10}
Execute Quote to Base Swap (BUY)
Execute Quote to Base token swap.
Endpoint
https://ewr.swapapi.io/api/v1/swap/execute/quote-to-base
Headers
Name | Required | Description |
---|---|---|
X-API-Key | Yes | Your API key for authentication |
Parameters
Name | Type | Required | Description |
---|---|---|---|
poolAddress | string | Yes | Pool address |
quoteAmount | number | Yes | Amount of quote tokens to swap |
slippage | number | No | Slippage tolerance in basis points (default: 50) |
temporal | number | No | Temporal tip in SOL (minimum 0.001 for FAST TRADE and MEV PROTECTION). Higher values provide more speed. This transaction will be sent to temporal services. |
Example Request
1curl -X POST "https://ewr.swapapi.io/api/v1/swap/execute/quote-to-base" \2 -H "Content-Type: application/json" \3 -H "X-API-Key: YOUR_API_KEY" \4 -d '{5 "poolAddress": "value",6 "quoteAmount": 0,7 "slippage": 0,8 "temporal": 09 }'
Responses
1{2 "success": true,3 "data": {4 "signature": "transaction_signature",5 "inputAmount": "1.0",6 "outputAmount": "1000.0",7 "transactionUrl": "https://solscan.io/tx/signature"8 }9}
Execute Base to Quote Swap (SELL)
Execute Base to Quote token swap.
Endpoint
https://ewr.swapapi.io/api/v1/swap/execute/base-to-quote
Headers
Name | Required | Description |
---|---|---|
X-API-Key | Yes | Your API key for authentication |
Parameters
Name | Type | Required | Description |
---|---|---|---|
poolAddress | string | Yes | Pool address |
baseAmount | number | No | Amount of base tokens to swap. Either baseAmount or percentage must be provided. |
percentage | number | No | Percentage of wallet balance to sell (1-100). Suggested parameter to use. If percentage is set to 100, it will also close the token account to collect SOL back. Either baseAmount or percentage must be provided. |
slippage | number | No | Slippage tolerance in basis points (default: 50) |
temporal | number | No | Temporal tip in SOL (minimum 0.001 for FAST TRADE and MEV PROTECTION). Higher values provide more speed. This transaction will be sent to temporal services. |
Example Request
1curl -X POST "https://ewr.swapapi.io/api/v1/swap/execute/base-to-quote" \2 -H "Content-Type: application/json" \3 -H "X-API-Key: YOUR_API_KEY" \4 -d '{5 "poolAddress": "value",6 "baseAmount": 0,7 "percentage": 0,8 "slippage": 0,9 "temporal": 010 }'
Responses
1{2 "success": true,3 "data": {4 "signature": "transaction_signature",5 "inputAmount": "1000.0",6 "outputAmount": "1.0",7 "transactionUrl": "https://solscan.io/tx/signature"8 }9}
Get Swap Transaction Status
Get transaction status.
Endpoint
https://ewr.swapapi.io/api/v1/swap/transaction/{signature}
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
signature | path | Yes | Transaction signature |
Example Request
1curl "https://ewr.swapapi.io/api/v1/swap/transaction/{signature}" \
Responses
1{2 "success": true,3 "data": {4 "signature": "transaction_signature",5 "status": "confirmed",6 "confirmations": 327 }8}
Get Bonding Curve Info
Get bonding curve information for a pump.fun token.
Endpoint
https://ewr.swapapi.io/api/v1/pumpfun/pool/{mintAddress}
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
mintAddress | path | Yes | Token mint address |
Headers
Name | Required | Description |
---|---|---|
X-API-Key | Yes | Your API key for authentication |
Example Request
1curl "https://ewr.swapapi.io/api/v1/pumpfun/pool/{mintAddress}" \2 -H "X-API-Key: YOUR_API_KEY"
Responses
1curl "https://ewr.swapapi.io/api/v1/pumpfun/pool/42VGRK3BTxeJgcLwKjfbLvYsYTwJqDThNYZiiX8cpump"23{4 "success": true,5 "data": {6 "mintAddress": "token_mint",7 "bondingCurve": "bonding_curve_address",8 "associatedBondingCurve": "associated_bonding_curve",9 "virtualTokenReserves": "1000000000",10 "virtualSolReserves": "30000000000",11 "realTokenReserves": "800000000",12 "realSolReserves": "25000000000",13 "tokenTotalSupply": "1000000000",14 "complete": false15 }16}
Get Buy Quote
Get quote for buying pump.fun tokens.
Endpoint
https://ewr.swapapi.io/api/v1/pumpfun/quote/buy
Headers
Name | Required | Description |
---|---|---|
X-API-Key | Yes | Your API key for authentication |
Parameters
Name | Type | Required | Description |
---|---|---|---|
mintAddress | string | Yes | Token mint address |
solAmount | number | Yes | Amount of SOL to spend |
slippage | number | No | Slippage tolerance in basis points (default: 50) |
Example Request
1curl "https://ewr.swapapi.io/api/v1/pumpfun/quote/buy?mintAddress=value&solAmount=value&slippage=value" \2 -H "X-API-Key: YOUR_API_KEY"
Responses
1{2 "success": true,3 "data": {4 "inputAmount": "1.0",5 "outputAmount": "1000000.0",6 "priceImpact": "0.5",7 "fee": "0.01",8 "slippage": 509 }10}
Get Sell Quote
Get quote for selling pump.fun tokens.
Endpoint
https://ewr.swapapi.io/api/v1/pumpfun/quote/sell
Headers
Name | Required | Description |
---|---|---|
X-API-Key | Yes | Your API key for authentication |
Parameters
Name | Type | Required | Description |
---|---|---|---|
mintAddress | string | Yes | Token mint address |
tokenAmount | number | No | Amount of tokens to sell |
percentage | number | No | Percentage of wallet balance to sell (1-100). If percentage is set to 100, it will also close the token account to collect SOL back. |
userPublicKey | string | No | User's wallet address (required if using percentage) |
slippage | number | No | Slippage tolerance in basis points (default: 50) |
Example Request
1curl "https://ewr.swapapi.io/api/v1/pumpfun/quote/sell?mintAddress=value&tokenAmount=value&percentage=value&userPublicKey=value&slippage=value" \2 -H "X-API-Key: YOUR_API_KEY"
Responses
1{2 "success": true,3 "data": {4 "inputAmount": "1000000.0",5 "outputAmount": "1.0",6 "priceImpact": "0.5",7 "fee": "0.01",8 "slippage": 509 }10}
Execute Buy Transaction
Execute buy transaction for pump.fun tokens.
Endpoint
https://ewr.swapapi.io/api/v1/pumpfun/buy
Headers
Name | Required | Description |
---|---|---|
X-API-Key | Yes | Your API key for authentication |
Parameters
Name | Type | Required | Description |
---|---|---|---|
mintAddress | string | Yes | Token mint address |
solAmount | number | Yes | Amount of SOL to spend |
slippage | number | No | Slippage tolerance in basis points (default: 50) |
temporal | number | No | Temporal tip in SOL (minimum 0.001 for FAST TRADE and MEV PROTECTION). Higher values provide more speed. This transaction will be sent to temporal services. |
Example Request
1curl -X POST "https://ewr.swapapi.io/api/v1/pumpfun/buy" \2 -H "Content-Type: application/json" \3 -H "X-API-Key: YOUR_API_KEY" \4 -d '{5 "mintAddress": "value",6 "solAmount": 0,7 "slippage": 0,8 "temporal": 09 }'
Responses
1{2 "success": true,3 "data": {4 "signature": "transaction_signature",5 "inputAmount": "1.0",6 "outputAmount": "1000000.0",7 "transactionUrl": "https://solscan.io/tx/signature",8 "dexscreenerUrl": "https://dexscreener.com/solana/token_mint"9 }10}
Execute Sell Transaction
Execute sell transaction for pump.fun tokens.
Endpoint
https://ewr.swapapi.io/api/v1/pumpfun/sell
Headers
Name | Required | Description |
---|---|---|
X-API-Key | Yes | Your API key for authentication |
Parameters
Name | Type | Required | Description |
---|---|---|---|
mintAddress | string | Yes | Token mint address |
tokenAmount | number | No | Amount of tokens to sell. Either tokenAmount or percentage must be provided. |
percentage | number | No | Percentage of wallet balance to sell (1-100). Suggested parameter to use. If percentage is set to 100, it will also close the token account to collect SOL back. Either tokenAmount or percentage must be provided. |
slippage | number | No | Slippage tolerance in basis points (default: 50) |
temporal | number | No | Temporal tip in SOL (minimum 0.001 for FAST TRADE and MEV PROTECTION). Higher values provide more speed. This transaction will be sent to temporal services. |
Example Request
1curl -X POST "https://ewr.swapapi.io/api/v1/pumpfun/sell" \2 -H "Content-Type: application/json" \3 -H "X-API-Key: YOUR_API_KEY" \4 -d '{5 "mintAddress": "value",6 "tokenAmount": 0,7 "percentage": 0,8 "slippage": 0,9 "temporal": 010 }'
Responses
1{2 "success": true,3 "data": {4 "signature": "transaction_signature",5 "inputAmount": "1000000.0",6 "outputAmount": "1.0",7 "transactionUrl": "https://solscan.io/tx/signature",8 "dexscreenerUrl": "https://dexscreener.com/solana/token_mint"9 }10}
Get Token Balance
Get wallet token balance for pump.fun tokens.
Endpoint
https://ewr.swapapi.io/api/v1/pumpfun/balance/{mintAddress}
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
mintAddress | path | Yes | Token mint address |
Headers
Name | Required | Description |
---|---|---|
X-API-Key | Yes | Your API key for authentication |
Example Request
1curl "https://ewr.swapapi.io/api/v1/pumpfun/balance/{mintAddress}" \2 -H "X-API-Key: YOUR_API_KEY"
Responses
1{2 "success": true,3 "data": {4 "mintAddress": "token_mint",5 "walletAddress": "wallet_address",6 "balance": "1000000.0",7 "decimals": 68 }9}
Get Transaction Status
Get transaction status for pump.fun operations.
Endpoint
https://ewr.swapapi.io/api/v1/pumpfun/transaction/{signature}
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
signature | path | Yes | Transaction signature |
Example Request
1curl "https://ewr.swapapi.io/api/v1/pumpfun/transaction/{signature}" \
Responses
1{2 "success": true,3 "data": {4 "signature": "transaction_signature",5 "status": "confirmed",6 "confirmations": 327 }8}
Execute Buy Transaction
Execute buy transaction for tokens on Raydium DEX.
Endpoint Path:
/api/v1/raydium/buy
This endpoint is currently under development and will be available soon. Stay tuned for updates!
Execute Sell Transaction
Execute sell transaction for tokens on Raydium DEX.
Endpoint Path:
/api/v1/raydium/sell
This endpoint is currently under development and will be available soon. Stay tuned for updates!
Execute Buy Transaction
Execute buy transaction for tokens on Meteora DEX.
Endpoint Path:
/api/v1/meteora/buy
This endpoint is currently under development and will be available soon. Stay tuned for updates!
Execute Sell Transaction
Execute sell transaction for tokens on Meteora DEX.
Endpoint Path:
/api/v1/meteora/sell
This endpoint is currently under development and will be available soon. Stay tuned for updates!
Start Automated Trading Position
Start a new automated trading position. Our system will monitor the position and automatically execute take profit or stop loss orders.
Endpoint Path:
/api/v1/auto/trade
This endpoint is currently under development and will be available soon. Stay tuned for updates!
Get Active Automated Positions
Get all active automated trading positions.
Endpoint Path:
/api/v1/auto/positions
This endpoint is currently under development and will be available soon. Stay tuned for updates!
Close Automated Position
Manually close an automated trading position.
Endpoint Path:
/api/v1/auto/position/{positionId}/close
This endpoint is currently under development and will be available soon. Stay tuned for updates!
Trading Bot Health Check
Health check for trading bot service.
Endpoint
https://ewr.swapapi.io/api/v1/trade/health
Example Request
1curl "https://ewr.swapapi.io/api/v1/trade/health" \
Responses
1{2 "success": true,3 "data": {4 "status": "healthy",5 "uptime": "24h 30m",6 "activePositions": 157 }8}