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

marketTags

Returns the layout of the markets menu in one call: top-level tabs (l1), the sub-tags under them (l2), and the tags on each instrument (instrumentTags). There is no request body besides type.

POST/infotype marketTags

Build the markets menu: top-level tabs, their sub-tags, and which instruments sit under each.

Request body
typestringrequired

Must be `marketTags`.

"marketTags"
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": "marketTags"
}'
Try it
POST https://rpc.txflow-testnet.xyz/info
Response 200
codeinteger

`0` on success.

dataobject
instrumentTagsobject[]

One row per tagged instrument.

l1object[]

Top-level tabs, ordered by `sort`.

l2object[]

Sub-tags referenced by `l1[].l2Refs` and `instrumentTags[].tagIds`.

versionstring

Layout version. Changes whenever the layout is edited; use it as a cache key.

successboolean

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

Response example
{
  "success": true,
  "code": 0,
  "data": {
    "version": "1791790787734-204",
    "l1": [
      {
        "id": 2,
        "name": "perp",
        "kind": "business_line",
        "businessLine": "perp",
        "sort": 2,
        "enabled": true,
        "deletable": false,
        "l2Refs": [
          1,
          2,
          3,
          4,
          5,
          6,
          7
        ]
      }
    ],
    "l2": [
      {
        "id": 1,
        "name": "Trending",
        "sort": 1,
        "enabled": true
      }
    ],
    "instrumentTags": [
      {
        "instrumentId": 1,
        "instrumentName": "BTC-USDC",
        "businessLine": "perp",
        "tagIds": [
          1,
          2,
          4,
          5
        ]
      }
    ]
  }
}

Building the menu

  1. Render l1 tabs with enabled: true, in sort order.
  2. Under each tab, render the l2 entries listed in its l2Refs, in that order.
  3. A business_line tab lists every instrument whose businessLine matches. A sub-tag lists the instruments whose instrumentTags[].tagIds contain its id.
  4. A favorites tab has no server-side contents; fill it from the user's watchlist.

Cache the response and refetch when version changes.