Skip to content

Reference

Common request structure and enum values used by the WebSocket methods of the Public API.

Request Structure

Every request is a JSON object with at least:

FieldTypeRequiredDescription
methodstringYesMethod name: assign, notify, open, open_aggregated, ping, etc.
exchangenumberFor assign, open, open_aggregatedExchange identifier (see below).
market_typenumberFor assign, open, open_aggregated0 = Spot, 1 = Futures.
symbolstringFor assign, open, open_aggregatedDisplay symbol, no separators (e.g. TRXUSDT).
linking_typenumber or stringFor assign (yes); for open (optional)Link color slot. See below and LinkingType in JSON.
titlestringFor open_aggregated (optional) or notifyAggregated set: tab title; if empty, the server can read extra.title. Notify: notification title.
messagestringFor notifyNotification body.
extraobjectNoOptional key-value data (e.g. title for open_aggregated).

Symbol Format

Always use the display symbol without separators. Examples:

  • Correct: TRXUSDT
  • Incorrect: TRX_USDT, TRX-USDT

Different exchanges may show the pair as TRX/USDT or TRX-USDT in the UI; in the API always send the compact form, e.g. TRXUSDT.

Exchange (exchange)

ValueExchange
0Binance
1Bybit
2Okx
3Kucoin
4Gate
5Bitget
6Mexc
7Htx
8HyperLiquid
9Upbit
10BingX
11Aster
12Lighter

Market Type (market_type)

ValueMarket
0Spot
1Futures

LinkingType in JSON

linking_type may be a number (enum int) or a string: a decimal string, or a member name such as Link1, Link2, None (case-insensitive). For assign, a valid link slot is required. For open, the field is optional; resolution follows the same rules as the watchlist and Method - open.

Used by the assign method to choose which linked instrument to update, and by optional open to choose in which color to create the new set. For assign, values 0 (None) and 1 (LinkAuto) are not meaningful; assignable link slots start at 2 (Link1). For open, 0 = unlinked, 1 = LinkAuto (treated as “use available” when creating a new set), 2+ = a specific color.

ValueColor
2Firebrick
3Forest green
4Medium blue
5Yellow
6Purple
7Crimson
8Lime green
9Dark cyan
10Sandy brown
11Hot pink
12Chocolate
13Aquamarine
14Slate blue
15Fuchsia
16Navy
17Orange red
18Deep sky blue
19Gold
20Medium violet red
21Dark olive green

Error responses

Error payloads use "status":"error", a stable numeric error_code (values start at 1000), and a human-readable message.

error_codeTypical situation
1000Request body is not valid JSON.
1001Parsed JSON is empty or not a usable request object.
1002No method field or it is blank.
1003Required fields for the method are missing (for example exchange, market_type, symbol for open).
1004The method value is not supported.
1005Symbol / exchange / market type combination not recognized when opening a set.
1006Aggregated open: no exchanges available for the resolved pair.
1007No workspace window available to host the new instrument set.
1008The workspace could not create the instrument set (check chart / order book layout options).

These codes are reused across methods; method pages include concrete JSON examples.