Position rounds — one entry and exit cycle per row

GET
/chains/{chain}/wallets/{address}/rounds

A wallet re-enters a token as often as it likes; a round is one buy-to-flat cycle of it. Rounds are what a per-trade PNL view needs, because a single position row averages every cycle together.

Omit token for every token the wallet traded.

Path Parameters

chain*string

chain slug (ton) or numeric chain id (950000)

Length1 <= length <= 32
address*string

the wallet address

Length1 <= length <= 128

Query Parameters

token?string

restrict to one token; omit for every token the wallet traded

Length1 <= length <= 128
state?string
Default"any"

Value in

  • "any"
  • "open"
  • "closed"
limit?integer

page size; plans above startup may raise the ceiling

Formatint32
Range1 <= value <= 100
Default10
cursor?string

opaque cursor from next_cursor or prev_cursor

Lengthlength <= 512

Header Parameters

Accept-Payment?string

payment methods the client can use, comma-separated, case-insensitive. With x402 in the list, a spent keyless budget answers 402 with the x402 challenge instead of 429.

PAYMENT-SIGNATURE?string

base64 x402 v2 payment payload for this request. A paid request skips the keyless budget and is settled only when it answers 2xx. The v1 header X-PAYMENT is accepted too.

Response Body

application/json

application/problem+json

application/problem+json

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/chains/string/wallets/string/rounds"
{  "items": [    {      "token_address": "string",      "round_no": 0,      "opened_by_trade": "string",      "closed_by_trade": "string",      "qty_held": 0.1,      "bought_qty": 0.1,      "sold_qty": 0.1,      "bought_usd": 0.1,      "sold_usd": 0.1,      "avg_entry_price": 0.1,      "avg_exit_price": 0.1,      "realized_pnl_usd": 0.1,      "fees_usd": 0.1,      "max_qty_held": 0.1,      "remaining_ratio": 0.1,      "realized_share": 0.1,      "buy_txs": 0,      "sell_txs": 0,      "first_trade_at": "string",      "first_buy_at": "string",      "last_trade_at": "string",      "last_sell_at": "string",      "closed_at": "string",      "basis_is_incomplete": true,      "exited": true    }  ],  "next_cursor": "string"}