API Reference

Subscribe to Price Channel

Account Groups

To retrieve the list of account groups associated with the user. Used as parameter for order request.

Request

FieldReq'dTypeDescription
messageTypeYStringaccountGroups

Request Example:

{
    "messageType": "accountGroups"
}

Response

Field

Req'd

Type

Description

timestamp

Y

Long

Unix time

in milliseconds

messageType

Y

String

accountGroups

message

Y

String

Confirmation message

code

Y

String

Error code

accountGroups

N

String

Account groups list

uuid

Y

String

Account group uuid

name

Y

String

Account group name

Response Example:

{
  "timestamp": 1658832215293,
  "messageType": "accountGroups",
  "message": "Account Groups retrieved",
  "code": "",
  "accountGroups": [
    {
      "uuid":"testAccountGroupUuid",
      "name":"testAccountGroupName"
    },
    {
      "uuid":"testAccountGroupUuid2",
      "name":"testAccountGroupName2"
    },
    {
      "uuid":"testAccountGroupUuid3",
      "name":"testAccountGroupName3"
    }
  ]
}

Subscribe

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

Request

Field

Req'd

Type

Description

messageType

Y

String

subscribe

instrument

Y

String

Currency-pair

but with "." as a separator of base currency and quote currency.

tag

N

String

For future use

quantity

Y

Double

Quantity (in 'Currency') up to 20BTC or 250ETH

currency

Y

String

Currency the price stream is quoted in

accountGrpUuid

N

String

Account group ref to use

Request Example:

{
    "messageType": "subscribe",
    "instrument": "BTC.USD",
    "tag": "For future use",
    "quantity": 0.0111,
    "currency": "BTC",
    "accountGrpUuid": ""
}

Response

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

Field

Req'd

Type

Description

timestamp

Y

Long

Unix time

in milliseconds

messageType

Y

String

subscribe

success

Y

bool

Indicates if

subscribeRequest

is successful

true

message

Y

String

Confirmation is successful

subscribed

subscriptionId

Y

String

Stream subscription ID

instrument

Y

String

Currency-pair

but with "." as a separator of base currency and quote currency.

quantity

Y

Double

Quantity of the currency to be delivered

code

N

String

Error code

Response Example:

{
    "timestamp": 84546108725635,
    "messageType": "subscribe",
    "success": true,
    "message": "Subscribed",
    "subscriptionId": "d184314f-73bf-4dea-931e-c3e5c4b5bfce",
    "instrument": "BTC.USD",
    "quantity": "0.002000",
    "code": ""
}

Unsubscribe

Unsubscribe from a 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": "<SUBSCRIPTION_ID>"
}

Response

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

Field

Req'd

Type

Description

timestamp

Y

Long

Unix time

in milliseconds

messageType

Y

String

unsubscribe

success

Y

bool

Indicates if unsubscribe is successful

true

or

false

message

Y

String

Conformation description

instrument

Y

String

Currency-pair

but with "." as a separator of base currency and quote currency.

quantity

Y

Double

Requested Quantity

Response Example:

{
    "timestamp": 137169153651952,
    "messageType": "unsubscribe",
    "success": true,
    "message": "Subscription with the ID <SUBSCRIPTION_ID> was cancelled!",
    "instrument": "BTC.USD",
    "quantity": 0.011100
}

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 unlikely event the connection is lost users can download their transactions for reconciliation.

Heartbeats are not supported.

Field

Req'd

Type

Description

timestamp

Y

Long

Unix time

in milliseconds

messageType

Y

String

priceStream

instrument

Y

String

Currency-pair

but with "." as a separator of base currency and quote currency.

quoteId

Y

String

Quote ID

tag

N

String

Testing purposes

offer

Y

Offer

↳ price

Y

Double

Quote Offer Price

↳ quantity

Y

Double

Quote Offer Quantity

bid

Y

Bid

↳ price

Y

Double

Quote Bid Price

↳ quantity

Y

Double

Quote Bid Quantity

{
    "timestamp": 408740417388844,
    "messageType": "priceStream",
    "instrument": "BTC.USD",
    "quoteId": "dHs2UwjxfwqwOIXKfGHq1NHtDWEA6UTTvc4aTQD8yHQ+9wXks1bkB9Ey6LbqeAuDsg==",
    "tag": "",
    "offer": {
        "price": 38956.140000,
        "quantity": 0.0256
    },
    "bid": {
        "price": 38868.880000,
        "quantity": 0.0257
    }
}