Skip to main content
This walkthrough uses Wrapped Ether (WETH) on Base:
  • Chain: Base, 8453
  • Token: 0x4200000000000000000000000000000000000006
No API key or sign-up is needed. The API does not currently use authentication.
api.example.com is a placeholder host until the public API is announced. Keep the base URL in one config value so it’s easy to change.
1

Get token details

Call GET /token with the token address and the chain. REST accepts the chain as 8453 or evm:8453.
Run the JavaScript REST examples server-side (Node 18+ has fetch). Calling the REST API from a web page on another origin depends on CORS headers, which are not currently guaranteed.
Every successful REST response wraps its payload in the same envelope: status is "success" and the payload is in data. The response below is shortened; the real object has over 100 more fields, most of them rolling stats.
Response (abbreviated)
Errors use a different envelope with status: "error", an HTTP-matching statusCode, a machine-readable code and a message. A token that has not been indexed returns 404 TOKEN_NOT_FOUND. See Responses and errors.
totalSupply is a string in base units (not divided by decimals), while USD values and prices are plain JSON numbers. See Data formats.
2

Fetch candles

Call GET /token/ohlcv for OHLCV candles from the token’s most active pool. period defaults to 1h and limit to 500 (max 2000). Candles are returned oldest first, and t is the bucket start in epoch milliseconds.
Response (abbreviated)
To restrict the window, pass from and to as epoch milliseconds. Values in seconds are accepted but read as dates in 1970.
3

Page through trades

Call GET /trades. Trades are newest first by default (order=desc), limit defaults to 10 (max 100), and each trade carries an opaque cursor.To get the next page, pass the cursor of the last trade on the current page, with the same order and filters. There is no nextCursor or hasMore field: stop when a page has fewer items than limit.
When address is a token, trades come from that token’s two most active pools. Pass a pool address instead to get every trade in one specific pool. See Pagination and limits.
4

Stream live trades

Open a WebSocket to wss://api.example.com/v1/ws and subscribe to the fast-trade channel. On the WebSocket, chain must use the evm:<id> form: "evm:8453". A bare 8453 is rejected.
The server greets you, confirms the subscription, then sends one event per trade:
Server messages
WETH is a quote asset on Base, so a token subscription to WETH delivers trades where WETH is the base of the pair (for example WETH/USDC), not every memecoin/WETH trade. For most tokens this makes no difference. See fast-trade for details, and Cursors and resume for reconnecting without missing trades.

Next steps

REST reference

Every endpoint, parameter and response field.

WebSocket protocol

Messages, heartbeats, cursors, limits and errors.

Build a live price chart

Combine REST candles with the ohlcv channel.

Large trade alerts

Filter every trade on a chain by USD size.