Skip to Content
Blockhash Docs
API referenceTokens
GET
/v1/tokens/{address}/swaps

The newest priced swaps of one token, newest first, optionally filtered by side and size. Pass a page's nextBefore as before for the swaps before it, until nextBefore is null. A filtered page searches back up to a week from its cursor (searchedTo).

Path Parameters

address*string

A 20-byte hex address.

Match^0x[0-9a-fA-F]{40}$

Query Parameters

limit?integer
Range1 <= value <= 100
Default50
before?string

A page's nextBefore, as this route wrote it for the same filters or none. The page holds the swaps older than that page, with none missed or repeated. Omit it for the newest page.

Match^[A-Za-z0-9_-]{1,256}$
side?string

Only the swaps that bought the token (buy) or sold it (sell).

Value in

  • "buy"
  • "sell"
minUsd?number

Only swaps of at least this many dollars, a plain decimal. 0 is no bound.

Range0 <= value <= 1000000000000
maxUsd?number

Only swaps of at most this many dollars, a plain decimal. 0 is no bound, and one under minUsd is bad-filter.

Range0 <= value <= 1000000000000

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v1/tokens/string/swaps"
{  "token": "string",  "source": "indexer",  "swaps": [    {      "spotUsd": 0,      "id": "string",      "txHash": "string",      "logIndex": 0,      "blockNumber": "string",      "timestamp": 0,      "pool": "string",      "venue": "string",      "cash": "string",      "priceUsd": 0,      "volumeUsd": 0,      "side": "buy",      "amountToken": 0,      "amountCash": 0,      "cashSymbol": "string",      "trader": "string",      "sender": "string",      "fee": true,      "deliveredTo": "string",      "solver": true,      "purpose": "liquidity-add"    }  ],  "nextBefore": "string",  "users": {    "property1": {      "address": "string",      "username": "string",      "displayName": "string",      "avatar": "string",      "verified": {        "basis": "x-followers"      },      "x": {        "username": "string"      }    },    "property2": {      "address": "string",      "username": "string",      "displayName": "string",      "avatar": "string",      "verified": {        "basis": "x-followers"      },      "x": {        "username": "string"      }    }  },  "filter": {    "side": "buy",    "minUsd": 0,    "maxUsd": 0  },  "searchedTo": 0}