Restful API Spot trading

Market Quotation(apikey is not necessary)

Network testing

// Request
{
    "cmd": "ping"
    "body": {}
}
{
    "url":"https://api.bibox.com/v2/mdata",
    "form":{
        "cmds":"[{\"body\":{},\"cmd\":\"ping\"}]",
    }
}

// Response
{
    "result": {}, //Test succeed
    "cmd":"ping"
}

View trading pair

// Request
{
    "cmd": "api/pairList",
    "body": {}
}
{
    "url":"https://api.bibox.com/v2/mdata",
    "form":{
        "cmds":"[{\"cmd\":\"api/pairList\",\"body\":{}}]",
    }
}

// Response
{
    "result":[
        {
            "id":1,// pair id
            "pair":"BIX_BTC" //pair symbol
        },
        {
            "id":2,
            "pair":"ETH_BTC"
        }
    ],
    "cmd":"api/pairList"
}

View Kline

Name Necessary or not Type Description Default Value Range
pair true string pair BIX_BTC, ETH_BTC, ...
period true string Kline period '1min', '3min', '5min', '15min', '30min', '1hour', '2hour', '4hour', '6hour', '12hour', 'day', 'week'
size false integer how many 1000 1-1000
  • example
// Request
{
    "cmd": "api/kline",
    "body": {
        "pair": "BIX_BTC",
        "period": "1min",
        "size": 10
    }
}
{
    "url":"https://api.bibox.com/v2/mdata",
    "form":{
        "cmds":"[{\"cmd\":\"api/kline\",\"body\":{\"pair\":\"BIX_BTC\",\"period\":\"1min\",\"size\":10}}]",
    }
}

// Response
{
    "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"
}

View the market quotation of all tokens

// Request
{
    "cmd": "api/marketAll",
    "body": {}
}

{
    "url":"https://api.bibox.com/v2/mdata",
    "form":{
        "cmds":"[{\"cmd\":\"api/marketAll\",\"body\":{}}]",
    }
}

// Response
{
    "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"
        },
        {
            "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"
}

View market quotation of a single token

Name Necessary or not Type Description Default Value Range
pair true string Trading pair BIX_BTC, ETH_BTC, ...
  • example
// Request
{
    "cmd": "api/market",
    "body": {
        "pair": "BIX_BTC"
    }
}
{
    "url":"https://api.bibox.com/v2/mdata",
    "form":{
        "cmds":"[{\"cmd\":\"api/market\",\"body\":{\"pair\":\"BIX_BTC\"}}]",
    }
}

// Response
{
    "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"
}

View the depth of the market

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
  • example
// Request
{
    "cmd": "api/depth",
    "body": {
        "pair": "BIX_BTC"
    }
}
{
    "url":"https://api.bibox.com/v2/mdata",
    "form":{
        "cmds":"[{\"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 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"
}

View trading record history

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
  • example
// Request
{
    "cmd": "api/deals",
    "body": {
        "pair": "LTC_BTC"
    }
}
{
    "url":"https://api.bibox.com/v2/mdata",
    "form":{
        "cmds":"[{\"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"
}

View the market ticker

Name Necessary or not Type Description Default Value Range
pair true string Trading pair BIX_BTC, ETH_BTC, ...
  • example
// Request
{
    "cmd": "api/ticker",
    "body": {
        "pair": "BIX_BTC"
    }
}
{
    "url":"https://api.bibox.com/v2/mdata",
    "form":{
        "cmds":"[{\"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"
}

The trade parameter specification

{
    "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"
}

Users Asset Information (needs apikey)

Spot account asset

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
  • example
// Request
{
    "cmd": "transfer/assets",
    "body": {
        "select": 1
    }
}
{
    "url":"https://api.bibox.com/v1/transfer",
    "form":{
        "cmds":"[{\"cmd\":\"transfer/assets\",\"body\":{\"select\":1}}]",
        "apikey":"1e01c22ff8c59e9d98d93423817303f0e7c6d79d",
        "sign":"86e88a4bc8eedc795b453f121f5894ee"
    }
}

// Response
{
    "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"
}

Deposit

Name Necessary or not Type Description Default Value Range
coin_symbol true string deposit Token BIX, EOS, ...
  • example
// Request
{
    "cmd": "transfer/transferIn",
    "body":{
        "coin_symbol":"BIX"
    }
}
{
    "url":"https://api.bibox.com/v1/transfer",
    "form":{
        "cmds":"[{\"cmd\":\"transfer/transferIn\",\"body\":{\"coin_symbol\":\"BIX\"}}]",
        "apikey":"1e01c22ff8c59e9d98d93423817303f0e7c6d79d",
        "sign":"05068bce6cf2eb7619440d99be86abde"
    }
}

// Response
{
    "result":"xxxxxxxxxxxxxxxxx", //deposit address
    "cmd":"transfer/transferIn"
}

Withdraw

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
  • example
// Request
{
    "cmd": "transfer/transferOut",
    "body":{
        "coin_symbol":"BIX",
        "amount":1,
        "totp_code":703634,
        "trade_pwd":"12345678",
        "addr":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "addr_remark":"bibox-1",
        "memo":"",
    }
}
{
    "url":"https://api.bibox.com/v1/transfer",
    "form":{
        "cmds":"[{\"cmd\":\"transfer/transferOut\",\"body\":{\"coin_symbol\":\"BIX\",\"amount\":1,\"totp_code\":703634,\"trade_pwd\":\"12345678\",\"addr\":\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\"addr_remark\":\"bibox-1\",\"memo\":\"\"}}]",
        "apikey":"1e01c22ff8c59e9d98d93423817303f0e7c6d79d",
        "sign":"8260d0e280d2b2a78ff29bb92acf5e6b"
    }
}

// Response
{
    "result":228   //withdrawal id
    "cmd":"transfer/transferOut"
}

Deposit history list

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
  • example
// Request
{
    "cmd": "transfer/transferInList",
    "body": {
        "filter_type": 0,
        "page": 1,
        "size": 10,
    }
}
{
    "url":"https://api.bibox.com/v1/transfer",
    "form":{
        "cmds":"[{\"cmd\":\"transfer/transferInList\",\"body\":{\"filter_type\":0,\"page\":1,\"size\":10}}]",
        "apikey":"1e01c22ff8c59e9d98d93423817303f0e7c6d79d",
        "sign":"7c515dc6b6ccb803115ce8653ef6eed3"
    }
}

// Response
{
    "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"
}

Withdraw history list

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
  • example
// Request
{
    "cmd": "transfer/transferOutList",
    "body": {
        "page": 1,
        "size": 10,
    }
}
{
    "url":"https://api.bibox.com/v1/transfer",
    "form":{
        "cmds":"[{\"cmd\":\"transfer/transferOutList\",\"body\":{\"page\":1,\"size\":10}}]",
        "apikey":"1e01c22ff8c59e9d98d93423817303f0e7c6d79d",
        "sign":"0702af0bab89897ffe0d486c265f2b21"
    }
}

// Response
{
    "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"
}

Query token config

Name Necessary or not Type Description Default Value Range
coin_symbol false string token BIX, ETH...
  • example
// Request
{
    "cmd": "transfer/coinConfig",
    "body": {

    }
}
{
    "url":"https://api.bibox.com/v1/transfer",
    "form":{
        "cmds":"[{\"cmd\":\"transfer/coinConfig\",\"body\":{}}]",
        "apikey":"1e01c22ff8c59e9d98d93423817303f0e7c6d79d",
        "sign":"41babcc84fd5301117f4fcf66cd70b6f"
    }
}

// Response
{
    "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
        },
        ... //其他币种配置信息
    ],
    "cmd":"transfer/coinConfig"
}

Withdrawal information

Name Necessary or not Type Description Default Value Range
id true integer withdrawal id

example

// Request
{
    "cmd": "transfer/withdrawInfo",
    "body": {
        "id": 228
    }
}
{
    "url":"https://api.bibox.com/v1/transfer",
    "form":{
        "cmds":"[{\"cmd\":\"transfer/withdrawInfo\",\"body\":{\"id\":228}}]",
        "apikey":"1e01c22ff8c59e9d98d93423817303f0e7c6d79d",
        "sign":"e5a1067e1f2aee028989552c23425099"
    }
}

// Response
{
    "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"
}

Transaction(Needs apikey)

place an order

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
client_oid false long to string client order id '110011223344'
  • 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,       
        "client_oid": '110011223344'     
    }
}
{
    "url":"https://api.bibox.com/v1/orderpending",
    "form":{
        "cmds":"[{\"cmd\":\"orderpending/trade\",\"index\":12345,\"body\":{\"pair\":\"BIX_BTC\",\"account_type\":0,\"order_type\":2,\"order_side\":1,\"price\":0.00032,\"amount\":1000}}]",
        "apikey":"1e01c22ff8c59e9d98d93423817303f0e7c6d79d",
        "sign":"2d775fdc61a2aaf63e9f40441c2040a8"
    }
}

// Response
{
    "result": "100055558128036",     //order id
    "index": 12345,   //random index, specific one in a batch
    "cmd":"orderpending/trade"
}

cancel an order

Name Necessary or not Type Description Default Value Range
orders_id true string order id
  • example
// Request
{
    "cmd": "orderpending/cancelTrade",
    "index": 12345,                  
    "body": {
        "orders_id": "8588285380268971"              
    }
}
{
    "url":"https://api.bibox.com/v1/orderpending",
    "form":{
        "cmds":"[{\"cmd\":\"orderpending/cancelTrade\",\"index\":12345,\"body\":{\"orders_id\":\"8588285380268971\"}}]",
        "apikey":"1e01c22ff8c59e9d98d93423817303f0e7c6d79d",
        "sign":"bf3882a208ada6ebc86a8cf8e3b5ea5a"
    }
}

// Response
{
    "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"
}

The current order list

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
  • example
// Request
{
     "cmd": "orderpending/orderPendingList",
     "body": {
         "account_type": 0,
         "order_side": 2,
         "page": 1,
         "size": 10,
         "coin_symbol": "LTC",
         "currency_symbol": "BTC"
     }
 }
 {
     "url":"https://api.bibox.com/v1/orderpending",
     "form":{
         "cmds":"[{\"cmd\":\"orderpending/orderPendingList\",\"body\":{\"account_type\":0,\"order_side\":2,\"page\":1,\"size\":10,\"coin_symbol\":\"LTC\",\"currency_symbol\":\"BTC\"}}]",
         "apikey":"1e01c22ff8c59e9d98d93423817303f0e7c6d79d",
         "sign":"15e0c711e4ad94b30245782147c9307f"
     }
 }

// Response
{
    "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"
}

The order history

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
  • example
// Request
{
    "cmd": "orderpending/pendingHistoryList",
    "body": {
        "account_type": 0,
        "order_side": 2,
        "page": 1,
        "size": 10,
        "coin_symbol": "LTC",
        "currency_symbol": "BTC"
    }
}
{
    "url":"https://api.bibox.com/v1/orderpending",
    "form":{
        "cmds":"[{\"cmd\":\"orderpending/pendingHistoryList\",\"body\":{\"account_type\":0,\"order_side\":2,\"page\":1,\"size\":10,\"coin_symbol\":\"LTC\",\"currency_symbol\":\"BTC\"}}]",
        "apikey":"1e01c22ff8c59e9d98d93423817303f0e7c6d79d",
        "sign":"4e80fd525dbdebb74a60847308b50e37"
    }
}

// Response
{
    "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"
}

The order history detail

Name Necessary or not Type Description Default Value Range
id true string order id
account_type true integer Account type 0-spot account
  • example
// Request
{
    "cmd": "orderpending/orderDetail",
    "body": {
        "id": "11221615825364891"
    }
}
{
    "url":"https://api.bibox.com/v1/orderpending",
    "form":{
        "cmds":"[{\"cmd\":\"orderpending/orderDetail\",\"body\":{\"id\":\"11221615825364891\"}}]",
        "apikey":"1e01c22ff8c59e9d98d93423817303f0e7c6d79d",
        "sign":"3eead4ae66c0767be2d87ac4105f0dee"
    }
}

// Response
{
    "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"
}

The order

Name Necessary or not Type Description Default Value Range
id true string order id
account_type true integer Account type 0-spot account
  • example
// Request
{
    "cmd": "orderpending/order",
    "body": {
        "id": "100055558128036"
    }
}
{
    "url":"https://api.bibox.com/v1/orderpending",
    "form":{
        "cmds":"[{\"cmd\":\"orderpending/order\",\"body\":{\"id\":\"100055558128036\"}}]",
        "apikey":"1e01c22ff8c59e9d98d93423817303f0e7c6d79d",
        "sign":"970983d6d8ddf9c0db5181d4ce7b744b"
    }
}

// Response
{
    "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"
}

The dealed order history

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
  • example
// Request
{
    "cmd": "orderpending/orderHistoryList",
    "body": {
        "account_type": 0,
        "order_side": 2,
        "page": 1,
        "size": 10,
        "coin_symbol": "LTC",
        "currency_symbol": "BTC"
    }
}
{
    "url":"https://api.bibox.com/v1/orderpending",
    "form":{
        "cmds":"[{\"cmd\":\"orderpending/orderHistoryList\",\"body\":{\"account_type\":0,\"order_side\":2,\"page\":1,\"size\":10,\"coin_symbol\":\"LTC\",\"currency_symbol\":\"BTC\"}}]",
        "apikey":"1e01c22ff8c59e9d98d93423817303f0e7c6d79d",
        "sign":"443c8f691f9072c5c0bd3258f4ce89a1"
    }
}

// Response
{
    "result":{
        "count":1,
        "page":1,              
        "items":[               
            {
                "id":"100055558128033",
                "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"
}

The dealed order history last

  • Query the transaction records after the specified id number, and return 1000 records per page
  • POST https://api.bibox.com/v1/orderpending
  • cmd: orderpending/orderDetailsLast
  • Request parameter
Name Necessary or not Type Description Default Value Range
pair false string pair BIX_BTC, ETH_BTC, ...
account_type true integer account type 0-spot account
id true string Id number at the beginning of the transaction record greater than "1000000000"
page true integer The page number from the page 1
  • example
// Request
{
    "cmd": "orderpending/orderDetailsLast",
    "body": {
        "account_type": 0,
        "id": "1000000000",
        "page": 1,
        "pair": "LTC_BTC",
    }
}
{
    "url":"https://api.bibox.com/v1/orderpending",
    "form":{
       "cmds":"[{\"cmd\":\"orderpending/orderDetailsLast\",\"body\":{\"account_type\":0,\"id\":\"1000000000\",\"page\":1,\"pair\":\"LTC_BTC\"}}]",
       "apikey":"*****",
       "sign":"*****"
   }
}


// Response
{
    "result":[
        {
            "result":{
                "count":4,
                "page":1,
                "items":[
                    {
                        "id":"2251799818808964061",
                        "createdAt":1587004749000,
                        "account_type":0,
                        "coin_symbol":"LTC",
                        "currency_symbol":"BTC",
                        "order_side":1,
                        "order_type":2,
                        "price":"0.00587833",
                        "amount":"0.8497",
                        "money":"0.00499481",
                        "pay_bix":1,
                        "fee_symbol":"BIX",
                        "fee":"-0.26381928",
                        "is_maker":1,
                        "relay_id":"12557522307843276"
                    },
                    {
                        "id":"2251799818808964511",
                        "createdAt":1587004752000,
                        "account_type":0,
                        "coin_symbol":"LTC",
                        "currency_symbol":"BTC",
                        "order_side":1,
                        "order_type":2,
                        "price":"0.00587833",
                        "amount":"0.6864",
                        "money":"0.00403488",
                        "pay_bix":1,
                        "fee_symbol":"BIX",
                        "fee":"-0.21311705",
                        "is_maker":1,
                        "relay_id":"12557522307843276"
                    }
                ]
            },
            "cmd":"orderpending/orderDetailsLast"
        }
    ]
}
Copyright © bibox.com 2019 all right reserved,powered by GitbookUpdate Date: 2021-01-20

results matching ""

    No results matching ""