Get swaps

Get a paginated list of fungible token trades.

GET /swaps

This endpoint returns fungible token trades and supports filtering by token, pair, sender, and DEX. Results are paginated and sorted by timestamp by default.

Swap amounts are returned in raw on-chain units and are not normalized by token decimals.

Query params

Query param
Description

token_contract_package_hash

Filter swaps where any of the provided token hashes appear in the swap (comma-separated)

pair_contract_package_hash

Filter by pair contract package hash (comma-separated)

sender_account_hash

Filter by sender account hash (comma-separated)

dex_id

Filter by DEX ids (comma-separated)

includes

Optional fields schema. Supports sender_public_key, sender_account_info{}, sender_centralized_account_info{}, pair_contract_package{}, token0_contract_package{}, token1_contract_package{}, and ft_rate(currency_id,dex_id)

Sorting

Property
Description

timestamp

Sort swaps by timestamp.

Default sorting is timestamp DESC

Optional properties

Property
Type
Description

sender_public_key

string(68)

Sender public key represented as a hexadecimal string

sender_account_info

Sender account info

sender_centralized_account_info

Sender account information available for known accounts provided by CSPR.cloud team

pair_contract_package

Pair contract package details

token0_contract_package

Token0 contract package details

token1_contract_package

Token1 contract package details

token0_ft_rate

float64

Token0 rate in the specified currency at the swap timestamp. It's a function includer that accepts currency_id and dex_id arguments

token1_ft_rate

float64

Token1 rate in the specified currency at the swap timestamp. It's a function includer that accepts currency_id and dex_id arguments

Response

PaginatedResponse<Swap>

Example

Last updated