Subscribe request

Subscribe Message

SubscribeRequest

Subscribe to a price stream of bids and asks, in the requested pair, with respect to the requested settlement quantity, which may be in base or terms as specified in currency.

Request

FieldReq'dTypeDescription
messageTypeYStringsubscribe
instrumentYStringcurrency-pair
tagNStringFor future use
quantityYDoubleQuantity (in 'Currency')
currencyYStringCurrency the price stream is quoted in. Should be either the base or quote currency
accountGrpUuidNStringAccount group ref to use (SeeAccount Groups Message. If left blank will use default account.
tenorNStringThe settlement date of the stream:

- "SP": Spot. For immediate settlement
- TOD: Today. For settlement today (or next available settlement date)
- TOM: Tomorrow. For settlement T+1 (or next available after T+1)
Defaults to SP if not specified

Request Example:

{
    "messageType": "subscribe",
    "instrument": "AED.USDC",
    "tag": "For future use",
    "quantity": 100000,
    "currency": "AED",
    "accountGrpUuid": "",
    "tenor": "TOD"
}

Response

Indicates if the subscription is successful and if not, message field will indicate reason.

FieldReq'dTypeDescription
timestampYLongUnix time in milliseconds
messageTypeYStringsubscribe
successYboolIndicates if subscribeRequest is successful true
messageYStringConfirmation is successful subscribed
subscriptionIdYStringStream subscription ID
tagNStringFor future use
instrumentYStringCurrency-pair
quantityYDoubleQuantity of the currency to be delivered
codeNStringError code
tenorNStringThe tenor that was requested in the subscription
settleDateNStringBlank field

Response Example:

{
    "timestamp": 1718110925811,
    "messageType": "subscribe",
    "success": true,
    "message": "Subscribed",
    "subscriptionId": "13f07bc9-055f-4054-bb78-73fe9f325ee6",
    "tag": "test-tag",
    "instrument": "AED.USDC",
    "quantity": "100000.000000",
    "code": "",
    "tenor": "TOD",
    "settleDate": ""
}

Unsubscribe

Unsubscribe from a previously requested price stream by sending the subscriptionId of the desired quote/price stream to terminate.

Request

FieldReq'dTypeDescription
messageTypeYStringunsubscribe
subscriptionIdYStringSubscription ID of the priceStream to be unsubscribed

Request Example:

{
    "messageType": "unsubscribe",
    "subscriptionId": "13f07bc9-055f-4054-bb78-73fe9f325ee6"
}

Response

Indicates if the unsubscription is successful and if not, message field will indicate reason.

FieldReq'dTypeDescription
timestampYLongUnix time in milliseconds
messageTypeYStringunsubscribe
successYboolIndicates if unsubscribe is successful true or false
subscriptionIdYStringThe Subscription ID specified in the request
messageYStringConformation description
instrumentYStringCurrency-pair
quantityYDoubleRequested Quantity
tenorYStringTenor that was subscribed for

Response Example:

{
    "timestamp": 1718111157195,
    "messageType": "unsubscribe",
    "success": true,
    "subscriptionId": "2ffc8d0c-21f5-4364-b2a6-4007218e57ee",
    "message": "Cancelled subscription 2ffc8d0c-21f5-4364-b2a6-4007218e57ee, client session 8c17bf72-b7f4-4a1c-86f1-5fb28d21e433, userUuid 7687282f-1073-441b-9ff4-694e6b49effe for USDC for 100000 AED",
    "instrument": "AED.USDC",
    "quantity": "100000.000000",
    "tenor": "TOD"
}

Price Stream

Response

The response contains a two way price (bid and offer) with respective quantities available for trading (partial fills are not available). The full order book is not sent at every tick rather, an updated quote for the subscribed quantity is sent. New prices will automatically replace the previous prices.

In the event the connection is lost users can download their transactions for reconciliation.

Heartbeats are not supported.

FieldReq'dTypeDescription
timestampYLongUnix time in milliseconds
messageTypeYStringpriceStream
instrumentYStringCurrency-pair
quoteIdYStringUnique Quote ID
tagNStringFor future use
offerYOffer
↳ priceYDoubleQuote Offer Price
↳ quantityYDoubleQuote Offer Quantity
bidYBid
↳ priceYDoubleQuote Bid Price
↳ quantityYDoubleQuote Bid Quantity
tenorNStringThe settlement date of the stream:

- "SP": Spot. For immediate settlement
- TOD: Today. For settlement today (or next available settlement date)
- TOM: Tomorrow. For settlement T+1 (or next available after T+1)
Defaults to SP if not specified
settleDateNStringThe actual settlement date of the quote YYYMMDD
{
    "timestamp": 1718111156238,
    "messageType": "pricestream",
    "instrument": "AED.USDC",
    "quoteId": "MZ0KaK9qbSP2Fx0umsA6iUDBaUGF/OSWqEE/6TcFVq4GcrcnHl299L7QzkANoiUDbZetOSVaXTIZcD8gW+1dISMFNxYJFTAWdnhqECVvfWg1dgcEXd4ZMjZMFUiVzxtCTUu9xAXfJhI3FiUbJK2h76ydkbom7CnqAMCoTgmBLSmbv1zFDwo9PQVOcSw6JDkvS0NhOhIZFBUldGA2MHE+PgEVQjEefTovGmwpKwoBATwhL1NWDgEdDXoKExEdYAQzPHgSIAsrBFMlPzcwaDsyGBQcOQE6IzYSHn1eNTwJMiwNEik2MCsvDDoJAhczBzoIegoPKTVtJSUlASwCIytUAxEGJi4=",
    "tag": "test-tag",
    "offer": {
        "price": "1.199000",
        "quantity": "83402.83569641"
    },
    "bid": {
        "price": "0.910000",
        "quantity": "109890.10989010"
    },
    "tenor": "TOD",
    "settleDate": "20240912"
}