Skip to main content
This guide will help you get started with the SolixDB API and make your first request to query Solana DeFi data.

Prerequisites

  • HTTP client (curl, Postman, or your preferred tool)
  • API key from dashboard.solixdb.xyz
  • Basic understanding of JSON-RPC 2.0 or SQL

API Endpoints

JSON-RPC API

POST https://api.solixdb.xyz/v1/rpc

SQL Query API

POST https://api.solixdb.xyz/v1/query

Making Your First Request

JSON-RPC: Get Transactions

The simplest way to get started is with a basic JSON-RPC request:
curl -X POST "https://api.solixdb.xyz/v1/rpc" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getTransactions",
    "params": [{
      "limit": 10,
      "filters": {
        "protocols": ["drift_v2"]
      }
    }]
  }'

SQL Query: Simple SELECT

Alternatively, you can use SQL queries:
curl -X POST "https://api.solixdb.xyz/v1/query" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "query": "SELECT signature, protocol_name, fee FROM transactions WHERE protocol_name = '\''jupiter_v6'\'' LIMIT 10",
    "format": "json"
  }'
Note: SQL queries automatically get a default LIMIT of 1000 if not specified. Maximum allowed LIMIT is 10,000.

Understanding the Response

JSON-RPC Response

JSON-RPC responses follow the JSON-RPC 2.0 specification:
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "data": [
      {
        "signature": "5VERv8NMxzbPDohNpJhHopN2C9R4G5GaPevYf5hLJ8Z7",
        "slot": "123456789",
        "blockTime": 1735689600,
        "protocolName": "jupiter_v6",
        "fee": 5000,
        "computeUnits": 200000,
        "success": true
      }
    ]
  }
}

SQL Query Response

SQL query responses:
{
  "data": [
    {
      "signature": "5VERv8NMxzbPDohNpJhHopN2C9R4G5GaPevYf5hLJ8Z7",
      "protocol_name": "jupiter_v6",
      "fee": "5000"
    }
  ],
  "count": 10,
  "query": "SELECT signature, protocol_name, fee FROM transactions WHERE protocol_name = 'jupiter_v6' LIMIT 10"
}

Error Responses

If there’s an error, the response will include error information: JSON-RPC:
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32000,
    "message": "Server error",
    "data": "Invalid filter parameter"
  }
}
SQL Query:
{
  "error": "Invalid query",
  "message": "Query must be a non-empty string"
}

Advanced Examples

Get Transactions for Address

Query transactions for a specific Solana address:
const response = await fetch('https://api.solixdb.xyz/v1/rpc', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'getTransactionsForAddress',
    params: [
      'YOUR_ADDRESS_HERE',
      {
        transactionDetails: 'full',
        sortOrder: 'asc',
        limit: 100,
        filters: {
          blockTime: {
            gte: 1735689600,  // Jan 1, 2025
            lte: 1738368000   // Jan 31, 2025
          },
          status: 'succeeded'
        }
      }
    ]
  })
});

const data = await response.json();
console.log('Transactions:', data.result.data);

Get Transaction by Signature

Get a specific transaction by its signature:
const response = await fetch('https://api.solixdb.xyz/v1/rpc', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'getTransaction',
    params: ['TRANSACTION_SIGNATURE_HERE']
  })
});

const data = await response.json();
console.log('Transaction:', data.result);

SQL Query with Filters

Use SQL for complex queries:
const response = await fetch('https://api.solixdb.xyz/v1/query', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    query: `
      SELECT 
        protocol_name,
        COUNT(*) as count,
        AVG(fee) as avg_fee
      FROM transactions
      WHERE protocol_name IN ('jupiter_v6', 'pump_fun')
        AND date >= '2025-01-01'
        AND date <= '2025-01-31'
      GROUP BY protocol_name
      ORDER BY count DESC
    `,
    format: 'json'
  })
});

const data = await response.json();
console.log('Results:', data.data);
Note: The query above will automatically have LIMIT 1000 appended if you don’t specify one. You can add your own LIMIT (up to 10,000).

Supported Protocols

Currently, we support the following DEX protocols:
  • jupiter_v4 - Jupiter Aggregator V4
  • jupiter_v6 - Jupiter Aggregator V6
  • raydium_amm_v3 - Raydium AMM V3
  • raydium_cp_swap - Raydium CP Swap
  • pump_fun - Pump.fun
  • pump_amm - Pump AMM
  • whirlpool - Orca Whirlpool
We’re continuously adding support for more protocols. Check our changelog for updates.

Authentication

All API endpoints require an API key. Include it in the x-api-key header or as an api-key query parameter.
For details on authentication and rate limiting, see our Authentication and Rate Limiting guides.

Next Steps

Now that you’ve made your first request, explore these resources: