Skip to main content

Query Details

This endpoint allows batch downloading of trades across the entire platform with filtering capabilities. Ideal for:
  • Downloading all trades for a specific chain
  • Downloading all trades involving a specific token
  • Building historical trade datasets
  • Analytics and backtesting
ParameterRequiredDescription
fromYesStart of timeframe (Unix timestamp in ms or ISO 8601 date)
toYesEnd of timeframe (Unix timestamp in ms or ISO 8601 date)
blockchainNoBlockchain filter (e.g., “solana”, “base”, “ethereum”, “evm:1”)
tokenAddressNoToken address to filter by (matches token0 or token1)
limitNoNumber of results per page (default: 1000, max: 5000)
cursorNoCursor for pagination (from previous response’s nextCursor)
sortOrderNoSort order: asc (default) or desc
Timeframe Limit: The maximum timeframe between from and to is 1 hour (3,600,000 ms). For longer periods, make multiple requests with sequential timeframes.

Response Overview

The response uses the same trade format as /api/2/token/trades for consistency. Pagination object:
  • count: Number of trades returned in this response
  • nextCursor: Cursor to use for fetching the next page (null if no more results)
  • hasMore: Boolean indicating if more results are available
  • from/to: Timestamps of the queried timeframe
Trade object fields:
  • id: Unique swap identifier
  • operation: Operation type (regular, deposit, withdrawal)
  • type: Trade direction (buy, sell, deposit, withdrawal)
  • baseTokenAmount/quoteTokenAmount: Token amounts (formatted)
  • baseTokenAmountRaw/quoteTokenAmountRaw: Token amounts in smallest units
  • baseTokenAmountUSD/quoteTokenAmountUSD: Trade value in USD
  • baseTokenPriceUSD/quoteTokenPriceUSD: Token prices at execution time
  • date: Trade timestamp in milliseconds
  • blockchain: Human-readable blockchain name
  • transactionHash: Transaction hash
  • marketAddress: Pool/market address
  • swapSenderAddress: Address that executed the swap
  • transactionSenderAddress: Transaction originator (tx.from)
  • swapRecipient: Actual beneficiary of the swap
  • baseToken: Base token metadata (address, name, symbol, logo, decimals)
  • quoteToken: Quote token metadata (address, name, symbol, logo, decimals)
  • labels: Array of labels (sniper, bundler, insider, etc.)
  • platform: Trading platform metadata (if available)
  • totalFeesUSD/gasFeesUSD/platformFeesUSD/mevFeesUSD: Fee breakdown

Usage Examples

Download all Solana trades in a 1-hour window:
curl -X GET "https://api.mobula.io/api/2/trades/filters?blockchain=solana&from=1706745600000&to=1706749200000&limit=5000" \
  -H "Authorization: YOUR_API_KEY"
Filter by specific token:
curl -X GET "https://api.mobula.io/api/2/trades/filters?tokenAddress=So11111111111111111111111111111111111111112&from=1706745600000&to=1706749200000&limit=5000" \
  -H "Authorization: YOUR_API_KEY"
Paginate through large result sets:
# First request
curl -X GET "https://api.mobula.io/api/2/trades/filters?blockchain=base&from=1706745600000&to=1706749200000&limit=5000"

# Next page using cursor from previous response
curl -X GET "https://api.mobula.io/api/2/trades/filters?blockchain=base&from=1706745600000&to=1706749200000&limit=5000&cursor=1706745612345:2847563921"

Sample Response

{
  "data": [
    {
      "id": "2847563921",
      "operation": "regular",
      "type": "buy",
      "baseTokenAmount": 150.25,
      "baseTokenAmountRaw": "150250000",
      "baseTokenAmountUSD": 150.25,
      "quoteTokenAmount": 1.5,
      "quoteTokenAmountRaw": "1500000000",
      "quoteTokenAmountUSD": 150.25,
      "date": 1706745612345,
      "swapSenderAddress": "7yBt...sender",
      "transactionSenderAddress": "7yBt...sender",
      "swapRecipient": "7yBt...sender",
      "blockchain": "Solana",
      "transactionHash": "5xKp...abc123",
      "marketAddress": "8xKp...pool123",
      "baseTokenPriceUSD": 1.0,
      "quoteTokenPriceUSD": 100.17,
      "labels": [],
      "baseToken": {
        "address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "name": "USD Coin",
        "symbol": "USDC",
        "logo": "https://assets.coingecko.com/coins/images/6319/small/USD_Coin_icon.png",
        "decimals": 6
      },
      "quoteToken": {
        "address": "So11111111111111111111111111111111111111112",
        "name": "Wrapped SOL",
        "symbol": "SOL",
        "logo": "https://assets.coingecko.com/coins/images/4128/small/solana.png",
        "decimals": 9
      },
      "platform": {
        "id": "raydium",
        "name": "Raydium",
        "logo": "https://..."
      },
      "totalFeesUSD": 0.15,
      "gasFeesUSD": 0.001,
      "platformFeesUSD": 0.149,
      "mevFeesUSD": null
    }
  ],
  "pagination": {
    "count": 5000,
    "nextCursor": "1706745612345:2847563922",
    "hasMore": true,
    "from": 1706745600000,
    "to": 1706749200000
  }
}
Use sortOrder=asc (default) for chronological batch downloads. This ensures consistent cursor-based pagination when downloading historical data.
Base/Quote Token Logic: When filtering by tokenAddress, that token becomes the base token. Without a token filter, token0 is used as base. The type field (buy/sell) is relative to the base token.