PerformanceBlog
Tempo MCP serverGive agents search and read tools for Tempo docs
Skip to content
LogoLogo

Exchange

Tempo's built-in stablecoin exchange: pairs, swaps, orders, prices.

List swaps

GET/v1/exchange/swaps

List recent swaps on Tempo’s built-in stablecoin exchange. A swap trades one token for another and may contain multiple maker-order fills.

Query Parameters

blockNumber.from
integer·min 0·max 9007199254740991

Only include swaps at or after this block number.

Example23456789
blockNumber.to
integer·min 0·max 9007199254740991

Only include swaps at or before this block number.

Example23456999
chainId

Which Tempo network to query. Use the alias mainnet or testnet, or a numeric chain id. Defaults to mainnet when omitted.

cursor
string

Opaque keyset cursor from a previous response (nextCursor); pass it back verbatim to fetch the next page. Omit for the first (head) page.

ExampleWzIzNDU2Nzg5LDBd
include
string[]

Comma-separated optional resources to embed, e.g. tokens.

Values
tokens
Example["tokens"]
limit
integer·min 5·max 200·default 10

How many items to return per page (5–200, default 10).

Example10
maker
string

Only include swaps that filled against an order owned by this maker address.

Example0xbe058e1c4df8a4366a387bf595b284246a93039e
order
string·default desc

Sort order: desc for descending (the default), or asc for ascending.

Values
ascdesc
Exampledesc
participant
string

Only include swaps where this address participated as the taker or as a maker whose order was filled.

Example0xbe058e1c4df8a4366a387bf595b284246a93039e
taker
string

Only include swaps initiated by this taker address.

Example0xbe058e1c4df8a4366a387bf595b284246a93039e
timestamp.from
string <date-time>

Only include swaps at or after this ISO 8601 timestamp.

Example2024-01-01T00:00:00Z
timestamp.to
string <date-time>

Only include swaps at or before this ISO 8601 timestamp.

Example2024-12-31T23:59:59Z
transactionHash
string

Only include swaps included in this transaction hash.

Example0x515801d7f9a5ac705e793e85904c9c69b3f1694b465cc8fb6ba3f0298dc82665

Responses

List pairs

GET/v1/exchange/pairs

List trading pairs available on Tempo’s built-in stablecoin exchange.

Query Parameters

chainId

Which Tempo network to query. Use the alias mainnet or testnet, or a numeric chain id. Defaults to mainnet when omitted.

cursor
string

Opaque keyset cursor from a previous response (nextCursor); pass it back verbatim to fetch the next page. Omit for the first (head) page.

ExampleWzIzNDU2Nzg5LDBd
include
string[]

Comma-separated optional resources to embed, e.g. tokens,totalCount.

Values
tokenstotalCount
Example["tokens","totalCount"]
limit
integer·min 5·max 200·default 10

How many items to return per page (5–200, default 10).

Example10
order
string·default desc

Sort order: desc for descending (the default), or asc for ascending.

Values
ascdesc
Exampledesc
page
integer·min 1·max 9007199254740991

Page number, 1-indexed (positional pagination for page-numbered access; page=1 is the head page). Mutually exclusive with cursor, and page × limit must be at most 10000 rows — use cursor pagination for deeper traversal. Pages are positional, so rows arriving at the head of a live feed can shift page contents.

Example1
sort
string·default created

Sort key: created orders by when the pair was created, while liquidity ranks by the DEX-held base-token balance as a practical liquidity signal.

Values
createdliquidity
Examplecreated

Responses

List orders

GET/v1/exchange/orders

List resting maker orders on Tempo’s built-in stablecoin exchange. These are open orders waiting in the orderbook.

Query Parameters

base
string

Only include orders for the pair with this base token. The quote token is determined onchain from the base token, so base alone selects the pair; returns 404 if no pair exists.

Example0x20c000000000000000000000b9537d11c60e8b50
chainId

Which Tempo network to query. Use the alias mainnet or testnet, or a numeric chain id. Defaults to mainnet when omitted.

cursor
string

Opaque keyset cursor from a previous response (nextCursor); pass it back verbatim to fetch the next page. Omit for the first (head) page.

ExampleWzIzNDU2Nzg5LDBd
include
string[]

Comma-separated optional resources to embed, e.g. tokens,totalCount.

Values
tokenstotalCount
Example["tokens","totalCount"]
limit
integer·min 5·max 200·default 10

How many items to return per page (5–200, default 10).

Example10
maker
string

Only include orders placed by this maker address.

Example0xbe058e1c4df8a4366a387bf595b284246a93039e
order
string·default desc

Sort order: desc for descending (the default), or asc for ascending.

Values
ascdesc
Exampledesc
page
integer·min 1·max 9007199254740991

Page number, 1-indexed (positional pagination for page-numbered access; page=1 is the head page). Mutually exclusive with cursor, and page × limit must be at most 10000 rows — use cursor pagination for deeper traversal. Pages are positional, so rows arriving at the head of a live feed can shift page contents.

Example1
side
string

Limit results to one side of the orderbook: bid orders pay quote for base, while ask orders sell base for quote.

Values
bidask
Examplebid
sort
string·default tick

Sort key: tick orders by price in standard book order, while time orders by block number and log index.

Values
ticktime
Exampletick

Responses

List order fills

GET/v1/exchange/orders/{orderId}/fills

List fills for one order. A fill records an execution against the maker order.

Path Parameters

orderIdRequired
string

On-chain order id, returned as a decimal string.

Example1

Query Parameters

chainId

Which Tempo network to query. Use the alias mainnet or testnet, or a numeric chain id. Defaults to mainnet when omitted.

cursor
string

Opaque keyset cursor from a previous response (nextCursor); pass it back verbatim to fetch the next page. Omit for the first (head) page.

ExampleWzIzNDU2Nzg5LDBd
include
string[]

Comma-separated optional resources to embed, e.g. totalCount.

Values
totalCount
Example["totalCount"]
limit
integer·min 5·max 200·default 10

How many items to return per page (5–200, default 10).

Example10
order
string·default desc

Sort order: desc for descending (the default), or asc for ascending.

Values
ascdesc
Exampledesc
page
integer·min 1·max 9007199254740991

Page number, 1-indexed (positional pagination for page-numbered access; page=1 is the head page). Mutually exclusive with cursor, and page × limit must be at most 10000 rows — use cursor pagination for deeper traversal. Pages are positional, so rows arriving at the head of a live feed can shift page contents.

Example1

Responses

Get pair

GET/v1/exchange/pairs/{base}

Get one trading pair by its base token address. On Tempo, the quote token for a pair is determined from the base token onchain.

Path Parameters

baseRequired
string

Base token address for the trading pair.

Example0x20c000000000000000000000b9537d11c60e8b50

Query Parameters

chainId

Which Tempo network to query. Use the alias mainnet or testnet, or a numeric chain id. Defaults to mainnet when omitted.

include
string[]

Comma-separated optional resources to embed, e.g. tokens.

Values
tokens
Example["tokens"]

Responses

Get order

GET/v1/exchange/orders/{orderId}

Get one order by id, using live onchain state for fields such as the remaining amount.

Path Parameters

orderIdRequired
string

On-chain order id, returned as a decimal string.

Example1

Query Parameters

chainId

Which Tempo network to query. Use the alias mainnet or testnet, or a numeric chain id. Defaults to mainnet when omitted.

include
string[]

Comma-separated optional resources to embed, e.g. tokens.

Values
tokens
Example["tokens"]

Responses

Get pair OHLC

GET/v1/exchange/pairs/{base}/ohlc

Get OHLC price candles for one trading pair. OHLC means open, high, low, and close over each time bucket for charting.

Path Parameters

baseRequired
string

Base token address for the trading pair.

Example0x20c000000000000000000000b9537d11c60e8b50

Query Parameters

chainId

Which Tempo network to query. Use the alias mainnet or testnet, or a numeric chain id. Defaults to mainnet when omitted.

include
string[]

Comma-separated optional resources to embed, e.g. tokens.

Values
tokens
Example["tokens"]
interval
string·default 1h

Time size for each OHLC candle bucket.

Values
1m5m15m1h4h
Example1h
window
string·default 24h

Rolling time window covered by the OHLC candles.

Values
1h24h7d30d
Example24h

Responses

Get pair depth

GET/v1/exchange/pairs/{base}/depth

Get orderbook depth for one trading pair. Depth shows resting liquidity at price ticks on both sides of the book.

Path Parameters

baseRequired
string

Base token address for the trading pair.

Example0x20c000000000000000000000b9537d11c60e8b50

Query Parameters

chainId

Which Tempo network to query. Use the alias mainnet or testnet, or a numeric chain id. Defaults to mainnet when omitted.

include
string[]

Comma-separated optional resources to embed, e.g. tokens.

Values
tokens
Example["tokens"]
levels
integer·min 1·max 200·default 50

Maximum number of non-empty price levels to return per side (1-200).

Example50

Responses