Skip to main content

Instrument Topics

Subscribe to real-time market price updates for various instruments.

Request

{
    "id": "ed72693c-1545-4fa1-8a10-aca7cf5419a6",
    "operation": "Subscribe",
    "data": {
        "topics": ["instrument:<instrumentId>","instrument:<instrumentId>",...],
        "snapshot": <true / false>
    }
}

Response

{
    "messages": [
        {
            "topic": "instrument:100000",
            "content": "{\"Ask\":\"84917.73\",\"Bid\":\"83232.21\",\"LastExecution\":\"84072.94\",\"Date\":\"2025-04-01T08:36:02.8305456Z\",\"NewUnitMargin\":\"83232.21\",\"UnitMarginAsk\":\"84917.73\",\"UnitMarginBid\":\"83232.21\",\"PriceRateID\":\"106439224591\",\"BidDiscounted\":\"84072.94\",\"AskDiscounted\":\"84076.96\",\"UnitMarginBidDiscounted\":\"84072.94\",\"UnitMarginAskDiscounted\":\"84076.96\"}",
            "id": "f1992278-2c4a-4b8f-92d6-8b99f5e1cb00",
            "type": "Trading.Instrument.Rate"
        }
    ]
}

Prettified Content Field

{
    "Ask": "84917.73",
    "Bid": "83232.21",
    "LastExecution": "84072.94",
    "Date": "2025-04-01T08:36:02.8305456Z",
    "NewUnitMargin": "83232.21",
    "UnitMarginAsk": "84917.73",
    "UnitMarginBid": "83232.21",
    "PriceRateID": "106439224591",
    "BidDiscounted": "84072.94",
    "AskDiscounted": "84076.96",
    "UnitMarginBidDiscounted": "84072.94",
    "UnitMarginAskDiscounted": "84076.96"
}

Rate Object Schema

Ask
number <float>
Current asking price (offer) for the instrument. This is the price at which you can buy the asset.
Bid
number <float>
Current bid price for the instrument. This is the price at which you can sell the asset.
LastExecution
number <float>
Price of the most recent trade execution for this instrument.
Date
string <date-time>
The date-time of the price in the system.
NewUnitMargin
number <float>
deprecated
USD equivalent of the instrument price.
UnitMarginAsk
number <float>
deprecated
USD equivalent of the instrument ask price.
UnitMarginBid
number <float>
deprecated
USD equivalent of the instrument bid price.
PriceRateID
integer
Unique identifier of the rate.
BidDiscounted
number <float>
deprecated
Obsolete.
AskDiscounted
number <float>
deprecated
Obsolete.
UnitMarginBidDiscounted
number <float>
deprecated
Obsolete.
UnitMarginAskDiscounted
number <float>
deprecated
Obsolete.

Transaction Updates

Receive real-time updates on transactions and orders from your portfolio.

Request

{
    "id": "ed72693c-1545-4fa1-8a10-aca7cf5419a6",
    "operation": "Subscribe",
    "data": {
        "topics": ["private"],
        "snapshot": <true / false>
    }
}

Response

{
    "messages": [
        {
            "topic": "private",
            "content": "{\"OrderID\":981286176,\"OrderType\":20,\"CID\":32612044,\"StatusID\":11,\"InstrumentID\":1111,\"UnitsToDeduct\":0.0,\"RequestGuid\":\"fca38698-1fcf-407d-b930-3222e57274fa\",\"RequestOccurred\":\"2025-04-01T08:55:53.6910145Z\",\"RequestToken\":\"fca38698-1fcf-407d-b930-3222e57274fa\",\"ErrorCode\":0,\"RequestedUnits\":13.859902,\"ExecutedUnits\":0.0,\"EndRate\":0.0,\"NetProfit\":0.0,\"CloseReason\":0,\"PendingClosePositionIDs\":[2980225895],\"OpenDateTime\":\"2025-04-01T08:55:53.6910145Z\",\"IsInMirror\":false,\"StatusId\":11,\"TotalExternalFees\":0.0,\"TotalExternalTaxes\":0.0,\"LotsToDeduct\":0.0,\"RequestedLots\":13.859902,\"ExecutedLots\":0.0}",
            "id": "5263070a-c52f-436b-8ca8-10b3bd6d2970",
            "type": "Trading.OrderForCloseMultiple.Update"
        }
    ]
}

Prettified Content Field

{
    "OrderID": 981286176,
    "OrderType": 20,
    "CID": 32613364,
    "StatusID": 11,
    "InstrumentID": 1111,
    "UnitsToDeduct": 0,
    "RequestGuid": "fca38698-1fcf-407d-b930-3222e57274fa",
    "RequestOccurred": "2025-04-01T08:55:53.6910145Z",
    "RequestToken": "fca38698-1fcf-407d-b930-3222e57274fa",
    "ErrorCode": 0,
    "RequestedUnits": 13.859902,
    "ExecutedUnits": 0,
    "EndRate": 0,
    "NetProfit": 0,
    "CloseReason": 0,
    "PendingClosePositionIDs": [
        2980225895
    ],
    "OpenDateTime": "2025-04-01T08:55:53.6910145Z",
    "IsInMirror": false,
    "StatusId": 11,
    "TotalExternalFees": 0,
    "TotalExternalTaxes": 0,
    "LotsToDeduct": 0,
    "RequestedLots": 13.859902,
    "ExecutedLots": 0
}