跳转到主要内容
GET
SDK
单个钱包在单个池中对某代币的成交。钱包匹配其拥有的成交以及由其支付手续费的成交。比较 owner 和 feePayer 即可区分。 每笔成交包含签名、精确的链上位置(slot、txIndex、swapIndex)、美元和 SOL 价格、市值以及交易者(wallet,含 owner 和 feePayer)。完整页面还包含兑换两侧的精确原始数量和 owner 的余额变化、费用和小费、计算资源以及路由。页面中的每个 mint 在 tokens 中只列出一次,每个池在 pools 中只列出一次,每个已知钱包在 wallets 中只列出一次。 返回的页面可能条数不足甚至为空,但 hasNextPage: true。请持续使用 nextCursor 翻页,直到 hasNextPage 为 false。

SDK Example

授权

x-api-key
string
header
必填

API Key for authentication

路径参数

token
string
默认值:6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
必填

代币 mint 地址。

pool
string
默认值:9d9mb8kooFfaD3SctgZtkxQypkshx6ezhbKio89ixyy2
必填

池地址。

wallet
string
默认值:F7R61te4Ac8xZ4pfkJUdF6iaaHy9tnM8nVRUPv8H8EMi
必填

钱包地址。

查询参数

limit
integer
默认值:100

每页成交数,最多 500,默认 100。

必填范围: 1 <= x <= 500
cursor
string

上一页的 nextCursor,原样传入。翻页时其他参数保持不变。/trades 路由返回的游标不能用于此处。

sortDirection
enum<string>
默认值:DESC

DESC 为最新在前(默认),ASC 为最早在前。

可用选项:
DESC,
ASC
time_from
integer

仅返回该时间及之后的成交,Unix 秒。

time_to
integer

仅返回该时间及之前的成交,Unix 秒。time_to 早于 time_from 时返回 400。

fields
enum<string>
默认值:full

basic 返回更轻量的页面:成交不含 from、to、fees、compute 和 route,没有 pools 和 wallets 映射,tokens 中只含名称、符号、精度、图片和供应量。

可用选项:
full,
basic
enrich
enum<string>

配合 fields=basic 使用时,identity 会添加 wallets 映射。完整页面始终包含该映射。

可用选项:
identity
arbitrage
boolean
默认值:false

在 trades 旁添加 arbitrage 数组:本页成交所覆盖的 slot 中,经过该代币(以及路由中的池或钱包)的套利交易。除非 arbitrageComplete 为 false,相邻页面对这些 slot 的覆盖既无缺口也无重叠。套利交易从不计入 trades 或成交量。

响应

一页成交。

trades
object[]
必填
tokens
object
必填

Each mint on the page, once, by mint address: the traded tokens and their quote tokens.

nextCursor
string | null
必填

Pass as cursor for the next page. Null when there is none.

hasNextPage
boolean
必填

A page can be short or empty and still have a next page.

sortDirection
enum<string>
必填
可用选项:
DESC,
ASC
pools
object

The page's pools, by pool address. Left out with fields=basic.

wallets
object

Known wallets on the page, by the wallet field of each trade. With fields=basic, only with enrich=identity.

arbitrage
object[]

Only with arbitrage=true: arbitrage through the token in the slots the page's trades span, in the page's order, at most 500. Each leg carries its own decimals.

arbitrageComplete
boolean

Only with arbitrage=true. False when the search stopped early or failed.

arbitrageFromSlot
integer | null

Only with arbitrage=true. Lowest slot searched.

arbitrageToSlot
integer | null

Only with arbitrage=true. Highest slot searched. Null on the first page of a DESC request.