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 My Balances methods:
  • Asset Query method
  • Asset Subscribe method
  • Asset Unsubscribe method
  1. Exchange API Documentation
  2. Private methods | WEBSOKET

My Assets methods

Used to get the balances of the user from which the request is made. After establishing the WebSocket connection, the user has to be authorized to use this methods.

PreviousAuthorizationNextMy Orders methods

Last updated 7 months ago

List of My Balances methods:

  • - used for one-time data get requests.

  • - used to subscribe to receive real-time updates (when the balance state is changed).

  • - used to unsubscribe from the method.

Asset Query method

Used for one-time data get requests.

Method name

asset.query

Request "params" parameters

Name
Type
Description
Example

asset*

STRING

Assets (empty = all balances, 1 asset = 1 balance for a specific asset, list of assets = list of balances for specific assets)

BTC

Request example 1

{
  "method":"asset.query",
  "params":
    [
      "BTC"
    ],
  "id":1
}

Response parameters

Name
Type
Description

market

STRING

Asset name

available

STRING

Available amount (without active orders)

freeze

STRING

Freezed amount (active orders amount)

Response example 1

{
    "id": 1,
    "params": [
        "BTC"
    ],
    "result": {
        "BTC": {
            "available": "0.000290480096",
            "freeze": "0"
        }
    },
    "error": null
}

Request example 2

{
  "method":"asset.query",
  "params":
    [
      "BTC",
      "ETH",
      "USDT"
    ],
  "id":2
}

Response example 2

{
    "id": 2,
    "params": [
        "BTC",
        "ETH",
        "USDT"
    ],
    "result": {
        "BTC": {
            "available": "0.000290480096",
            "freeze": "0"
        },
        "ETH": {
            "available": "0",
            "freeze": "0"
        },
        "USDT": {
            "available": "42.5282451022304501",
            "freeze": "4.9999999996298992"
        }
    },
    "error": null
}

Request example 3

{
  "method":"asset.query",
  "params":
    [],
  "id":3
}

Response example 3

{
    "id": 3,
    "params": [],
    "result": {
        "AGLD": {
            "available": "0",
            "freeze": "0"
        },
        "MATIC": {
            "available": "0",
            "freeze": "0"
        },
        ...
        },
    "error": null
}

Asset Subscribe method

Used to subscribe to receive real-time updates.

Method

asset.subscribe

Request "params" parameters

Name
Type
Description
Example

asset*

STRING

Assets (empty = all balances, 1 asset = 1 balance for a specific asset, list of assets = list of balances for specific assets)

USDT

Request example

{
  "method":"asset.subscribe",
  "params":
    [
      "USDT"
    ],
  "id":3
}

Response example (successfully subscribed)

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

Response parameters ("asset.update", when the balance state was changed)

Name
Type
Description

market

STRING

Asset name

available

STRING

Available amount (in active orders)

freeze

STRING

Freezed amount (active orders amount)

Response example ("asset.update", when the balance state was changed)

{
    "id": null,
    "method": "asset.update",
    "params": [
        {
            "USDT": {                                     // market
                "available": "42.4487262222304501",       // available
                "freeze": "4.9999999996298992"            // freeze
            }
        }
    ]
}

Asset Unsubscribe method

Method

asset.unsubscribe

Request example

{
  "method":"asset.unsubscribe",
  "params":[],
  "id":4
}

Response example (successfully unsubscribed)

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

Used to unsubscribe from the method.

Asset Query
Asset Subscribe
Asset Unsubscribe
Asset Subscribe
Asset Subscribe