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

historicalTriggerOrders

Trigger order history, including optional TP/SL children on the trigger. Same shared filters as historicalOrders. Live triggers are triggerOrders.

POST/infotype historicalTriggerOrders

Render the Trigger tab of Order History.paged { data, hasMore, total? }

Request body
typestringrequired

Must be `historicalTriggerOrders`.

"historicalTriggerOrders"
userstring · addressrequired

Account to query. No auth — the body `user` is the subject.

accountTypestring[]optional

Instrument tab: `["perp"]`, `["outcome"]`, or both (`perps` is accepted as an alias).

coinstringoptional

Single instrument — a name (`BTC`, `BTC-USDC`) or the numeric id from `perpMeta`. Prefer this over `contract` for one market.

contractstringoptional

`active` = instruments where this user currently has an open perps position (`szi ≠ 0`). Empty list when there is no position. Do not combine with `coin`.

"all""active"
endTimeMsinteger · uint64optional

Inclusive window end, Unix milliseconds. Alias: `endTime`.

limitinteger · int64optional

Page size. Default `300`; max `2000` (export). Values above 2000 are clamped. `<= 0` is rejected.

offsetinteger · int64optional

Skip this many newest-first rows. Omit or `0` for the first page; page N is `(N - 1) * limit`. Max `200000`. Alias: `from` on some types.

sidestringoptional

Request filter uses `Buy` / `Sell`. Response `side` is usually `B` / `A`.

"Buy""Sell"
startTimeMsinteger · uint64optional

Inclusive window start, Unix milliseconds. Alias: `startTime`.

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": "historicalTriggerOrders",
  "user": "0x0000000000000000000000000000000000000001",
  "offset": 0,
  "limit": 20
}'
Try it
POST https://rpc.txflow-testnet.xyz/info
Response 200
codeinteger

`0` on success.

dataobject
dataHistoricalTriggerOrder[]

Newest-first rows for this page.

hasMoreboolean

`true` when more rows exist after this page. Prefer this over guessing from a missing `total`.

totalinteger · uint64

Omitted when the count is unknown.

successboolean
Response example
{
  "success": true,
  "code": 0,
  "data": {
    "data": [
      {
        "oid": 123456,
        "coin": "BTC",
        "asset": "BTC",
        "side": "B",
        "sz": "0.01",
        "limitPx": "64000.0",
        "triggerPx": "63000.0",
        "orderType": "Stop",
        "reduceOnly": false,
        "leverage": 10,
        "marginMode": "cross",
        "positionMode": "OneWay",
        "createTime": 1720000000000,
        "updateTime": 1720260000000,
        "cloid": "",
        "triggerState": "triggered",
        "triggerTxHash": "",
        "triggerTxTime": 0,
        "triggerPrice": "",
        "cancelSource": "",
        "tpslChildren": [
          {
            "tpslType": "tp",
            "triggerPx": "70000.0",
            "orderType": "Market",
            "limitPx": "0",
            "sz": "0.01",
            "reduceOnly": true,
            "side": "A"
          }
        ]
      }
    ],
    "hasMore": true,
    "total": 1337
  }
}