Skip to main content

Trades

Returns recent trade history from both the Launchpad bonding curves and the AMM. Trades are indexed from on-chain events and stored in a TimescaleDB hypertable.

Get Recent Trades

GET /api/trades/recent

Query Parameters

ParameterTypeDefaultDescription
token_addressstring(all tokens)Filter to a specific token’s CW20 contract address
limitnumber50Number of trades to return (1-100)

Examples

# Latest 50 trades across all tokens
curl http://67.205.164.156:3001/api/trades/recent

# Latest 20 trades for a specific token
curl "http://67.205.164.156:3001/api/trades/recent?token_address=xyz1cw20contract...&limit=20"

Response

{
  "trades": [
    {
      "time": "2026-02-19T10:05:30.000Z",
      "block_height": 152345,
      "tx_hash": "A1B2C3D4E5F6...",
      "source": "amm",
      "action": "swap",
      "direction": "xyz_to_token",
      "token_address": "xyz1cw20contract...",
      "price_uxyz": "52000",
      "volume_uxyz": "100000000",
      "volume_token": "1923076923",
      "fee_uxyz": "1000000",
      "trader": "xyz1useraddress...",
      "token_name": "Example Token",
      "token_symbol": "EXT"
    }
  ]
}

Response Fields

FieldTypeDescription
timestringTrade timestamp (ISO 8601)
block_heightnumberBlock where the trade was included
tx_hashstringTransaction hash (use with Chain API to get full tx details)
sourcestring"launchpad" (bonding curve) or "amm" (graduated pool)
actionstringWhat happened: "buy", "sell", "swap", "buy_and_graduate"
directionstring"xyz_to_token" (buy) or "token_to_xyz" (sell)
token_addressstringCW20 contract address of the token traded
price_uxyzstringPrice at time of trade (uxyz per token, scaled by 10^6)
volume_uxyzstringXYZ volume of this trade in uxyz
volume_tokenstringToken volume of this trade in micro-units
fee_uxyzstringFee paid in uxyz
traderstringAddress that executed the trade
token_namestring | nullToken name (joined from token metadata)
token_symbolstring | nullToken symbol

Understanding Actions

ActionSourceMeaning
buylaunchpadBought tokens on the bonding curve
selllaunchpadSold tokens back to the bonding curve
buy_and_graduatelaunchpadBuy that triggered graduation (curve closed, AMM pool created)
swapammSwapped on the AMM (either direction)

Ordering

Trades are returned in reverse chronological order (newest first).