Depth methods

Used to get information on order books for a specific pair.

List of Depth methods:

Depth Query method

Used for one-time data get requests.

Method

depth.query

Request "params" parameters

Name
Type
Description
Example

market*

STRING

Any public pair

BTC_USDT

limit*

NUMERIC

Limit of order quantity

1

interval*

STRING

Interval (defoult = 1, no interval: 0, step = 1)

0

Request example

{
  "method":"depth.query",
  "params":
    [
      "BTC_USDT",  // market
      1,          // limit
      "0"         // interval
    ],
  "id":1
}

Response "result" parameters

Name
Type
Description

type

STRING

Order type (ask = sell, bid = buy)

price

STRING

Order price (in 1st ticker of the pair)

amount

STRING

Order amount (in 1st ticker of the pair)

Response example

{
    "id": 1,
    "params": [
        "BTC_USDT",
        1,
        "0"
    ],
    "result": {
        "asks": [                   // type
            [
                "63552.1228986",   // price
                "0.328856"         // amount
            ]
        ],
        "bids": [                  // type
            [
                "63544.4971014",   // price
                "0.313271"         // amount
            ]
        ]
    },
    "error": null
}

Depth Subscribe method

Used to subscribe to receive real-time updates.

Method

depth.subscribe

Request "params" parameters

Name
Type
Type
Example

market*

STRING

Any public pair

BTC_USDT

limit*

NUMERIC

Number of orders

1

interval*

STRING

Interval (defoult = 1, no interval: 0, step = 1)

0

Request example

{
  "method":"depth.subscribe",
  "params":
    [
      "BTC_USDT",    // market
      1,            // limit
      "0"           // interval
    ],
  "id":1
}

Response example (successfully subscribed)

{
    "id": 1,
    "params": [],
    "result": {
        "status": "success"
    },
    "error": null
}

Response "params" parameters ("depth.update")

Name
Type
Description

status

BOOLEAN

FALSE = returned latest result, TRUE = no updates

type

STRING

Order type (ask = sell, bid = buy)

price

STRING

Order price (in 1st ticker of the pair)

amount

STRING

Order amount (in 1st ticker of the pair)

market

STRING

Pair name

Response example ("depth.update")

{
  "method": "depth.update",
  "params":
    [
      true,                  // status
        {
          "asks":            // type
            [
              [
                "0.018519", // price
                "120.6"     // amount
              ]
            ],
          "bids":
            [
              [
                "0.01806",    // price
                "90.31637262" // amount
              ]
            ]
        },
      "BTC_USDT"             // market
    ],
  "id": null
}

Depth Unsubscribe method

Used to unsubscribe from the Depth Subscribe method.

Method

depth.unsubscribe

Request example


{
  "method":"depth.unsubscribe",
  "params":[],
  "id":2
}

Response example (successfully unsubscribed)

{
    "id": 2,
    "params": [],
    "result": {
        "status": "success"
    },
    "error": null
}