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 Deals methods:
  • Deals Query method
  • Deals Subscribe method
  • Deals Unsubscribe method
  1. Exchange API Documentation
  2. Public methods | WEBSOKET

Deals methods

Used to get information about the last trade for a specific pair.

PreviousMarket Status methodsNextDepth methods

Last updated 7 months ago

List of Deals methods:

  • - used for one-time data get requests.

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

  • - used to unsubscribe from the method.

Deals Query method

Used for one-time data get requests.

Method

deals.query

Request "params" parameters

Name
Type
Description
Example

market*

STRING

Any public pair

ETH_BTC

limit*

NUMERIC

How many trades to show

2

lastId*

NUMERIC

How many trades to skip

0

Request example

{
  "method":"deals.query",
  "params":
    [
      "ETH_BTC",
      2,
      0
    ],
  "id":1
}

Response "params" and "result" parameters

Name
Type
Description

market

STRING

Pair name

type

STRING

Trade type (buy or sell)

time

NUMERIC

Time in TimeStamp format

id

NUMERIC

ID

amount

STRING

Trade amount (in 1st ticker of pair)

price

STRING

Trade price (in 1st ticker of pair)

Response example

{
    "id": 1,
    "params": [
        "BTC_USDT",                        // market
        2,                                 // limit
        0                                  // lastId
    ],
    "result": [
        {
            "id": 19201768267,             // ID
            "type": "buy",                 // type
            "time": 1.727276247759E9,      // time
            "price": "63865.07",           // price
            "amount": "0.00448678"         // amount
        },
        {
            "id": 19201768100,
            "type": "sell",
            "time": 1.727276246117E9,
            "price": "63860.3281504",
            "amount": "0.00155184"
        }
    ],
    "error": null
}

Deals Subscribe method

Used to subscribe to receive real-time updates.

Method

deals.subscribe

Request "params" parameters

Name
Type
Type
Example

market*

STRING

Any public pair

BTC_USDT

Request example

{
  "method":"deals.subscribe",
  "params":
    [
      "BTC_USDT"
    ],
  "id":1
}

Response example (successfully subscribed)

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

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

Name
Type
Description

market

STRING

Pair name

id

NUMERIC

ID

type

STRING

Trade type (buy or sell)

time

NUMERIC

Time in TimeStamp format

price

STRING

Trade price (in 1st ticker of pair)

amount

STRING

Trade amount (in 1st ticker of pair)

Response example ("deals.update")

{
    "id": null,
    "method": "deals.update",
    "params": [
        "BTC_USDT",                           // market
        [
            {
                "id": 19201677141,            // ID
                "type": "sell",               // type
                "time": 1.727275412302E9,     // time
                "price": "63859.83136",       // price
                "amount": "0.0020744"         // amount
            },
            ...
            ]
    ]
}

Deals Unsubscribe method

Method

deals.unsubscribe

Request example

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

Response example (successfully unsubscribed)

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

Used to unsubscribe from the method.

Deals Query
Deals Subscribe
Deals Unsubscribe
Deals Subscribe
Deals Subscribe