Skip to content

051asset

杨晓强 edited this page Dec 16, 2020 · 4 revisions

Asset API

  • Acquire Asset

#Example

#Request
{
  "method":"asset.query",
  "params":["BCH","BTC"], # asset list, empty for inquire all
  "id":15
}

#Response
{
  "error": null, 
  "result": {
   "BCH": {
     "available": "1.100000",
     "frozen": "0.1"
     },
   "BTC":{
     "available": "1.100000",
     "frozen": "0.1"
     }
  },
  "id": 15
 }
  • Subscribe Asset

#Example

#Request

{
  "method":"asset.subscribe",
  "params":["BCH"], # asset list
  "id":15
}

#notify
{
  "method": "asset.update", 
  "params": [
   {
   "BCH": {
     "available": "1.100000",
     "frozen": "0.1",
     "timestamp": 1608108497.359855
     }
    }
  ], 
  "id": null
}

HTTP API Introduction

Common API

Market API

Account API

Trading API

Margin API

Contract API

WebSocket API Introduction

Clone this wiki locally