Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

trades

Returns the latest 300 public trades for one instrument, newest first. Use it to seed a trade tape, then append live trades from the trades stream.

POST/infotype trades

Seed the public trade tape for one instrument with its latest 300 trades.

Request body
coinstringrequired

Numeric instrument id as a string. For an Outcome market, its instrument id.

typestringrequired

Must be `trades`.

"trades"
Request example
curl -X POST https://rpc.txflow-testnet.xyz/info \
  -H "Content-Type: application/json" \
  -H "x-api-version: 2026-08-16" \
  -d '{
  "type": "trades",
  "coin": "1"
}'
Try it
POST https://rpc.txflow-testnet.xyz/info
Response 200
codeinteger

`0` on success.

dataobject[]

Up to 300 trades, newest first.

coinstring

Base name.

hashstringnullable

Transaction hash.

instrumentIdinteger
instrumentTypestring

`perps` or `outcome`.

marketTypestring

`perps` or `outcome`.

pxstring

Fill price.

sidestring

Taker side: "B" = buy, "A" = sell.

"B""A"
szstring

Fill size in base units.

tidinteger

Trade id.

timeinteger

Unix ms.

usersstring · address[]

The two counterparties.

symbolstring

Instrument name.

successboolean

`false` on error, with `code` set and the text in `message` instead of `data`.

Response example
{
  "success": true,
  "code": 0,
  "data": [
    {
      "coin": "BTC",
      "symbol": "BTC-USDC",
      "side": "A",
      "px": "83360.3",
      "sz": "0.0055",
      "time": 1792575622796,
      "hash": "0xd9ba89f9d68bff4d4c01d95523497476ec02037c0e4e3561ad0ef346aba79e42",
      "tid": 336565592000002,
      "users": [
        "0x34136bc0647cd22c1ce37a2d32306004897d317c",
        "0x079e74e124151e4a411df17ea7e3ef97f4d049e3"
      ],
      "instrumentId": 1,
      "instrumentType": "perps",
      "marketType": "perps"
    }
  ]
}

coin is the numeric instrument id as a string ("1" for BTC-USDC; see perpMeta). Outcome markets use the same field with their instrument id. side is the taker's side. De-duplicate against the stream by tid.