Knowledge Base
  • 💡Welcome To PointPay
  • 📃WhitePapper v 1.0
    • Disclaimer
    • Market Overview
      • Overview of 2018-2023
      • Evolution and Statement
      • Challenges and Opportunities
    • PointPay 2.0
      • Ecosystem Overview
      • Services Synergy
    • Crypto Exchange
      • Main Benefits
      • Security Measures
      • Customer Support
    • Digital Vault
      • Role in Ecosystem
      • Features and Benefits
      • Integration with other Services
    • PointPay Token
      • Token Info
      • Utility and Benefits
    • Project Future
      • Project Vision
      • Upcoming Features
    • Conclusion
  • 📈Tokenomics
  • ⚖️Token Swap Flow
  • 🔗Network
    • Mainnet&TestNet
    • Smart contracts
      • Contract Deployment
      • Deploy with Remix IDE
      • Deploy with Thirdweb
    • Explorer API
    • RPC API
  • Exchange API Documentation
    • Public endpoints | HTTP
      • Pairs List
      • Pairs Stats
      • Specific Pair Stats
      • Order Book Data
      • Market History
      • Market History Data
      • Products
      • Symbols
      • Depth List
      • Chart Data KLine
    • Private endpoints | HTTP
      • Authentication and API Keys
      • Create Limit Order
      • Cancel Order
      • My Active Orders
      • All My Trade Balances
      • My Specific Trade Balance
      • My Order Info
      • My Trades Info
      • My Order History
      • My Order History List
    • Basic structure | WEBSOKET
    • Public methods | WEBSOKET
      • Ping-Pong
      • System Time
      • KLine methods
      • Market Price methods
      • Market Status methods
      • Deals methods
      • Depth methods
    • Private methods | WEBSOKET
      • Authorization
      • My Assets methods
      • My Orders methods
Powered by GitBook
On this page
  • List of Depth methods:
  • Depth Query method
  • Depth Subscribe method
  • Depth Unsubscribe method
  1. Exchange API Documentation
  2. Public methods | WEBSOKET

Depth methods

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

PreviousDeals methodsNextPrivate methods | WEBSOKET

Last updated 7 months ago

List of Depth methods:

  • - used for one-time data get requests.

  • - used to subscribe to receive real-time updates.

  • - used to unsubscribe from the method.

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

Method

depth.unsubscribe

Request example


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

Response example (successfully unsubscribed)

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

Used to unsubscribe from the method.

Depth Query
Depth Subscribe
Depth Unsubscribe
Depth Subscribe
Depth Subscribe