Skip to content

Method - assign

Changes the linked symbol for a given link color slot. It does not open a new chart or instrument set — use open (or open_aggregated) for that.

Typical flow: if you need to change the linked symbol for an existing set of instruments, assign that slot; if you need to open a new set of instruments, open.

assign is for switching what linked panels follow (e.g. Red/Green/Blue links). Having several linked views open (Spot/Futures) may make the result easier to see, but is not required for the call to take effect.

Request

FieldTypeRequiredDescription
methodstringYesMust be "assign".
exchangenumberYesExchange id. See Reference.
market_typenumberYes0 = Spot, 1 = Futures.
symbolstringYesDisplay symbol, e.g. TRXUSDT. See Reference.
linking_typenumber or stringYesLink color slot (e.g. 2 or "Link1"). See Reference and Link color.

Example

json
{
  "method": "assign",
  "exchange": 0,
  "market_type": 1,
  "symbol": "TRXUSDT",
  "linking_type": 2
}

This assigns Binance Futures TRXUSDT to the Red link.

Response

Success:

json
{
  "status": "ok"
}

Error (invalid JSON):

json
{
  "status": "error",
  "error_code": 1000,
  "message": "Invalid JSON format."
}

Error (empty/malformed):

json
{
  "status": "error",
  "error_code": 1001,
  "message": "Empty or malformed request."
}

Error (missing method):

json
{
  "status": "error",
  "error_code": 1002,
  "message": "Missing 'method' field."
}

Error (unknown method):

json
{
  "status": "error",
  "error_code": 1004,
  "message": "Unknown or unsupported method '...'."
}

If the symbol is not found for the given exchange and market type, the server still returns success as above ("status":"ok"); the link is only updated when the currency pair exists.