Solana Developer Tools

A simple and reliable way to perform token swaps on various Solana AMM platforms

v1.0.0

Quick Start

Start using our API for token swaps on Solana in minutes. All requests require a wallet address in the header.

Base URL

https://soldevtools.io//api

Authentication

x-wallet-address: YOUR_WALLET

Rate Limit

30 requests/minute

Restrictions

Request limits

30 requests per minute per IP address. If the limit is exceeded, the status 429 is returned.

Raydium Integration

GET

/quote/raydium

Get a quote for a swap without executing a transaction.

Parameters

ParameterTypeRequiredDescription
fromMintstringIncoming token address
toMintstringOutgoing token address
amountnumberNumber of incoming tokens

Example request

bash
curl -X GET "https://soldevtools.io//api/quote/raydium?fromMint=So11111111111111111111111111111111111111112&toMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount=1000000"

Sample answer

json
{
  "success": true,
  "data": {
    "inputAmount": "1000000",
    "outputAmount": "1000145",
    "priceImpact": 0.12,
    "minimumReceived": "995144",
    "fees": {
      "networkFee": 5000,
      "platformFee": 0
    },
    "route": [
      "So11111111111111111111111111111111111111112",
      "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
    ]
  },
  "meta": {
    "provider": "Solana Developer Tools",
    "version": "1.0.0",
    "timestamp": "2025-06-28T10:30:00.000Z",
    "amm": "Raydium"
  }
}
POST

/swap/raydium

Prepare a transaction for a token swap on Raydium.

Headers

javascript
Content-Type: application/json
x-wallet-address: YOUR_WALLET_ADDRESS

Request body parameters

ParameterTypeRequiredDescription
fromMintstringIncoming token address
toMintstringOutgoing token address
amountnumberNumber of incoming tokens
slippagenumberSlippage in percent (default: 0.5)

Example request

bash
curl -X POST "https://soldevtools.io//api/swap/raydium" \
  -H "Content-Type: application/json" \
  -H "x-wallet-address: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM" \
  -d '{
    "fromMint": "So11111111111111111111111111111111111111112",
    "toMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "amount": 1000000,
    "slippage": 0.5
  }'

Sample answer

json
{
  "success": true,
  "data": {
    "serializedTransaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDAr...",
    "estimatedOutput": "1000145",
    "priceImpact": 0.12,
    "fees": {
      "networkFee": 5000,
      "platformFee": 0
    },
    "route": {
      "from": "So11111111111111111111111111111111111111112",
      "to": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "amount": "1000000",
      "amm": "Raydium"
    }
  },
  "meta": {
    "provider": "Solana Developer Tools",
    "version": "1.0.0",
    "timestamp": "2025-06-28T10:30:00.000Z",
    "amm": "Raydium"
  }
}

Error Handling

All errors are returned in the following format:

json
{
  "success": false,
  "error": "Human readable error message",
  "errorCode": "ERROR_CODE"
}

Error codes

Client errors
  • RATE_LIMIT - Request limit exceeded
  • MISSING_WALLET - Wallet address not specified
  • INVALID_PARAMS - Incorrect parameters
Server errors
  • QUOTE_ERROR - Error getting quote
  • SWAP_ERROR - Error preparing swap
  • INTERNAL_ERROR - Internal Server Error

Popular tokens

Native SOL

So11111111111111111111111111111111111111112

USDC

EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v

USDT

Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB

Client integration

JavaScript/TypeScript

javascript
class Solana Developer ToolsSwapAPI {
  constructor(baseUrl, walletAddress) {
    this.baseUrl = baseUrl;
    this.walletAddress = walletAddress;
  }

  async getQuote(fromMint, toMint, amount) {
    const params = new URLSearchParams({
      fromMint,
      toMint,
      amount: amount.toString()
    });

    const response = await fetch(`${this.baseUrl}/quote/raydium?${params}`);
    return await response.json();
  }

  async prepareSwap(fromMint, toMint, amount, slippage = 0.5) {
    const response = await fetch(`${this.baseUrl}/swap/raydium`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'x-wallet-address': this.walletAddress
      },
      body: JSON.stringify({
        fromMint,
        toMint,
        amount,
        slippage
      })
    });

    return await response.json();
  }
}

// Usage
const api = new Solana Developer ToolsSwapAPI('https://soldevtools.io//api', 'YOUR_WALLET');
const quote = await api.getQuote(SOL_MINT, USDC_MINT, 1000000);
const swap = await api.prepareSwap(SOL_MINT, USDC_MINT, 1000000, 0.5);

Road map

AMM integration

Raydium - Ready
Jupiter Aggregator - In development
Meteora - Planned
Pump.fun - Planned
Orca - Planned

Additional features

Transaction history
Staking integration
Portfolio tracking
Webhook notifications

Support

Need help with API integration? We're here to support your development.