Skip to content

wallet-cli exchange list

List exchange pairs on chain, one page at a time.

Synopsis

wallet-cli exchange list [--limit <n>] [--offset <n>] [options]

Description

Lists pairs with their id, both tokens, reserves, and creator. Read-only, no account needed. For one pair on its own, use exchange show.

Pair is in the order the chain stored it, which is the order the creator supplied — TRX is not normalized to either side, so 1000124:TRX and TRX:1000123 both occur. The two numbers in Reserves follow that same order.

Reserves here are in minimal units, not whole tokens. This command makes a single RPC and so has no token precisions to divide by; exchange show fetches them and prints whole tokens instead. The same pair therefore reads 6,672 here and 66.72 there.

Paging happens on the node, and there is no total: the chain exposes no count of exchange pairs. The title reports the window it asked for — Exchanges (limit 3, offset 0) — not showing 3 of N, and meta.pagination.total is always null. To get everything, page with --offset until a short page comes back: --limit caps at 1000, and a larger value is rejected with invalid_value.

Options

Option Description
--limit <number> Max pairs to return, 1–1000 (default 10)
--offset <number> Pagination offset (default 0)

Plus the global options.

Examples

wallet-cli exchange list --limit 3 --network nile
Exchanges (limit 3, offset 0)
| ID | Pair        | Reserves (minimal units)           | Creator           |
| -- | ----------- | ---------------------------------- | ----------------- |
| 14 | 1000124:TRX | 2,500,000,000,000 / 50,000,000,000 | TBeta9mR...8pLx   |
| 13 | 1000125:TRX | 16,000,000 / 8,000,000,000         | TAlpha7k...3nQw   |
| 12 | TRX:1000123 | 10,000,000,000 / 500,000,000,000   | TQkXm4vN...5Zt7Uw |
wallet-cli exchange list --limit 3 --network nile -o json
{"schema":"wallet-cli.result.v1","success":true,"command":"exchange.list","data":{"kind":"exchange-list","exchanges":[{"exchangeId":14,"pair":"1000124:TRX","creatorAddress":"TBeta9mR...","firstTokenId":"1000124","firstTokenBalance":"2500000000000","secondTokenId":"_","secondTokenBalance":"50000000000"},{"exchangeId":13,"pair":"1000125:TRX","creatorAddress":"TAlpha7k...","firstTokenId":"1000125","firstTokenBalance":"16000000","secondTokenId":"_","secondTokenBalance":"8000000000"},{"exchangeId":12,"pair":"TRX:1000123","creatorAddress":"TQkXm4vN...","firstTokenId":"_","firstTokenBalance":"10000000000","secondTokenId":"1000123","secondTokenBalance":"500000000000"}]},"meta":{"durationMs":52,"warnings":[],"pagination":{"offset":0,"limit":3,"total":null}},"chain":{"family":"tron","network":"tron:3448148188","chainId":"3448148188"}}

Output

data.kind is exchange-list. data.exchanges[] — one entry per pair:

Field Type Meaning
exchangeId number Pair id
pair string The two sides as tokenA:tokenB, in stored order; TRX is spelled TRX here
creatorAddress string Creator, base58
firstTokenId / secondTokenId string On-chain token ids, in stored order; TRX is "_" — it can be either side
firstTokenBalance / secondTokenBalance string Reserves, raw amounts in each token's smallest unit. Strings: reserves reach int64 and would lose precision as JSON numbers

meta.pagination carries offset, limit, and total — total is always null here, meaning "no count exists", not "zero".

Exit status

0 success · 1 execution failure (rpc_error) · 2 usage error (invalid_value — bad limit or offset).

See also

exchange show · exchange trade · asset list