-
Notifications
You must be signed in to change notification settings - Fork 3
REST_API_Reference
Important: For full request format, please refer to API Request and Response Format, the following API interface description is not full.
Table of Contents
- Spot trading
- Credit Trading
- Transfer Assets
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|
POST request method: ping
The description of return result
{
"result": {}, //Test succeed
"cmd":"ping"
}
Example
// Request
{
"cmd": "ping"
"body": {}
}
// Response
{
"result": {},
"cmd":"ping"
}
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|
POST request method: api/pairList
The description of return result
{
"result":[
{
"id":1,// pair id
"pair":"BIX_BTC" // pair symbol
},
{
"id":2,
"pair":"ETH_BTC"
}
],
"cmd":"api/pairList"
}
Example
// Request
{
"cmd": "api/pairList"
"body": {}
}
// Response
{
"result":[
{"id":1,"pair":"BIX_BTC"},
{"id":2,"pair":"ETH_BTC"}
],
"cmd":"api/pairList"
}
- GET https://api.bibox.com/v1/mdata?cmd=kline&pair=BIX_BTC&period=1min&size=10
- POST https://api.bibox.com/v1/mdata
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
pair | true | string | Trading pair | BIX_BTC, ETH_BTC, ... | |
period | true | string | K line period | '1min', '3min', '5min', '15min', '30min', '1hour', '2hour', '4hour', '6hour', '12hour', 'day', 'week' | |
size | false | integer | how many | 1000 | 1-1000 |
POST request method: api/kline
The description of return result
{
"result":[
{
"time":1512660420000, // Timestamp
"open":"0.00586568", // Opening Price
"high":"0.00586568", // The highest price
"low":"0.00586568", // The lowest price
"close":"0.00586568", // Closing Price
"vol":"0" // Trading Volume
},
{
"time":1512660480000,
"open":"0.00586568",
"high":"0.00586568",
"low":"0.00586568",
"close":"0.00586568",
"vol":"10"
}
],
"cmd":"api/kline"
}
Example
// Request
{
"cmd": "api/kline"
"body": {
"pair": "BIX_BTC",
"period": "1min",
"size": 10
}
}
// Response
{
"result":[
{
"time":1512660420000,
"open":"0.00586568",
"high":"0.00586568",
"low":"0.00586568",
"close":"0.00586568",
"vol":"0"
},
{
"time":1512660480000,
"open":"0.00586568",
"high":"0.00586568",
"low":"0.00586568",
"close":"0.00586568",
"vol":"10"
}
],
"cmd":"api/kline"
}
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|
POST request method: api/marketAll
The description of return result
{
"result":{
"id":4,
"coin_symbol":"BIX", //Trading Token
"currency_symbol":"BTC", //Pricing Token
"last":"0.00002704", //24h the lastest price
"high":"0.00003480", //24h the highest price
"low":"0.00001951", //24h the lowest price
"change":"+0.00000715", //24h price change
"percent":"+35.95%", //24h price change percentage
"vol24H":"641954", //24h Trading Volume
"amount":"16.55", //24h Trading Amount
"last_cny":"1.84", //The lastest price equivelant to CNY
"high_cny":"2.37",
"low_cny":"1.33",
"last_usd":"0.27", //The lastest price equivalent to USD
"high_usd":"0.35",
"low_usd":"0.19"
},
"cmd":"api/marketAll"
}
Example
// Request
{
"cmd": "api/marketAll"
"body": {}
}
// Response
{
"result":[
{
"id":4,
"coin_symbol":"BIX",
"currency_symbol":"BTC",
"last":"0.00002704",
"high":"0.00003480",
"low":"0.00001951",
"change":"+0.00000715",
"percent":"+35.95%",
"vol24H":"641954",
"amount":"16.55",
"last_cny":"1.84",
"high_cny":"2.37",
"low_cny":"1.33",
"last_usd":"0.27",
"high_usd":"0.35",
"low_usd":"0.19"
},
{
"id":5,
"coin_symbol":"ETH",
"currency_symbol":"BTC",
"last":"0.04341296",
"high":"0.04884176",
"low":"0.04321405",
"change":"-0.00047878",
"percent":"-1.09%",
"vol24H":"86",
"amount":"3.77",
"last_cny":"2950.87",
"high_cny":"3319.88",
"low_cny":"2937.35",
"last_usd":"432.60",
"high_usd":"486.70",
"low_usd":"430.62"
}
],
"cmd":"api/marketAll"
}
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
pair | true | string | Trading pair | BIX_BTC, ETH_BTC, ... |
POST request method: api/market
The description of return result
{
"result":{
"id":4,
"coin_symbol":"BIX", //Trading Token
"currency_symbol":"BTC", //Pricing Token
"last":"0.00002704", //24h the lastest price
"high":"0.00003480", //24h the highest price
"low":"0.00001951", //24h the lowest price
"change":"+0.00000715", //24h price change
"percent":"+35.95%", //24h price change percentage
"vol24H":"641954", //24h Trading Volume
"amount":"16.55", //24h Trading Amount
"last_cny":"1.84", //The lastest price equivelant to CNY
"high_cny":"2.37",
"low_cny":"1.33",
"last_usd":"0.27", //The lastest price equivalent to USD
"high_usd":"0.35",
"low_usd":"0.19"
},
"cmd":"api/market"
}
Example
// Request
{
"cmd": "api/market"
"body": {
"pair": "BIX_BTC"
}
}
// Response
{
"result":[
{
"id":4,
"coin_symbol":"BIX",
"currency_symbol":"BTC",
"last":"0.00002704",
"high":"0.00003480",
"low":"0.00001951",
"change":"+0.00000715",
"percent":"+35.95%",
"vol24H":"641954",
"amount":"16.55",
"last_cny":"1.84",
"high_cny":"2.37",
"low_cny":"1.33",
"last_usd":"0.27",
"high_usd":"0.35",
"low_usd":"0.19"
}
],
"cmd":"api/market"
}
- GET https://api.bibox.com/v1/mdata?cmd=depth&pair=BIX_BTC&size=10
- POST https://api.bibox.com/v1/mdata
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
pair | true | string | Trading pair | BIX_BTC, ETH_BTC, ... | |
size | false | integer | how many | 200 | 1-200 |
POST request method: api/depth
The description of return result
{
"result":{
"pair":"BIX_BTC",
"update_time":1510983122681,
"asks":[ //The depth of sellers
{
"price":"0.008654", //The price of pending order
"volume":"200.9123" //The price of pending orders
}
],
"bids":[ //The depth of buyers
{
"price":"0.008596", //The price of pending order
"volume":"18.54306495" //The price of pending orders
},
{
"price":"0.00859289",
"volume":"40.13567123"
}
]
},
"cmd":"api/depth"
}
Example
// Request
{
"cmd": "api/depth"
"body": {
"pair": "BIX_BTC"
}
}
// Response
{
"result":{
"pair":"BIX_BTC",
"update_time":1510983122681,
"asks":[ //The depth of sellers
{
"price":"0.008654", //The price of pending orders
"volume":"200.9123" //The volume of pending orders
}
],
"bids":[ //The depth of buyers
{
"price":"0.008596", //The price of pending orders
"volume":"18.54306495" //The volume of pending orders
},
{
"price":"0.00859289",
"volume":"40.13567123"
}
]
},
"cmd":"api/depth"
}
- GET https://api.bibox.com/v1/mdata?cmd=deals&pair=BIX_BTC&size=10
- POST https://api.bibox.com/v1/mdata
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
pair | true | string | Trading pair | BIX_BTC, ETH_BTC, ... | |
size | false | integer | how many | 200 | 1-200 |
POST request method: api/deals
The description of return result
{
"result":[
{
"pair":"LTC_BTC",
"price":"0.008601", //Trading price
"amount":"24.12584739", //Trading amount
"time":"1512721748000", //Trading time
"side":2 //Taker trading side 1-Buy, 2-Sell
},
{
"pair":"LTC_BTC",
"price":"0.008611", //Trading price
"amount":"24.23584739", //Trading amount
"time":"1512721748000", //Trading time
"side":2 //Taker trading side 1-Buy, 2-Sell
}
],
"cmd":"api/deals"
}
Example
// Request
{
"cmd": "api/deals"
"body": {
"pair": "LTC_BTC"
}
}
// Response
{
"result":[
{
"pair":"LTC_BTC",
"price":"0.008601", //Trading price
"amount":"24.12584739", //Trading amount
"time":"1512721748000", //Trading time
"side":2 //Taker trading side 1-Buy, 2-Sell
},
{
"pair":"LTC_BTC",
"price":"0.008611", //Trading price
"amount":"24.23584739", //Trading amount
"time":"1512721748000", //Trading time
"side":2 //Taker trading side 1-Buy, 2-Sell
}
],
"cmd":"api/deals"
}
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
pair | true | string | Trading pair | BIX_BTC, ETH_BTC, ... |
POST request method: api/ticker
The description of return result
{
"result":{
"pair":"BIX_BTC", //Trading pair
"buy":"0.00582132", //The highest bid price
"buy_amount":"1", //The highest bid amount
"high":"0.00778847", //24h The highest price
"last":"0.00582156", //The lastest trading price
"low":"0.00540611", //24h The lowest price
"sell":"0.00582152", //The lowest ask price
"sell_amount":"1", //The lowest ask amount
"timestamp":1510983122665, //Timestamp
"vol":"70.50811953" //24h trading volume
"percent":"+10.02%" //24h price change percentage
"last_cny":"621.53", //The lastest trading price,equivalent to CNY
"last_usd":"93.93" //The lastest trading price,equivalent to USD
},
"cmd":"api/ticker"
}
Example
// Request
{
"cmd": "api/ticker"
"body": {
"pair": "BIX_BTC"
}
}
// Response
{
"result":{
"pair":"BIX_BTC", //Trading pair
"buy":"0.00582132", //The highest bid price
"buy_amount":"1", //The highest bid amount
"high":"0.00778847", //24h The highest price
"last":"0.00582156", //The lastest trading price
"low":"0.00540611", //24h The lowest price
"sell":"0.00582152", //The lowest ask price
"sell_amount":"1", //The lowest ask amount
"timestamp":1510983122665, //Timestamp
"vol":"70.50811953" //24h trading volume
"percent":"+10.02%" //24h price change percentage
"last_cny":"621.53", //The lastest trading price,equivalent to CNY
"last_usd":"93.93" //The lastest trading price,equivalent to USD
},
"cmd":"api/ticker"
}
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|
The description of return result
{
"result":{
"min_trade_price":{ //the minimum price
"default":"0.00000001", //the default minimum price, applies to all PAIRs except the PAIRs of USDT-denominated and DAI-denominated
"USDT":"0.0001", //the minimum price applies to the PAIRs of USDT-denominated, more than 0.0001 of the decimal part will be automatically discarded
"DAI":"0.0001" //the minimum price applies to the PAIRs of DAI-denominated, more than 0.0001 of the decimal part will be automatically discarded
},
"min_trade_amount":{ //the minimum amount
"default":"0.0001" //the minimum amount applies to all PAIRs, more than 0.0001 of the decimal part will be automatically discarded
},
"min_trade_money":{ //the minimum money (money = price * amount)
"USDT":"1", //the minimum money applies to the PAIRs of USDT-denominated
"DAI":"1", //the minimum money applies to the PAIRs of DAI-denominated
"GUSD":"1",
"BIX":"3",
"BTC":"0.0002",
"ETH":"0.005"
}
},
"cmd":"tradeLimit"
}
POST https://api.bibox.com/v1/transfer
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
select | false | integer | View or not the asset details | 0-The total assets of all tokens, 1-the asset details of all tokens |
POST request method: transfer/assets
The description of return result
{
"result":{
"total_btc":"107.71371658", //The total assets of all tokens, equivalent to BTC
"total_cny":"5587362.53", //The total assets of all tokens, equivalent to CNY
"total_usd":"4000.30", //The total assets of all tokens, equivalent to USD
"assets_list":[ //The asset details of tokens
{
"coin_symbol":"BTC",
"balance":"102.31666784", //Available
"freeze":"0.01800000", //Freeze
"BTCValue":"1100.35043000", //equivalent to BTC
"CNYValue":"59448654.69", //equivalent to CNY
"USDValue":"8945419.86", //equivalent to USD
},
{
"coin_symbol":"ETH",
"balance":"100.00000000",
"freeze":"0.00000000",
"BTCValue":"1100.35043000",
"CNYValue":"59448654.69",
"USDValue":"8945419.86",
},
{
"coin_symbol":"LTC",
"balance":"125.34853787",
"freeze":"0.00000000",
"BTCValue":"1100.35043000",
"CNYValue":"59448654.69",
"USDValue":"8945419.86",
},
{
"coin_symbol":"BIX",
"balance":"712.79411732",
"freeze":"0.00000000",
"BTCValue":"1100.35043000",
"CNYValue":"59448654.69",
"USDValue":"8945419.86",
}
]
},
"cmd":"transfer/assets"
}
Example
// Request
{
"cmd": "transfer/assets"
"body": {
"select": 1
}
}
// Response
{
"result":{
"total_btc":"107.71371658",
"total_cny":"5587362.53",
"total_usd":"4000.30",
"assets_list":[
{
"coin_symbol":"BTC",
"balance":"102.31666784",
"freeze":"0.01800000",
"BTCValue":"1100.35043000",
"CNYValue":"59448654.69",
"USDValue":"8945419.86",
},
{
"coin_symbol":"ETH",
"balance":"100.00000000",
"freeze":"0.00000000",
"BTCValue":"1100.35043000",
"CNYValue":"59448654.69",
"USDValue":"8945419.86",
},
{
"coin_symbol":"LTC",
"balance":"125.34853787",
"freeze":"0.00000000",
"BTCValue":"1100.35043000",
"CNYValue":"59448654.69",
"USDValue":"8945419.86",
},
{
"coin_symbol":"BIX",
"balance":"712.79411732",
"freeze":"0.00000000",
"BTCValue":"1100.35043000",
"CNYValue":"59448654.69",
"USDValue":"8945419.86",
}
]
},
"cmd":"transfer/assets"
}
POST https://api.bibox.com/v1/transfer
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
coin_symbol | true | string | deposit Token | BIX, EOS, ... |
POST request method: transfer/transferIn
The description of return result
{
"result":"xxxxxxxxxxxxxxxxx", // deposit address
"cmd":"transfer/transferIn"
}
Example
// Request
{
"cmd": "transfer/transferIn"
"body":{
"coin_symbol":"BIX"
}
}
// Response
{
"result":"xxxxxxxxxxxxxxxxx", // deposit address
"cmd":"transfer/transferIn"
}
POST https://api.bibox.com/v1/transfer
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
coin_symbol | true | string | withdraw Token | BIX, ETH, ... | |
amount | true | double | withdraw amount | ||
totp_code | false | integer | google code | New address required,Old address ignored | |
trade_pwd | false | string | trade password | New address required,Old address ignored | |
addr | true | string | withdraw address | ||
addr_remark | true | string | the remark of withdraw address | ||
memo | false | string | withdraw tag | memo is required for some tokens, such as EOS |
POST request method: transfer/transferOut
The description of return result
{
"result":228 //withdrawal id
"cmd":"transfer/transferOut"
}
Example
// Request
{
"cmd": "transfer/transferOut"
"body":{
"coin_symbol":"BIX",
"amount":1,
"totp_code":703634,
"trade_pwd":"12345678",
"addr":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"addr_remark":"bibox-1",
"memo":"",
}
}
// Response
{
"result":228 // withdrawal id
"cmd":"transfer/transferOut"
}
POST https://api.bibox.com/v1/transfer
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
filter_type | false | integer | filter type | 0 | 0-all,1-deposit is in process,2-deposit finished,3-deposit failed |
coin_symbol | false | string | deposit token | BIX, ETH, ... | |
page | true | integer | The page number | from the page 1 | |
size | true | integer | the amount in one page | 1-50 |
POST request method: transfer/transferInList
The description of return result
{
"result":{
"count":2,
"page":1,
"items":[
{
"coin_symbol":"ETH", // token
"to_address":"xxxxxxxxxxxxxxxxxxxxxxxxxx", // address
"amount":"1.00000000", // amount
"confirmCount":"15", // the acknowledgment number
"createdAt":1540641511000,
"status":2 // status, 1-deposit is in process,2-deposit finished,3-deposit failed
},
{
"coin_symbol":"BIX",
"to_address":"xxxxxxxxxxxxxxxxxxxxxxxxxx",
"amount":"1.00000000",
"confirmCount":"15",
"createdAt":1540622460000,
"status":2
}
]
},
"cmd":"transfer/transferInList"
}
Example
// Request
{
"cmd": "transfer/transferInList"
"body": {
"filter_type": 0,
"page": 1,
"size": 10,
}
}
// Response
{
"result":{
"count":2,
"page":1,
"items":[
{
"coin_symbol":"ETH",
"to_address":"xxxxxxxxxxxxxxxxxxxxxxxxxx",
"amount":"1.00000000",
"confirmCount":"15",
"createdAt":1540641511000,
"status":2
},
{
"coin_symbol":"BIX",
"to_address":"xxxxxxxxxxxxxxxxxxxxxxxxxx",
"amount":"1.00000000",
"confirmCount":"15",
"createdAt":1540622460000,
"status":2
}
]
},
"cmd":"transfer/transferInList"
}
POST https://api.bibox.com/v1/transfer
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
filter_type | false | integer | filter type | -2: The review fails; -1: user canceled; 0: to be reviewed; 1: The review passes (token to be listed); 2: token listing; 3: token listing completed | |
coin_symbol | false | string | deposit token | BIX, ETH, ... | |
page | true | integer | The page number | from the page 1 | |
size | true | integer | the amount in one page | 1-50 |
POST request method: transfer/transferOutList
The description of return result
{
"result":{
"count":2,
"page":1,
"items":[
{
"coin_symbol":"ETH", // token
"to_address":"xxxxxxxxxxxxxxxxxxxxxxxxxx", // address
"amount":"1.00000000", // amount
"fee":"0.00000000", // withdraw fee
"createdAt":1540641511000,
"memo":"",
"status":-2 // Status, -2: The review fails; -1: user canceled; 0: to be reviewed; 1: The review passes (token to be listed); 2: token listing; 3: token listing completed
},
{
"coin_symbol":"BIX",
"to_address":"xxxxxxxxxxxxxxxxxxxxxxxxxx",
"amount":"1.00000000",
"fee":"0.00000000",
"createdAt":1540622460000,
"memo":"",
"status":3
}
]
},
"cmd":"transfer/transferOutList"
}
Example
// Request
{
"cmd": "transfer/transferOutList"
"body": {
"page": 1,
"size": 10,
}
}
// Response
{
"result":{
"count":2,
"page":1,
"items":[
{
"coin_symbol":"ETH",
"to_address":"xxxxxxxxxxxxxxxxxxxxxxxxxx",
"amount":"1.00000000",
"fee":"0.00000000",
"createdAt":1540641511000,
"memo":"",
"status":-2
},
{
"coin_symbol":"BIX",
"to_address":"xxxxxxxxxxxxxxxxxxxxxxxxxx",
"amount":"1.00000000",
"fee":"0.00000000",
"createdAt":1540622460000,
"memo":"",
"status":3
}
]
},
"cmd":"transfer/transferOutList"
}
POST https://api.bibox.com/v1/transfer
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
coin_symbol | false | string | token | BIX, ETH... |
POST request method: transfer/coinConfig
The description of return result
{
"result":[
{
"coin_symbol":"BTC",
"original_decimals":8, //the original decimals of token
"enable_deposit":1, //enable deposit,0-no,1-yes
"enable_withdraw":1, //enable withdraw,0-no,1-yes
"withdraw_fee":0.0005, //withdraw fee
"withdraw_min":0.005 //the minimum amount
},
{
"coin_symbol":"BIX",
"original_decimals":18,
"enable_deposit":0,
"enable_withdraw":0,
"withdraw_fee":2,
"withdraw_min":10
},
... //other tokens
],
"cmd":"transfer/coinConfig"
}
Example
// Request
{
"cmd": "transfer/coinConfig"
"body": {
}
}
// Response
{
"result":[
{
"coin_symbol":"BTC",
"original_decimals":8,
"enable_deposit":1,
"enable_withdraw":1,
"withdraw_fee":0.0005,
"withdraw_min":0.005
},
{
"coin_symbol":"BIX",
"original_decimals":18,
"enable_deposit":0,
"enable_withdraw":0,
"withdraw_fee":2,
"withdraw_min":10
},
...
],
"cmd":"transfer/coinConfig"
}
POST https://api.bibox.com/v1/transfer
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
id | true | integer | withdrawal id |
POST request method: transfer/withdrawInfo
The description of return result
{
"result":{
"id":228,
"createdAt": 1512756997000,
"coin_symbol":"LTC", //
"to_address":"xxxxxxxxxxxxxxxxxxxxxxxxxx", // withdrawal address
"status":3, // Status, -2: The review fails; -1: user canceled; 0: to be reviewed; 1: The review passes (token to be listed); 2: token listing; 3: token listing completed
"amount":"1.00000000", // amount
"fee":0.1 // fee
},
"cmd":"transfer/withdrawInfo"
}
Example
// Request
{
"cmd": "transfer/withdrawInfo"
"body": {
"id": 228
}
}
// Response
{
"result":{
"id":228,
"createdAt": 1512756997000,
"coin_symbol":"LTC",
"to_address":"xxxxxxxxxxxxxxxxxxxxxxxxxx",
"status":3,
"amount":"1.00000000",
"fee":0.1
},
"cmd":"transfer/withdrawInfo"
}
POST https://api.bibox.com/v1/orderpending
POST https://api.bibox.com/v2/orderpending (recommended)
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
pair | true | string | Trading pair | BIX_BTC, ETH_BTC, ... | |
account_type | true | integer | Account type | 0-spot account | |
order_type | true | integer | Trading type | 2-limit order | |
order_side | true | integer | Trading side | 1-Buy,2-Sell | |
price | true | double | order price | minimum value 0.00000001 | |
amount | true | double | order amount | minimum value 0.0001 |
POST request method: orderpending/trade
The description of return result
{
"result": "100055558128036", //order id
"index": 12345, //user defined random index
"cmd":"orderpending/trade"
}
Example
// Request
{
"cmd": "orderpending/trade",
"index": 12345, //random index, specific one in a batch
"body": {
"pair": "BIX_BTC",
"account_type": 0,
"order_type": 2,
"order_side": 1,
"price": 0.00032,
"amount": 1000
}
}
// Response
{
"result": "100055558128036", //order id
"index": 12345, //random index, specific one in a batch
"cmd":"orderpending/trade"
}
POST https://api.bibox.com/v1/orderpending
POST https://api.bibox.com/v2/orderpending (recommended)
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
orders_id | true | string | order id |
POST request method: orderpending/cancelTrade
The description of return result
{
"result":"OK", //Note: This result only indicates that the server received the cancelling request, and the cancelling result can query the order record
"index": 12345, //random index, specific one in a batch
"cmd":"orderpending/cancelTrade"
}
Example
// Request
{
"cmd": "orderpending/cancelTrade",
"index": 12345,
"body": {
"orders_id": "8588285380268971"
}
}
// Response
{
"result":"OK",
"index": 12345,
"cmd":"orderpending/cancelTrade"
}
POST https://api.bibox.com/v1/orderpending
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
pair | false | string | Trading pair | BIX_BTC, ETH_BTC, ... | |
account_type | true | integer | Account type | 0-spot account | |
order_side | false | integer | Trading side | 1-Buy,2-Sell | |
coin_symbol | false | string | Trading Token | BIX, EOS, ... | |
currency_symbol | false | string | Pricing Token | BTC, USDT, ... | |
page | true | integer | The page number | from the page 1 | |
size | true | integer | the amount in one page | 1-50 |
POST request method: orderpending/orderPendingList
The description of return result
{
"result":{
"count":1,
"page":1,
"items":[
{
"id":"100055558128036",
"createdAt": 1512756997000,
"account_type":0,
"coin_symbol":"LTC", //Trading Token
"currency_symbol":"BTC", //Pricing Token
"order_side":2, //Trading side 1-Buy, 2-Sell
"order_type":2, //2-limit order
"price":"0.00900000", //order price
"amount":"1.00000000", //order amount
"money":"0.00900000", //currency amount (price * amount)
"deal_amount":"0.00000000", //deal amount
"deal_percent":"0.00%", //deal percentage
"unexecuted":"0.00000000", //unexecuted amount
"status":1 //Status,-1-fail, 0,1-to be dealt, 2-dealt partly, 3-dealt totally, 4- cancelled partly, 5-cancelled totally, 6-to be cancelled
}
]
},
"cmd":"orderpending/orderPendingList"
}
Example
// Request
{
"cmd": "orderpending/orderPendingList",
"body": {
"account_type": 0,
"order_side": 2,
"page": 1,
"size": 10,
"coin_symbol": "LTC",
"currency_symbol": "BTC"
}
}
// Response
{
"result":{
"count":1,
"page":1,
"items":[
{
"id":"100055558128036",
"createdAt": 1512756997000,
"account_type":0,
"coin_symbol":"LTC",
"currency_symbol":"BTC",
"order_side":2,
"order_type":2,
"price":"0.00900000",
"amount":"1.00000000",
"money":"0.00900000",
"deal_amount":"0.00000000",
"deal_percent":"0.00%",
"unexecuted":"0.00000000",
"status":1
}
]
},
"cmd":"orderpending/orderPendingList"
}
POST https://api.bibox.com/v1/orderpending
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
pair | false | string | Trading pair | BIX_BTC, ETH_BTC, ... | |
account_type | true | integer | Account type | 0-spot account | |
order_side | false | integer | Trading side | 1-Buy,2-Sell | |
coin_symbol | false | string | Trading Token | BIX, EOS, ... | |
currency_symbol | false | string | Pricing Token | BTC, USDT, ... | |
page | true | integer | The page number | from the page 1 | |
size | true | integer | the amount in one page | 1-50 | |
hide_cancel | false | integer | hide cancelled orders | 0-not hide,1-hide |
POST request method: orderpending/pendingHistoryList
The description of return result
{
"result":{
"count":1,
"page":1,
"items":[
{
"id":"100055558128036",
"createdAt": 1512756997000,
"account_type":0,
"coin_symbol":"LTC", //Trading Token
"currency_symbol":"BTC", //Pricing Token
"order_side":2, //Trading side 1-Buy, 2-Sell
"order_type":2, //2-limit order
"price":"0.00900000", //order price
"amount":"1.00000000", //order amount
"money":"0.00900000", //currency amount (price * amount)
"deal_amount":"0.00000000", //deal amount
"deal_percent":"0.00%", //deal percentage
"unexecuted":"0.00000000", //unexecuted amount
"status":3 //Status,-1-fail, 0,1-to be dealt, 2-dealt partly, 3-dealt totally, 4- cancelled partly, 5-cancelled totally, 6-to be cancelled
}
]
},
"cmd":"orderpending/pendingHistoryList"
}
Example
// Request
{
"cmd": "orderpending/pendingHistoryList",
"body": {
"account_type": 0,
"order_side": 2,
"page": 1,
"size": 10,
"coin_symbol": "LTC",
"currency_symbol": "BTC"
}
}
// Response
{
"result":{
"count":1,
"page":1,
"items":[
{
"id":"100055558128036",
"createdAt": 1512756997000,
"account_type":0,
"coin_symbol":"LTC",
"currency_symbol":"BTC",
"order_side":2,
"order_type":2,
"price":"0.00900000",
"amount":"1.00000000",
"money":"0.00900000",
"deal_price":"0.00900000",
"deal_amount":"1.00000000",
"deal_money":"0.00900000",
"deal_percent":"100%",
"status":3
}
]
},
"cmd":"orderpending/pendingHistoryList"
}
POST https://api.bibox.com/v1/orderpending
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
id | true | string | order id | ||
account_type | true | integer | Account type | 0-spot account |
POST request method: orderpending/orderDetail
The description of return result
{
"result":{
"sum":"0.00588746", // sum of amount
"orderList":[
{
"id":"2251799813844119243", //deal id
"createdAt":1561007144000, //deal timestamp
"account_type":0, //spot account
"coin_symbol":"KAT", //Trading Token
"currency_symbol":"ETH", //Pricing Token
"order_side":2, //Trading side 1-Buy, 2-Sell
"order_type":2, //2-limit order
"price":"0.00001183", //order price
"amount":"497.6722", //order amount
"money":"0.00588746", //currency amount (price * amount)
"fee":"0.00000000", //fee amount
"pay_bix":0, //pay bix for fee
"fee_symbol":"ETH", //fee token symbol
"relay_id":"11221615825364891" // order id
}
]
},
"cmd":"orderpending/orderDetail"
}
Example
// Request
{
"cmd": "orderpending/orderDetail",
"body": {
"id": "11221615825364891" // order id
}
}
// Response
{
"result":{
"sum":"0.00588746", // sum of amount
"orderList":[
{
"id":"2251799813844119243", //
"createdAt":1561007144000, //deal timestamp
"account_type":0, //spot account
"coin_symbol":"KAT", //Trading Token
"currency_symbol":"ETH", //Pricing Token
"order_side":2, //Trading side 1-Buy, 2-Sell
"order_type":2, //2-limit order
"price":"0.00001183", //order price
"amount":"497.6722", //order amount
"money":"0.00588746", //currency amount (price * amount)
"fee":"0.00000000", //fee amount
"pay_bix":0, //pay bix for fee
"fee_symbol":"ETH", //fee token symbol
"relay_id":"11221615825364891" // order id
}
]
},
"cmd":"orderpending/orderDetail"
}
POST https://api.bibox.com/v1/orderpending
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
id | true | string | order id | ||
account_type | true | integer | Account type | 0-spot account |
POST request method: orderpending/order
The description of return result
{
"result":{
"id":"100055558128036",
"createdAt": 1512756997000,
"account_type":0,
"coin_symbol":"LTC", //Trading Token
"currency_symbol":"BTC", //Pricing Token
"order_side":2, //Trading side 1-Buy, 2-Sell
"order_type":2, //2-limit order
"price":"0.00900000", //order price
"amount":"1.00000000", //order amount
"money":"0.00900000", //currency amount (price * amount)
"deal_amount":"0.00000000", //deal amount
"deal_percent":"0.00%", //deal percentage
"unexecuted":"0.00000000", //unexecuted amount
"status":3 //Status, -1-fail, 0,1-to be dealt, 2-dealt partly, 3-dealt totally, 4- cancelled partly, 5-cancelled totally, 6-to be cancelled
},
"cmd":"orderpending/order"
}
Example
// Request
{
"cmd": "orderpending/order",
"body": {
"id": "100055558128036"
}
}
// Response
{
"result":{
"id":"100055558128036",
"createdAt": 1512756997000,
"account_type":0,
"pair":"LTC_BTC",
"coin_symbol":"LTC",
"currency_symbol":"BTC",
"order_side":2,
"order_type":2,
"price":"0.00900000",
"amount":"1.00000000",
"money":"0.00900000",
"deal_amount":"0.00000000",
"deal_percent":"0.00%",
"unexecuted":"0.00000000",
"status":1
},
"cmd":"orderpending/order"
}
POST https://api.bibox.com/v1/orderpending
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
pair | false | string | Trading pair | BIX_BTC, ETH_BTC, ... | |
account_type | true | integer | Account type | 0-spot account | |
order_side | false | integer | Trading side | 1-Buy,2-Sell | |
coin_symbol | false | string | Trading Token | BIX, EOS, ... | |
currency_symbol | false | string | Pricing Token | BTC, USDT, ... | |
page | true | integer | The page number | from the page 1 | |
size | true | integer | the amount in one page | 1-50 |
POST request method: orderpending/orderHistoryList
The description of return result
{
"result":{
"count":1,
"page":1,
"items":[
{
"id":"100055558128036",
"createdAt": 1512756997000,
"account_type":0,
"coin_symbol":"LTC",
"currency_symbol":"BTC",
"order_side":2,
"order_type":2,
"price":"0.00886500",
"amount":"1.00000000",
"money":"0.00886500",
"fee":0
}
]
},
"cmd":"orderpending/orderHistoryList"
}
Example
// Request
{
"cmd": "orderpending/orderHistoryList",
"body": {
"account_type": 0,
"order_side": 2,
"page": 1,
"size": 10,
"coin_symbol": "LTC",
"currency_symbol": "BTC"
}
}
// Response
{
"result":{
"count":1,
"page":1,
"items":[
{
"id":"100055558128036",
"createdAt": 1512756997000,
"account_type":0,
"coin_symbol":"LTC",
"currency_symbol":"BTC",
"order_side":2,
"order_type":2,
"price":"0.00886500",
"amount":"1.00000000",
"money":"0.00886500",
"fee":0
}
]
},
"cmd":"orderpending/orderHistoryList"
}
POST https://api.bibox.com/v1/credit
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
coin_symbol | true | string | Trading Token | USDT, EOS, ... | |
amount | true | double | lend amount | ||
interest_rate | true | double | rate of interest | ||
is_insurance | true | integer | pay insurance | 0 NO; 1 YES | |
force | true | integer | 1 |
POST request method: lendOrderbook/publish
The description of return result
Example
// Request
{
"cmd":"lendOrderbook/publish",
"body":{
"coin_symbol":"EOS",
"amount":"5",
"interest_rate":0.001,
"is_insurance":1,
"force":1
}
}
// Response
{
"result":"操作成功",
"cmd":"lendOrderbook/publish"
}
POST https://api.bibox.com/v1/credit
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
orderbook_id | true | integer | order book id |
POST request method: lendOrderbook/cancel
The description of return result
Example
// Request
{
"cmd":"lendOrderbook/cancel",
"body":{
"orderbook_id":9064
}
}
// Response
{
"result":"操作成功",
"cmd":"lendOrderbook/cancel"
}
POST https://api.bibox.com/v1/credit
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
coin_symbol | true | string | Trading Token | USDT, EOS, ... | |
status | true | integer or integerArray | order status | 0to be dealt, 1 dealt partly, 2 dealt totally | |
page | true | integer | The page number | from the page 1 | |
size | true | integer | the amount in one page | 1-50 |
POST request method: lendOrderbook/get
The description of return result
Example
// Request
{
"cmd":"lendOrderbook/get",
"body":{
"page":1,
"status":[
0,
1
],
"coin_symbol":"EOS",
"size":50
}
}
// Response
{
"result":{
"count":1,
"page":1,
"items":[
{
"id":1,
"user_id":10000000,
"coin_id":61,
"coin_symbol":"EOS",
"amount":5, // to be dealt amount
"amount_finish":0, // dealt amount
"interest_rate":0.001, // interest rate
"period":7,
"expireAt":"2018-12-29T10:59:18.000Z",
"status":0,
"createdAt":"2018-12-22T10:59:18.000Z"
}
],
"validSymbols":[
"EOS"
]
},
"cmd":"lendOrderbook/get"
}
POST https://api.bibox.com/v1/credit
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
coin_id | true | integer | tokens id | USDT, EOS, ... | |
status | true | integer Or integerArray | order status | 0 to be dealt, 1partly refund, 2 refund total | |
page | true | integer | The page number | from the page 1 | |
size | true | integer | the amount in one page | 1-50 |
POST request method: lendOrder/get
The description of return result
Example
// Request
{
"cmd":"lendOrder/get",
"body":{
"page":1,
"status":[
0,
1
],
"coin_symbol":"EOS",
"size":1
}
}
// Response
POST https://api.bibox.com/v1/credit
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
coin_symbol | true | string | Trading Token | USDT, EOS, ... |
POST request method: transferAssets/lendAssets
The description of return result
Example
// Request
{
"cmd":"transferAssets/lendAssets",
"body":{
"coin_symbol":"EOS"
}
}
// Response
{
"result":{
"balance":"1.52319980", // Available
"lend":"0.00000000", // to be dealt amount
"lend_book":"0.00000000", // lend book amount
"interest":"0.00000000", // to be dealt interest
"lend_receipt":"1.44000000", // has receipt amount
"interest_receipt":"0.16115200" // has receipt interest
},
"cmd":"transferAssets/lendAssets"
}
POST https://api.bibox.com/v1/credit
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
coin_symbol | true | string | Trading Token | USDT, EOS, ... | |
pair | true | string | Trading pair | BTC_USDT, ETH_USDT, ... | |
amount | false | double | borrow amount | ||
interest_rate | true | double | borrow interest rate |
POST request method: borrowOrder/book
The description of return result
Example
// Request
{
"cmd":"borrowOrder/book",
"body":{
"interest_rate":0.0001,
"amount":"5",
"coin_symbol":"EOS",
"pair":"EOS_USDT"
}
}
// Response
{
"result":"操作success",
"cmd":"borrowOrder/book"
}
POST https://api.bibox.com/v1/credit
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
order_id | true | integer | order id |
POST request method: borrowOrder/cancel
The description of return result
Example
// Request
{
"cmd":"borrowOrder/cancel",
"body":{
"order_id":2809
}
}
// Response
{
"result":"操作成功",
"cmd":"borrowOrder/cancel"
}
POST https://api.bibox.com/v1/credit
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
order_id | true | integer | order id | ||
amount | true | double | refund amount |
POST request method: borrowOrder/refund
The description of return result
Example
// Request
{
"cmd":"borrowOrder/refund",
"body":{
"order_id":1,
"amount":"5.0036"
}
}
// Response
{
"result":"操作成功",
"cmd":"borrowOrder/refund"
}
POST https://api.bibox.com/v1/credit
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
coin_symbol | true | string | Trading Token | USDT, EOS, ... | |
pair | true | string | Trading pair | BTC_USDT, ETH_USDT, ... | |
status | true | integer Or integerArray | order status | 0 to be dealt, 1 borrow success, 2partly refund, 3-6 dealt totally | |
page | true | integer | The page number | from the page 1 | |
size | true | integer | the amount in one page | 1-50 |
POST request method: borrowOrder/get
The description of return result
0 to be dealt, 1 borrow success, 2 partly refund, 3-6 dealt totally
Example
// Request
{
"cmd":"borrowOrder/get",
"body":{
"page":1,
"status":[
1,
2
],
"size":1,
"pair":"EOS_USDT"
}
}
// Response
{
"result":{
"count":1,
"page":1,
"items":[
{
"id":1,
"user_id":1000,
"coin_id":61,
"coin_symbol":"EOS",
"pair":"EOS_USDT",
"amount":"5", // amount to refund
"amount_refund":0, // amount has refund
"interest_rate":0.0001,
"interest":0, //refund interest
"interest_refund":0, // has refund interest
"period":7,
"expireAt":"2018-12-22T11:09:22.000Z", // refund time
"status":0,
"createdAt":"2018-12-22T11:09:22.000Z"
}
],
"validSymbols":[
{
"coin_symbol":"EOS",
"pair":"EOS_USDT"
}
]
},
"cmd":"borrowOrder/get"
}
POST https://api.bibox.com/v1/credit
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
coin_symbol | true | string | Trading Token | USDT, EOS, ... | |
pair | true | string | Trading pair | BTC_USDT, ETH_USDT, ... |
POST request method: borrowDepth/get
The description of return result
Example
// Request
{
"cmd":"borrowDepth/get",
"body":{
"coin_symbol":"EOS",
"pair":"EOS_USDT"
}
}
// Response
{
"result":{
"lend":[ // Lend Depth
{
"interest_rate":"0.07", //lend interest rate
"total":"5.20000000", // total lend amount
"number":1
},
{
"interest_rate":"0.08",
"total":"21657.73800000",
"number":19
}
],
"borrow":[// Borrwow Depth
{
"interest_rate":"0.01", // borrow interest rate
"total":"5.00000000", // total borrow amount
"number":1
}
],
"history":[// Deal history
{
"interest_rate":0.0008,
"amount":"26.480",
"createdAt":"2018-12-19T22:05:21.000Z"
},
{
"interest_rate":0.0008,
"amount":"6000.000",
"createdAt":"2018-12-19T10:24:27.000Z"
}
]
},
"cmd":"borrowDepth/get"
}
POST https://api.bibox.com/v1/credit
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
coin_symbol | true | string | Trading Token | BTC, EOS, ... | |
currency_symbol | true | string | Pricing Token | USDT |
POST request method: transferAssets/borrowAssets
The description of return result
Example
// Request
{
"cmd":"transferAssets/borrowAssets",
"body":{
"coin_symbol":"EOS",
"currency_symbol":"USDT"
}
}
// Response
{
"result":{
"pair":"EOS_USDT",
"currency_deposit":"13.02329860",
"currency_borrow":"0.00000000",
"currency_can_borrow":"13.0232986",
"currency_borrow_book":"13.0232986",
"margin_radio":"-1", // margin radio -1: Infinite
"leverage_ratio":3,
"force_price":"0",
"bust_price":"0",
"items":[
{
"coin_symbol":"EOS",
"coin_id":61,
"balance":"5", // Available
"freeze":"0", // freeze
"borrow":"0", // borrow amount
"can_transfer_credit":"0",
"can_transfer_main":"1.52319980",
"can_borrow":"5", // can borrow amout
"borrow_book":"5.00000000", // borrow order book
"force_price":"0", // force price
"bust_price":"0",
"price":"2.60465972",
"interest":"0.00000000", // interest
"total":"5.00000000" // total amount
},
{
"coin_symbol":"USDT",
"coin_id":60,
"balance":"0",
"freeze":"0",
"borrow":"0",
"can_transfer_credit":"0",
"can_transfer_main":"0.00974689",
"can_borrow":"13.0232986",
"borrow_book":"0",
"force_price":"0",
"bust_price":"0",
"price":"1",
"interest":"0",
"total":"0.00000000"
}
]
},
"cmd":"transferAssets/borrowAssets"
}
POST https://api.bibox.com/v1/credit
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
pair | true | string | Trading pair | BTC_USDT, ETH_USDT, | |
account_type | true | integer | Account type | 1-credit account | |
order_type | true | integer | Order type | 2-limit order | |
order_side | true | integer | Trading side | 1-buy,2-Sell | |
price | true | double | order price | minimum value 0.00000001 | |
amount | true | double | order amount | minimum value 0.0001 |
POST request method: trade/trade
The description of return result
{
"id":"4631142976192513", // order id
"createdAt": 1512756997000,
"account_type":0, //account type 1-credit
"coin_symbol":"LTC", //Trading Token
"currency_symbol":"BTC", //Pricing Token
"order_side":2, //Trading side 1-Buy, 2-Sell
"order_type":2, //2-limit order
"price":"0.00900000", //order price
"amount":"1.00000000", //order amount
"money":"0.00900000", //currency amount (price * amount)
"deal_amount":"0.00000000", //deal amount
"deal_percent":"0.00%", //deal percentage
"unexecuted":"0.00000000", //unexecuted amount
"status":1 //Status,-1-fail, 0,1-to be dealt, 2-dealt partly, 3-dealt totally, 4- cancelled partly, 5-cancelled totally, 6-to be cancelled
}
Example
// Request
[
{
"cmd":"trade/trade",
"body":{
"account_type":1, //Account type, 1-credit account
"pair":"EOS_USDT", //Trading pair, EOS_USDT,BTC_USDT,..
"order_type":2, //Trading type, 2-limit order
"order_side":1, //Trading side,1-Buy,2-Sell
"price":"4.8099", //order price
"amount":"1.0395", //order amount
}
}
]
// Response
{
"id":"4631142976192513", //order id
"account_type":1, //Account type, 1-credit account
"pair":"EOS_USDT", //Trading pair, EOS_USDT,BTC_USDT,..
"order_side":1, //Trading side,1-Buy,2-Sell
"order_type":2, //Trading type, 2-limit order
"price":4.8099, //order price
"amount":1.0395, //order amount
"money":4.99989105, //order price
"status":1, //Status,-1-fail, 0,1-to be dealt, 2-dealt partly, 3-dealt totally, 4- cancelled partly, 5-cancelled totally, 6-to be cancelled
"updatedAt":1558601946687,
"createdAt":1558601946687
}
POST https://api.bibox.com/v1/credit
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
orders_id | true | string | order id |
POST request method: trade/cancel
The description of return result
{
"result":"Canceling",
"cmd":"trade/cancel"
}
Example
// Request
{
"cmd": "trade/cancel",
"body": {
"orders_id": "4631142976192513" //order id
}
}
// Response
{
"result":"ok",
"cmd":"trade/cancel"
}
POST https://api.bibox.com/v1/orderpending
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
pair | false | string | Trading pair | BIX_BTC, ETH_BTC, ... | |
account_type | true | integer | Account type | 1-credit account | |
order_side | false | integer | Trading side | 1-buy,2-Sell | |
coin_symbol | false | string | Trading Token | BIX, EOS, ... | |
currency_symbol | false | string | Pricing Token | BTC, USDT, ... | |
page | true | integer | The page number | from the page 1 | |
size | true | integer | the amount in one page | 1-50 |
POST request method: orderpending/orderPendingList
The description of return result
{
"result":{
"count":1,
"page":1,
"items":[
{
"id":"4631142976192513",
"createdAt": 1512756997000,
"account_type":1, //Account type 1-credit account
"coin_symbol":"EOS", //Trading Token
"currency_symbol":"USDT", //Pricing Token
"order_side":2, //Trading side,1-buy,2-Sell
"order_type":2, //order type,2-limit order
"price":"0.00900000", //order price
"amount":"1.00000000", //order amount
"money":"0.00900000", //order money
"deal_amount":"0.00000000", //deal amount
"deal_percent":"0.00%", //deal percentage
"unexecuted":"0.00000000", //unexecuted amount
"status":1 //Status,-1-fail, 0,1-to be dealt, 2-dealt partly, 3-dealt totally, 4- cancelled partly, 5-cancelled totally, 6-to be cancelled
}
]
},
"cmd":"orderpending/orderPendingList"
}
Example
// Request
{
"cmd": "orderpending/orderPendingList",
"body": {
"account_type": 1,
"order_side": 2,
"page": 1,
"size": 10,
"coin_symbol": "EOS",
"currency_symbol": "USDT"
}
}
// Response
{
"result":{
"count":1,
"page":1,
"items":[
{
"id":"4631142976192513",
"createdAt": 1512756997000,
"account_type":1, //Account type 1-credit account
"coin_symbol":"EOS", //Trading Token
"currency_symbol":"USDT", //Pricing Token
"order_side":2, //Trading side,1-buy,2-Sell
"order_type":2, //order type,2-limit order
"price":"0.00900000", //order price
"amount":"1.00000000", //order amount
"money":"0.00900000", //order money
"deal_amount":"0.00000000", //deal amount
"deal_percent":"0.00%", //deal percentage
"unexecuted":"0.00000000", //unexecuted amount
"status":1 //Status,-1-fail, 0,1-to be dealt, 2-dealt partly, 3-dealt totally, 4- cancelled partly, 5-cancelled totally, 6-to be cancelled
}
]
},
"cmd":"orderpending/orderPendingList"
}
POST https://api.bibox.com/v1/orderpending
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
pair | false | string | Trading pair | BIX_BTC, ETH_BTC, ... | |
account_type | true | integer | Account type | 1-credit account | |
order_side | false | integer | Trading side | 1-buy,2-Sell | |
coin_symbol | false | string | Trading Token | EOS, ... | |
currency_symbol | false | string | Pricing Token | USDT, ... | |
hide_cancel | false | integer | ide cancelled orders | 0-not hide,1-hide | |
page | true | integer | The page number | from the page 1 | |
size | true | integer | the amount in one page | 1-50 |
POST request method: orderpending/pendingHistoryList
The description of return result
{
"result":{
"count":1,
"page":1,
"items":[
{
"id":"4631142976192513",
"createdAt": 1512756997000,
"account_type":1, //Account type 1-credit account
"coin_symbol":"EOS", //Trading Token
"currency_symbol":"USDT", //Pricing Token
"order_side":2, //Trading side,1-buy,2-Sell
"order_type":2, //order type,2-limit order
"price":"0.00900000", //order price
"amount":"1.00000000", //order amount
"money":"0.00900000", //order money
"deal_price":"0.00900000", //deal price
"deal_amount":"1.00000000", //deal amount
"deal_money":"0.00900000", //deal money
"deal_percent":"100%", //deal percentage
"status":3 //Status,-1-fail, 0,1-to be dealt, 2-dealt partly, 3-dealt totally, 4- cancelled partly, 5-cancelled totally, 6-to be cancelled
}
]
},
"cmd":"orderpending/pendingHistoryList"
}
Example
// Request
{
"cmd": "orderpending/pendingHistoryList",
"body": {
"account_type": 1,
"order_side": 2,
"page": 1,
"size": 10,
"coin_symbol": "EOS",
"currency_symbol": "USDT"
}
}
// Response
{
"result":{
"count":1,
"page":1,
"items":[
{
"id":"4631142976192513",
"createdAt": 1512756997000,
"account_type":1, //Account type 1-credit account
"coin_symbol":"EOS", //Trading Token
"currency_symbol":"USDT", //Pricing Token
"order_side":2, //Trading side,1-buy,2-Sell
"order_type":2, //order type,2-limit order
"price":"0.00900000", //order price
"amount":"1.00000000", //order amount
"money":"0.00900000", //order money
"deal_price":"0.00900000", //成交均价
"deal_amount":"1.00000000", //deal amount
"deal_money":"0.00900000", //deal money
"deal_percent":"100%", //deal percentage
"status":3 //Status, -1-fail, 0,1-to be dealt, 2-dealt partly, 3-dealt totally, 4- cancelled partly, 5-cancelled totally, 6-to be cancelled
}
]
},
"cmd":"orderpending/pendingHistoryList"
}
POST https://api.bibox.com/v1/orderpending
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
id | true | string | order id | ||
account_type | true | integer | Account type | 1-credit account |
POST request method: orderpending/order
The description of return result
{
"result":{
"id":"4631142976192513",
"createdAt": 1512756997000,
"account_type":1, //Account type 1-credit account
"pair":"EOS_USDT", //Trading pair
"coin_symbol":"EOS", //Trading Token
"currency_symbol":"USDT", //Pricing Token
"order_side":2, //Trading side,1-buy,2-Sell
"order_type":2, //order type,2-limit order
"price":"0.00900000", //order price
"amount":"1.00000000", //order amount
"money":"0.00900000", //order money
"deal_amount":"0.00000000", //deal amount
"deal_percent":"0.00%", //deal percentage
"unexecuted":"0.00000000", //unexecuted amount
"status":1 //Status, -1-fail, 0,1-to be dealt, 2-dealt partly, 3-dealt totally, 4- cancelled partly, 5-cancelled totally, 6-to be cancelled
},
"cmd":"orderpending/order"
}
Example
// Request
{
"cmd": "orderpending/order",
"body": {
"id": "4631142976192513"
}
}
// Response
{
"result":{
"id":"4631142976192513",
"createdAt": 1512756997000,
"account_type":1, //Account type 1-credit account
"pair":"EOS_USDT", //Trading pair
"coin_symbol":"EOS", //Trading Token
"currency_symbol":"USDT", //Pricing Token
"order_side":2, //Trading side,1-buy,2-Sell
"order_type":2, //order type,2-limit order
"price":"4", //order price
"amount":"1", //order amount
"money":"4", //order money
"deal_amount":"0.00000000", //deal amount
"unexecuted":"0.00000000", //unexecuted amount
"status":1 //Status, -1-fail, 0,1-to be dealt, 2-dealt partly, 3-dealt totally, 4- cancelled partly, 5-cancelled totally, 6-to be cancelled
},
"cmd":"orderpending/order"
}
POST https://api.bibox.com/v1/orderpending
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
pair | false | string | Trading pair | EOS_USDT, BTC_USDT, ... | |
account_type | true | integer | Account type | 1-credit account | |
order_side | false | integer | Trading side | 1-buy,2-Sell | |
coin_symbol | false | string | Trading Token | EOS, ... | |
currency_symbol | false | string | Pricing Token | USDT | |
page | true | integer | The page number | from the page 1 | |
size | true | integer | the amount in one page | 1-50 |
POST request method: orderpending/orderHistoryList
The description of return result
{
"result":{
"count":1,
"page":1, //The page number
"items":[ //
{
"id":"4631142976192513",
"createdAt": 1512756997000,
"account_type":1, //Account type 1-credit account
"coin_symbol":"EOS", //Trading Token
"currency_symbol":"USDT", //Pricing Token
"order_side":2, //Trading side,1-buy,2-Sell
"order_type":2, //order type,2-limit order
"price":"4", //deal price
"amount":"1.00000000", //deal amount
"money": "4", //deal money
"fee":0 //fee
}
]
},
"cmd":"orderpending/orderHistoryList"
}
Example
// Request
{
"cmd": "orderpending/orderHistoryList",
"body": {
"account_type": 1,
"order_side": 2,
"page": 1,
"size": 10,
"coin_symbol": "EOS",
"currency_symbol": "USDT"
}
}
// Response
{
"result":{
"count":1,
"page":1, //The page number
"items":[
{
"id":"4631142976192513",
"createdAt": 1512756997000,
"account_type":1, //Account type 1-credit account
"coin_symbol":"EOS", //Trading Token
"currency_symbol":"USDT", //Pricing Token
"order_side":2, //Trading side,1-buy,2-Sell
"order_type":2, //order type,2-limit order
"price":"4", //deal price
"amount":"1", //deal amount
"money":"4", //deal money
"fee":0 //fee
}
]
},
"cmd":"orderpending/orderHistoryList"
}
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
select | false | integer | integer | View or not the asset details | 0-The total assets of all tokens, 1-the asset details of all tokens |
POST request method: transfer/mainAssets
The description of return result
{
"result":[
{
"result":{
"total_btc":"0.00034073", //The total assets of all tokens, equivalent to BTC
"total_cny":"18.44", //The total assets of all tokens, equivalent to CNY
"total_usd":"2.66", //The total assets of all tokens, equivalent to USD
"assets_list":[ //The asset details of tokens
{
"coin_symbol":"BIX", //tokens
"BTCValue":"0.00000000", //equivalent to BTC
"CNYValue":"0.00", //equivalent to CNY
"USDValue":"0.00", //equivalent to USD
"balance":"0.00005540", //Available
"freeze":"0.00000000" //Freeze
},
...
]
},
"cmd":"transfer/mainAssets"
}
]
}
Example
// Request
{
"cmd":"transfer/mainAssets",
"body":{
"select":1
}
}
// Response success
{
"result":[
{
"result":{
"total_btc":"0.00034073", //The total assets of all tokens, equivalent to BTC
"total_cny":"18.44", //The total assets of all tokens, equivalent to CNY
"total_usd":"2.66", //The total assets of all tokens, equivalent to USD
"assets_list":[ //The asset details of tokens
{
"coin_symbol":"BIX", //tokens
"BTCValue":"0.00000000", //equivalent to BTC
"CNYValue":"0.00", //equivalent to CNY
"USDValue":"0.00", //equivalent to USD
"balance":"0.00005540", //Available
"freeze":"0.00000000" //Freeze
},
...
]
},
"cmd":"transfer/mainAssets"
}
]
}
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
select | false | integer | View or not the asset details | 0-The total assets of all tokens, 1-the asset details of all tokens |
POST request method: transfer/creditAssets
The description of return result
{
"result":[
{
"result":{
"total_btc":"0.00063800", //The total assets of all tokens, equivalent to BTC
"total_cny":"34.55", //The total assets of all tokens, equivalent to CNY
"total_usd":"5.00", //The total assets of all tokens, equivalent to USD
"assets_list":[
{
"balance":"0.00000000", //Available
"freeze":"0.00000000", //Freeze
"BTCValue":"0.00000000", //equivalent to BTC
"CNYValue":"0.00", //equivalent to RMB
"USDValue":"0.00", //equivalent to USD
"pair":"EOS_USDT", //Trading pair
"coin_symbol":"EOS" //tokens
},
{
"coin_symbol":"USDT",
"pair":"EOS_USDT",
"BTCValue":"0.00063800",
"CNYValue":"34.55",
"USDValue":"5.00",
"balance":"5.00000000",
"freeze":"0.00000000"
}
]
},
"cmd":"transfer/creditAssets"
}
]
}
Example
// Request
{
"cmd":"transfer/creditAssets",
"body":{
}
}
// Response success
{
"result":[
{
"result":{
"total_btc":"0.00063800", //The total assets of all tokens, equivalent to BTC
"total_cny":"34.55", //The total assets of all tokens, equivalent to CNY
"total_usd":"5.00", //The total assets of all tokens, equivalent to USD
"assets_list":[
{
"balance":"0.00000000", //Available
"freeze":"0.00000000", //Freeze
"BTCValue":"0.00000000", //equivalent to BTC
"CNYValue":"0.00", //equivalent to RMB
"USDValue":"0.00", //equivalent to USD
"pair":"EOS_USDT", //Trading pair
"coin_symbol":"EOS" //tokens
},
{
"coin_symbol":"USDT",
"pair":"EOS_USDT",
"BTCValue":"0.00063800",
"CNYValue":"34.55",
"USDValue":"5.00",
"balance":"5.00000000",
"freeze":"0.00000000"
},
...
]
},
"cmd":"transfer/creditAssets"
}
]
}
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
symbol | true | string | Trading pair | ---- | EOS,BTC... |
amount | true | double | transfer amount | ---- | > 0 |
type | true | integer | transfer type | ---- | 0 main assets -> spot assets; 1 spot assets -> main assets |
The description of return result
{
"result":{
"id":"39030177501581312",
"state":0 // success
}
}
Example
// Request
param: {
"type": 0,
"amount": "100",
"symbol": 'USDT'
}
post body:
{
body: JSON.stringify(param), // stringify param
apikey: yourApiKey,
sign: 'signature you body with your apisecret '
}
yourApiKey = '178bed72cc7dcdca538b756817a87666432673af';
yourSecret = "3e412e42957b720d155b2c8798726a0e8ed80807";
post body:
{
body: "{\"type\":0,\"amount\":\"100\",\"symbol\":\"USDT\"}",
apikey: "178bed72cc7dcdca538b756817a87666432673af",
sign: "a8ac84f2e6c2ead3dac4e46cf9c6e01e", //signature "{\"type\":0,\"amount\":\"100\",\"symbol\":\"USDT\"}" with yourSecret
}
// Response success
{
"result":{
"id":"39030177501581312",
"state":0 // 0 success, other fail;
}
}
// Response fail
{
"error":{
"code":"2027",
"msg":"账户余额不足"
}
}
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
coin_symbol | true | string | tokens | ---- | EOS,BTC... |
amount | true | double | transfer amount | ---- | > 0 |
pair | true | string | Trading pair | ---- | EOS_USDT,BTC_USDT... |
POST method: transferAssets/base2credit The description of return result
{
"result":[
{
"result":"操作成功",
"cmd":"transferAssets/base2credit"
}
]
}
Example
// Request
{
"cmd":"transferAssets/base2credit",
"body":{
"coin_symbol":"USDT",
"amount":5,
"pair":"EOS_USDT"
}
}
// Response success
{
"result":[
{
"result":"操作成功",
"cmd":"transferAssets/base2credit"
}
]
}
Request parameter
Name | Necessary or not | Type | Description | Default | Value Range |
---|---|---|---|---|---|
coin_symbol | true | string | tokens | ---- | EOS,BTC... |
amount | true | double | amount | ---- | > 0 |
pair | true | string | Trading pair | ---- | EOS_USDT,BTC_USDT...Trading pair |
POST method: transferAssets/credit2base The description of return result
{
"result":[
{
"result":"操作成功",
"cmd":"transferAssets/credit2base"
}
]
}
Example
// Request
{
"cmd":"transferAssets/credit2base",
"body":{
"coin_symbol":"USDT",
"amount":5,
"pair":"EOS_USDT"
}
}
// Response success
{
"result":[
{
"result":"操作成功",
"cmd":"transferAssets/credit2base"
}
]
}
Bibox Exchange provides REST API and WebSocket API, which are convenient for investors to view the market and trade easily.
- REST API Introduction
- Signature Authentication
- API Request and Response Format
- API Reference
- Error code
- Example