English
javascript

API简介

签名接口请求方式

完整例子

let CryptoJS = require("crypto-js");
let request = require("request");

let timestamp = Date.now(); // 1.当前时间戳

let param = { // 2.请求的参数
    select: 1
};

let strParam = JSON.stringify(param); // 2.格式化参数

let strToSign = '' + timestamp + strParam; // 3.这就是需要签名的字符串

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //你的 apikey 密码
let sign = CryptoJS.HmacMD5(strToSign, secret).toString();//4.签名后的结果

let url = "https://api.bibox.com/v3.1/transfer/assets";

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//5.设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: strParam // 6.格式化参数
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }
        console.log(body) // 7.返回值

    });

字段名 类型 描述 取值
content-type string 'application/json'
bibox-api-key string 你的apikey
bibox-timestamp long 当前时间戳,用毫秒表示 timestamp
bibox-api-sign string 签名结果 sign

网络测试

Request

let request = require("request");
let url = "https://api.bibox.com/v3/mdata/ping";
request.get(url, 
    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

GET https://api.bibox.com/v3/mdata/ping

参数名称 是否必须 类型 描述 默认值 取值范围

Response

{
    "state":0,
    "result":1604319540420,
    "cmd":"ping",
    "ver":"3"
}

名称 描述
state 0代表成功,否则代表失败
result 服务器时间戳
其它字段 忽略

市场行情

查询交易对

Request

let request = require("request");
let url = "https://api.bibox.com/v3/mdata/pairList";
request.get(url, 
    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

GET https://api.bibox.com/v3/mdata/pairList

参数名称 是否必须 类型 描述 默认值 取值范围

Response

{
    "state":0,
    "result":[
        {
            "id":1,
            "pair":"BIX_BTC",
            "pair_type":0,
            "area_id":7,
            "is_hide":0,
            "decimal":8
        },
        {
            "id":2,
            "pair":"BIX_ETH",
            "pair_type":0,
            "area_id":8,
            "is_hide":0,
            "decimal":8
        }
    ],
    "cmd":"pairList",
    "ver":"3"
}
名称 描述
state 0代表成功,否则代表失败
id 交易对id
pair 交易对symbol
decimal 价格精度
其它字段 忽略

查询k线

Request

let request = require("request");
let url = "https://api.bibox.com/v3/mdata/kline?pair=BTC_USDT&period=1min&size=2";
request.get(url, 
    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

GET https://api.bibox.com/v3/mdata/kline?pair=BTC_USDT&period=1min&size=10

参数名称 是否必须 类型 描述 默认值 取值范围
pair true string 交易对 BIX_BTC, ETH_BTC, ...
period true string k线周期 '1min', '3min', '5min', '15min', '30min', '1hour', '2hour', '4hour', '6hour', '12hour', 'day', 'week'
size false integer 数量 1000 1-1000

Response

{
    "state":0,
    "result":[
        {
            "time":1604319840000,
            "open":"11700.00000000",
            "high":"11700.00000000",
            "low":"11700.00000000",
            "close":"11700.00000000",
            "vol":"0.00000000"
        },
        {
            "time":1604319900000,
            "open":"11700.00000000",
            "high":"11700.00000000",
            "low":"11700.00000000",
            "close":"11700.00000000",
            "vol":"0.00000000"
        }
    ],
    "cmd":"kline",
    "ver":"3"
}
名称 描述
state 0代表成功,否则代表失败
time 时间戳
open 开盘价
high 最高价
low 最低价
close 收盘价
vol 成交量
其它字段 忽略

查询全币种市场行情

Request

let request = require("request");
let url = "https://api.bibox.com/v3/mdata/marketAll";
request.get(url, 
    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

GET https://api.bibox.com/v3/mdata/marketAll

参数名称 是否必须 类型 描述 默认值 取值范围

Response

{
    "state":0,
    "result":[
        {
            "is_hide":0,
            "high_cny":"0.3668",
            "amount":"380746.08",
            "coin_symbol":"BIX",
            "last":"0.053142",
            "currency_symbol":"USDT",
            "change":"+0.000460",
            "low_cny":"0.3470",
            "base_last_cny":"0.35286384",
            "area_id":15,
            "percent":"+0.87%",
            "last_cny":"0.3529",
            "high":"0.055248",
            "low":"0.052253",
            "pair_type":0,
            "last_usd":"0.0531",
            "vol24H":"7059898",
            "id":90,
            "high_usd":"0.0552",
            "low_usd":"0.0522"
        },
        {
             "is_hide":0,
             "high_cny":"92032.3103",
             "amount":"392242739.20",
             "coin_symbol":"BTC",
             "last":"13328.9300",
             "currency_symbol":"USDT",
             "change":"-437.5799",
             "low_cny":"87735.6210",
             "base_last_cny":"88504.33592048",
             "area_id":15,
             "percent":"-3.17%",
             "last_cny":"88504.3359",
             "high":"13860.2500",
             "low":"13213.1600",
             "pair_type":0,
             "last_usd":"13318.9290",
             "vol24H":"28728",
             "id":36,
             "high_usd":"13849.8503",
             "low_usd":"13203.2459"
        }
    ],
    "cmd":"marketAll",
    "ver":"3"
}
名称 描述
state 0代表成功,否则代表失败
id 交易对id
coin_symbol 交易币种
currency_symbol 定价币种
last 24h最新价
high 24h最高价
low 24h最低价
change 24h涨跌
percent 24h涨跌幅
vol24H 24h成交量
amount 24h成交额
last_cny 24h最新价折算cny
high_cny 24h最高价折算cny
low_cny 24h最低价折算cny
last_usd 24h最新价折算usd
high_usd 24h最高价折算usd
low_usd 24h最低价折算usd
其它字段 忽略

查询单币种市场行情

Request

let request = require("request");
let url = "https://api.bibox.com/v3/mdata/market?pair=BIX_USDT";
request.get(url, 
    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

GET https://api.bibox.com/v3/mdata/market?pair=BIX_USDT

参数名称 是否必须 类型 描述 默认值 取值范围
pair true string 交易对 BIX_BTC, ETH_BTC, ...

Response

{
    "state":0,
    "result":{
        "is_hide":0,
        "high_cny":"0.3668",
        "amount":"380746.08",
        "coin_symbol":"BIX",
        "last":"0.053142",
        "currency_symbol":"USDT",
        "change":"+0.000460",
        "low_cny":"0.3470",
        "base_last_cny":"0.35286384",
        "area_id":15,
        "percent":"+0.87%",
        "last_cny":"0.3529",
        "high":"0.055248",
        "low":"0.052253",
        "pair_type":0,
        "last_usd":"0.0531",
        "vol24H":"7059898",
        "id":90,
        "high_usd":"0.0552",
        "low_usd":"0.0522"
    },
    "cmd":"market",
    "ver":"3"
}
名称 描述
state 0代表成功,否则代表失败
id 交易对id
coin_symbol 交易币种
currency_symbol 定价币种
last 24h最新价
high 24h最高价
low 24h最低价
change 24h涨跌
percent 24h涨跌幅
vol24H 24h成交量
amount 24h成交额
last_cny 24h最新价折算cny
high_cny 24h最高价折算cny
low_cny 24h最低价折算cny
last_usd 24h最新价折算usd
high_usd 24h最高价折算usd
low_usd 24h最低价折算usd
其它字段 忽略

查询市场深度

Request

let request = require("request");
let url = "https://api.bibox.com/v3/mdata/depth?pair=BTC_USDT&size=2";
request.get(url, 
    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

GET https://api.bibox.com/v3/mdata/depth?pair=BIX_BTC&size=10

参数名称 是否必须 类型 描述 默认值 取值范围
pair true string 交易对 BIX_BTC, ETH_BTC, ...
size false integer 数量 200 1-200

Response

{
    "state":0,
    "result":{
        "pair":"BTC_USDT",
        "update_time":1604316939377,
        "asks":[
            {
                "volume":"0.00320000",
                "price":"11739.1407"
            },
            {
                "volume":"0.00320000",
                "price":"11762.6189"
            }
        ],
        "bids":[
            {
                "volume":"0.00640000",
                "price":"11692.3246"
            },
            {
                "volume":"0.00490000",
                "price":"11668.9866"
            }
        ]
    },
    "cmd":"depth",
    "ver":"3"
}
名称 描述
state 0代表成功,否则代表失败
pair 交易对
update_time 时间戳
asks 卖方深度
bids 买方深度
price 委托价格
volume 委托数量
其它字段 忽略

查询成交记录

Request

let request = require("request");
let url = "https://api.bibox.com/v3/mdata/deals?pair=BTC_USDT&size=2";
request.get(url, 
    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

GET https://api.bibox.com/v3/mdata/deals?pair=BTC_USDT&size=10

参数名称 是否必须 类型 描述 默认值 取值范围
pair true string 交易对 BIX_BTC, ETH_BTC, ...
size false integer 数量 200 1-200

Response

{
    "state":0,
    "result":[
        {
            "pair":"BTC_USDT",
            "price":"11700.0000",
            "amount":"0.01000000",
            "time":1604316939377,
            "side":2
        },
        {
            "pair":"BTC_USDT",
            "price":"11857.0026",
            "amount":"0.00160000",
            "time":1604308219643,
            "side":2
        }
    ],
    "cmd":"deals",
    "ver":"3"
}
名称 描述
state 0代表成功,否则代表失败
pair 交易对
price 成交价格
volume 成交数量
time 成交时间
side taker成交方向,1-买,2-卖
其它字段 忽略

查询市场ticker

Request

let request = require("request");
let url = "https://api.bibox.com/v3/mdata/ticker?pair=BTC_USDT";
request.get(url, 
    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

GET https://api.bibox.com/v3/mdata/ticker?pair=BTC_USDT

参数名称 是否必须 类型 描述 默认值 取值范围
pair true string 交易对 BIX_BTC, ETH_BTC, ...

Response

{
    "state":0,
    "result":{
        "pair":"BTC_USDT",
        "last":"11700.0000",
        "last_usd":"11700.00",
        "last_cny":"78287.05",
        "high":"11880.0000",
        "low":"11700.0000",
        "buy":"11692.3246",
        "buy_amount":"0.00640000",
        "sell":"11739.1407",
        "sell_amount":"0.00320000",
        "vol":"0.02160000",
        "percent":"-1.51%",
        "timestamp":1604316939377,
        "base_last_cny":"78287.05250000"
    },
    "cmd":"ticker",
    "ver":"3"
}
名称 描述
state 0代表成功,否则代表失败
pair 交易对symbol
buy 最新买一价
buy_amount 买一量
sell 最新卖一价
sell_amount 卖一量
high 24h最高价
last 最新成交价
low 24h最低价
timestamp 时间戳
vol 24h成交量
percent 24h涨跌幅
last_cny 最新成交价,cny计价
last_usd 最新成交价,usd计价
其它字段 忽略

下单限制信息

Request

let request = require("request");
let url = "https://api.bibox.com/v3.1/orderpending/tradeLimit";
request.get(url, 
    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

GET https://api.bibox.com/v3.1/orderpending/tradeLimit

参数名称 是否必须 类型 描述 默认值 取值范围

Response

{
    "result":{
        "min_trade_price":{
            "default":"0.00000001",
            "USDT":"0.0001",
            "DAI":"0.0001"
        },
        "min_trade_amount":{
            "default":"0.0001"
        },
        "min_trade_money":{
            "USDT":"1",
            "DAI":"1",
            "GUSD":"1",
            "BIX":"3",
            "BTC":"0.0002",
            "ETH":"0.005"
        }
    },
    "cmd":"tradeLimit",
    "state":0
}
名称 描述
state 0代表成功,否则代表失败
min_trade_price 最小下单价格栏
- default 普通交易对最小下单价格限制0.00000001
- USDT USDT交易区最下下单价格限制0.0001,超过0.0001的小数部分会自动舍弃,适用于所有以USDT计价的交易对
- DAI DAI交易区最小下单价格限制0.0001,超过0.0001的小数部分会自动舍弃,适用于所有以DAI计价的交易对
min_trade_amount 最小下单数量栏
- default 最小下单数量限制0.0001,超过0.0001的小数部分会自动舍弃,适用于所有交易对
min_trade_money 最小下单金额栏
- USDT USDT交易区最小下单金额限制为1,以此类推

资产信息(需要ApiKey)

钱包账户资产

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let url = "https://api.bibox.com/v3.1/transfer/assets";

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //your apikey secret

let param = {
    select: 1
};

let cmd = JSON.stringify(param); //format param
let timestamp = '' + (Date.now());
let sign = CryptoJS.HmacMD5(timestamp + cmd, secret).toString();//sign cmds

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: cmd//post参数字符串
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

POST https://api.bibox.com/v3.1/transfer/assets

参数名称 是否必须 类型 描述 默认值 取值范围
select false integer 是否查询资产明细 0-各币种总资产合计,1-请求所有币种资产明细

Response

{
    "result":{
        "total_btc":"0.01373280",
        "total_cny":"1253.48",
        "total_usd":"188.63",
        "assets_list":[
            {
                "coin_symbol":"BTC",
                "BTCValue":"0.00149188",
                "CNYValue":"136.17",
                "USDValue":"20.49",
                "balance":"0.00149188",
                "freeze":"0.00000000"
            },
            {
                "coin_symbol":"BIX",
                "BTCValue":"0.00098407",
                "CNYValue":"89.82",
                "USDValue":"13.52",
                "balance":"247.87570000",
                "freeze":"0.00000000"
            }
        ]
    },
    "cmd":"assets",
    "state":0
}
名称 描述
state 0代表成功,否则代表失败
total_btc 各币种资产总和,btc计价
total_cny 各币种资产总和,cny计价
total_usd 各币种资产总和,usd计价
assets_list 币种资产列表
coin_symbol 币种
balance 可用资产
freeze 冻结资产
BTCValue btc估值
CNYValue cny估值
USDValue usd估值
其它字段 忽略

币币账户资产

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let url = "https://api.bibox.com/v3.1/spot/account/assets";

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //your apikey secret

let param = {
    select: 1
};

let cmd = JSON.stringify(param); //format param
let timestamp = '' + (Date.now());
let sign = CryptoJS.HmacMD5(timestamp + cmd, secret).toString();//sign cmds

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: cmd//post参数字符串
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

POST https://api.bibox.com/v3.1/spot/account/assets

参数名称 是否必须 类型 描述 默认值 取值范围
select false integer 是否查询资产明细 0-各币种总资产合计,1-请求所有币种资产明细

Response

{
    "result":{
        "total_btc":"0.01373280",
        "total_cny":"1253.48",
        "total_usd":"188.63",
        "assets_list":[
            {
                "coin_symbol":"BTC",
                "BTCValue":"0.00149188",
                "CNYValue":"136.17",
                "USDValue":"20.49",
                "balance":"0.00149188",
                "freeze":"0.00000000"
            },
            {
                "coin_symbol":"BIX",
                "BTCValue":"0.00098407",
                "CNYValue":"89.82",
                "USDValue":"13.52",
                "balance":"247.87570000",
                "freeze":"0.00000000"
            }
        ]
    },
    "cmd":"assets",
    "state":0
}
名称 描述
state 0代表成功,否则代表失败
total_btc 各币种资产总和,btc计价
total_cny 各币种资产总和,cny计价
total_usd 各币种资产总和,usd计价
assets_list 币种资产列表
coin_symbol 币种
balance 可用资产
freeze 冻结资产
BTCValue btc估值
CNYValue cny估值
USDValue usd估值
其它字段 忽略

充值

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let url = "https://api.bibox.com/v3.1/transfer/transferIn";

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //your apikey secret

let param = {
    coin_symbol: 'BTC'
};

let cmd = JSON.stringify(param); //format param
let timestamp = '' + (Date.now());
let sign = CryptoJS.HmacMD5(timestamp + cmd, secret).toString();//sign cmds

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: cmd//post参数字符串
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

POST https://api.bibox.com/v3.1/transfer/transferIn

参数名称 是否必须 类型 描述 默认值 取值范围
coin_symbol true string 充值币种 BIX, BTC, ...

Response

{
    "result":"13f2LpNAdsKuxdTt2bKFLaSZL7toeyieGE",
    "cmd":"transferIn",
    "state":0
}
名称 描述
state 0代表成功,否则代表失败
result 充值地址
其它字段 忽略

提现

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let url = "https://api.bibox.com/v3.1/transfer/transferOut";

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //your apikey secret

let param = {
    coin_symbol: 'BTC',
    amount: 0.1,
    addr: '13f2LpNAdsKuxdTt2bKFLaSZL7toeyieGExxx',
    memo: ''
};

let cmd = JSON.stringify(param); //format param
let timestamp = '' + (Date.now());
let sign = CryptoJS.HmacMD5(timestamp + cmd, secret).toString();//sign cmds

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: cmd//post参数字符串
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

POST https://api.bibox.com/v3.1/transfer/transferOut

参数名称 是否必须 类型 描述 默认值 取值范围
coin_symbol true string 提现币种 BIX, BTC, ...
amount true double 提现数量 需大于各币种最小提现数量
addr true string 提现地址 币种合法地址
memo false string 提现标签 一些币种提现必须指定标签,与地址组合标识唯一性,比如EOS

Response

{
    "state":0,
    "result":228,
    "cmd":"transfer/transferOut"
}
名称 描述
state 0代表成功,否则代表失败
result 提现id
其它字段 忽略

查询充值记录

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let url = "https://api.bibox.com/v3.1/transfer/transferInList";

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //your apikey secret

let param = {
    coin_symbol: 'USDT',
    filter_type: 0,
    page: 1,
    size: 10
};

let cmd = JSON.stringify(param); //format param
let timestamp = '' + (Date.now());
let sign = CryptoJS.HmacMD5(timestamp + cmd, secret).toString();//sign cmds

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: cmd//post参数字符串
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

POST https://api.bibox.com/v3.1/transfer/transferInList

参数名称 是否必须 类型 描述 默认值 取值范围
filter_type false integer 充值记录筛选 0 0-全部,1-充值进行中,2-充值到账,3-充值失败
coin_symbol false string 充值币种 BIX, ETH, ...
page true integer 第几页 从1开始
size true integer 每页数量 1-50

Response

{
    "result":{
        "count":1,
        "page":1,
        "items":[
            {
                "id":1682192,
                "to":"TXLhYFsWu84vU5ngs8J88yphTPdv69zrqoD",
                "tx_id":"a8f77b3a20758d85f71f2d993766c9b6c2daf1b1f34992e409e1a47247e5a5e45",
                "coin_symbol":"USDT",
                "chain_type":"TRC20",
                "confirmCount":"20",
                "amount":"0.00094400",
                "createdAt":1596876872000,
                "status":2
            }
        ]
    },
    "cmd":"transferInList",
    "state":0
}
名称 描述
state 0代表成功,否则代表失败
count 当前页记录数,若存在下页,count=当前页记录数+1
page 第几页,从1开始
items 记录列表
coin_symbol 币种
to_address 充值地址
amount 充值数量
confirmCount 充值确认数
createdAt 充值时间
status 状态, 1-充值进行中,2-充值到账,3-充值失败
其它字段 忽略

查询提现记录

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let url = "https://api.bibox.com/v3.1/transfer/transferOutList";

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //your apikey secret

let param = {
    coin_symbol: 'USDT',
    filter_type: 2,
    page: 1,
    size: 10
};

let cmd = JSON.stringify(param); //format param
let timestamp = '' + (Date.now());
let sign = CryptoJS.HmacMD5(timestamp + cmd, secret).toString();//sign cmds

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: cmd//post参数字符串
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

POST https://api.bibox.com/v3.1/transfer/transferOutList

参数名称 是否必须 类型 描述 默认值 取值范围
filter_type false integer 提现记录筛选 -2:审核不通过;-1: 用户撤销;0:待审核; 1:审核通过(待发币); 2: 发币中; 3:发币完成
coin_symbol false string 提现币种 BIX, ETH, ...
page true integer 第几页 从1开始
size true integer 每页数量 1-50

Response

{
    "result":{
        "count":1,
        "page":1,
        "items":[
            {
                "id":809022,
                "to_address":"0x606a84A14307418F47C6ad538b5E73C93Ff9C8Cf",
                "tx_id":"0xd3cf26d514c1e62f85de84b4e24fbd219084dd078daa7e639844c33cdf81bd62b",
                "coin_symbol":"USDT",
                "chain_type":"ERC20",
                "amount_real":"1000.00000000",
                "amount":"1003.00000000",
                "createdAt":1596876972000,
                "memo":"",
                "status":2
            }
        ]
    },
    "cmd":"transferOutList",
    "state":0
}
名称 描述
state 0代表成功,否则代表失败
count 当前页记录数,若存在下页,count=当前页记录数+1
page 第几页,从1开始
items 记录列表
coin_symbol 币种
to_address 提现地址
amount 提现数量
fee 提现手续费
createdAt 充值时间
memo memo
status 状态, 1-进行中,2-提现成功,3-提现失败,4-提现被撤销
其它字段 忽略

获取币种配置

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let url = "https://api.bibox.com/v3.1/transfer/coinConfig";

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //your apikey secret

let param = {
};

let cmd = JSON.stringify(param); //format param
let timestamp = '' + (Date.now());
let sign = CryptoJS.HmacMD5(timestamp + cmd, secret).toString();//sign cmds

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: cmd//post参数字符串
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

POST https://api.bibox.com/v3.1/transfer/coinConfig

参数名称 是否必须 类型 描述 默认值 取值范围
coin_symbol false string 币种 BIX, ETH...

Response

{
    "result":[
        {
            "coin_symbol":"BTC",
            "is_active":1,
            "original_decimals":8,
            "enable_deposit":1,
            "enable_withdraw":1,
            "withdraw_fee":0.0008,
            "withdraw_min":0.005
        }
    ],
    "cmd":"coinConfig",
    "state":0
}
名称 描述
state 0代表成功,否则代表失败
coin_symbol 币种
original_decimals 币种原值精度
enable_deposit 是否可充值,0-禁止,1-可以
enable_withdraw 是否可提现,0-禁止,1-可以
withdraw_fee 提现手续费
withdraw_min 最小提现数量
其它字段 忽略

查询某一条提现记录

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let url = "https://api.bibox.com/v3.1/transfer/withdrawInfo";

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //your apikey secret

let param = {
    id: 228
};

let cmd = JSON.stringify(param); //format param
let timestamp = '' + (Date.now());
let sign = CryptoJS.HmacMD5(timestamp + cmd, secret).toString();//sign cmds

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: cmd//post参数字符串
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

POST https://api.bibox.com/v3.1/transfer/withdrawInfo

参数名称 是否必须 类型 描述 默认值 取值范围
id true integer 提现id

Response

{
    "state":0,
    "result":{
        "id":228,
        "createdAt": 1512756997000,
        "coin_symbol":"LTC",
        "to_address":"xxxxxxxxxxxxxxxxxxxxxxxxxx",
        "status":3,
        "amount":"1.00000000", 
        "fee":0.1
    },
    "cmd":"withdrawInfo"
}
名称 描述
state 0代表成功,否则代表失败
id 提现id
coin_symbol 币种
createdAt 提现时间
to_address 提现地址
status 状态, -2:审核不通过;-1: 用户撤销;0:待审核; 1:审核通过(待发币); 2: 发币中; 3:发币完成
amount 提现数量
fee 提现手续费
其它字段 忽略

币币交易(需要ApiKey)

下单

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let url = "https://api.bibox.com/v3.1/orderpending/trade";

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //your apikey secret

let param = {
    pair: 'BIX_USDT',
    account_type: 0,
    order_side: 2,
    order_type: 2,
    price: 0.05458,
    amount: 100
};

let cmd = JSON.stringify(param); //format param
let timestamp = '' + (Date.now());
let sign = CryptoJS.HmacMD5(timestamp + cmd, secret).toString();//sign cmds

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: cmd//post参数字符串
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

POST https://api.bibox.com/v3.1/orderpending/trade

参数名称 是否必须 类型 描述 默认值 取值范围
pair true string 交易对 BIX_BTC, ETH_BTC, ...
account_type true integer 账户类型 0-币币账户
order_type true integer 交易类型 2-限价单
order_side true integer 交易方向 1-买,2-卖
price true double 委托价格 最小值 0.00000001
amount true double 委托数量 最小值 0.0001
client_oid false long to string 用户自定义id '110011223344'

Response

{
    "result":"12845594488036185",
    "cmd":"trade",
    "state":0
}
名称 描述
state 0代表成功,否则代表失败
result 订单id
其它字段 忽略

撤单

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let url = "https://api.bibox.com/v3.1/orderpending/cancelTrade";

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //your apikey secret

let param = {
    orders_id:"12845594488036185"
};

let cmd = JSON.stringify(param); //format param
let timestamp = '' + (Date.now());
let sign = CryptoJS.HmacMD5(timestamp + cmd, secret).toString();//sign cmds

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: cmd//post参数字符串
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

POST https://api.bibox.com/v3.1/orderpending/cancelTrade

参数名称 是否必须 类型 描述 默认值 取值范围
orders_id true string 委托单id

Response

{
    "result":"OK",
    "cmd":"cancelTrade",
    "state":0
}
名称 描述
state 0代表成功,否则代表失败
result 注意:该结果只表示服务器接收到撤单请求,撤销结果可查询订单记录
其它字段 忽略

当前委托

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let url = "https://api.bibox.com/v3.1/orderpending/orderPendingList";

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //your apikey secret

let param = {
    pair: 'BIX_USDT',
    account_type: 0,
    page: 1,
    size: 10
};

let cmd = JSON.stringify(param); //format param
let timestamp = '' + (Date.now());
let sign = CryptoJS.HmacMD5(timestamp + cmd, secret).toString();//sign cmds

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: cmd//post参数字符串
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

POST https://api.bibox.com/v3.1/orderpending/orderPendingList

参数名称 是否必须 类型 描述 默认值 取值范围
pair false string 交易对 BIX_BTC, ETH_BTC, ...
account_type true integer 账户类型 0-币币账户
order_side false integer 交易方向 1-买,2-卖
coin_symbol false string 交易币种 BIX, EOS, ...
currency_symbol false string 定价币种 BTC, USDT, ...
page true integer 第几页 从1开始
size true integer 每页数量 1-50

Response

{
    "result":{
        "count":1,
        "page":1,
        "items":[
            {
                "id":"12874181782731851",
                "createdAt":1604309861000,
                "account_type":0,
                "pair":"BIX_USDT",
                "coin_symbol":"BIX",
                "currency_symbol":"USDT",
                "order_side":2,
                "order_type":2,
                "price":"0.054330",
                "deal_price":"0.000000",
                "amount":"100.0000",
                "money":"5.43300000",
                "deal_amount":"0.0000",
                "deal_percent":"0.00%",
                "deal_money":"0.00000000",
                "deal_count":0,
                "status":1,
                "unexecuted":"100.0000"
            }
        ]
    },
    "cmd":"orderPendingList",
    "state":0
}
名称 描述
state 0代表成功,否则代表失败
count 当前页记录数,若存在下页,count=当前页记录数+1
page 第几页,从1开始
items 记录列表
id 订单id
createdAt 创建时间
account_type 账户类型 0-币币账户
coin_symbol 交易币种
currency_symbol 定价币种
order_side 交易方向,1-买,2-卖
order_type 订单类型,1-市价单,2-限价单
price 委托价格
amount 委托数量
money 委托金额
deal_amount 成交数量
deal_percent 成交百分比
unexecuted 未成交数量
status 状态,-1 失败,0或1-待成交,2-部分成交,3-完全成交,4-部分撤销,5-完全撤销,6-待撤销
其它字段 忽略

历史委托

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let url = "https://api.bibox.com/v3.1/orderpending/pendingHistoryList";

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //your apikey secret

let param = {
    pair: 'BIX_USDT',
    account_type: 0,
    page: 1,
    size: 10
};

let cmd = JSON.stringify(param); //format param
let timestamp = '' + (Date.now());
let sign = CryptoJS.HmacMD5(timestamp + cmd, secret).toString();//sign cmds

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: cmd//post参数字符串
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

POST https://api.bibox.com/v3.1/orderpending/pendingHistoryList

参数名称 是否必须 类型 描述 默认值 取值范围
pair false string 交易对 BIX_BTC, ETH_BTC, ...
account_type true integer 账户类型 0-币币账户
order_side false integer 交易方向 1-买,2-卖
coin_symbol false string 交易币种 BIX, EOS, ...
currency_symbol false string 定价币种 BTC, USDT, ...
hide_cancel false integer 隐藏已撤销订单 0-不隐藏,1-隐藏
page true integer 第几页 从1开始
size true integer 每页数量 1-50

Response

{
    "result":{
        "count":11,
        "page":1,
        "items":[
            {
                "id":"12845594488036185",
                "createdAt":1604305967000,
                "account_type":0,
                "coin_symbol":"BIX",
                "currency_symbol":"USDT",
                "order_side":2,
                "order_type":2,
                "price":"0.054580",
                "amount":"100.0000",
                "money":"5.45800000",
                "deal_price":"0.000000",
                "deal_amount":"0.0000",
                "deal_money":"0.00000000",
                "status":5
            }
        ]
    },
    "cmd":"pendingHistoryList",
    "state":0
}
名称 描述
state 0代表成功,否则代表失败
count 当前页记录数,若存在下页,count=当前页记录数+1
page 第几页,从1开始
items 记录列表
id 订单id
createdAt 创建时间
account_type 账户类型 0-币币账户
coin_symbol 交易币种
currency_symbol 定价币种
order_side 交易方向,1-买,2-卖
order_type 订单类型,1-市价单,2-限价单
price 委托价格
amount 委托数量
money 委托金额
deal_price 成交均价
deal_amount 成交数量
deal_money 成交金额
status 状态,-1 失败,0或1-待成交,2-部分成交,3-完全成交,4-部分撤销,5-完全撤销,6-待撤销
其它字段 忽略

成交记录

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let url = "https://api.bibox.com/v3.1/orderpending/orderDetail";

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //your apikey secret

let param = {
    id: "12826902662624234",
    account_type: 0
};

let cmd = JSON.stringify(param); //format param
let timestamp = '' + (Date.now());
let sign = CryptoJS.HmacMD5(timestamp + cmd, secret).toString();//sign cmds

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: cmd//post参数字符串
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

POST https://api.bibox.com/v3.1/orderpending/orderDetail

参数名称 是否必须 类型 描述 默认值 取值范围
id true string 委托单id
account_type true integer 账户类型 0-币币账户

Response

{
    "result":{
        "sum":"3.57490350",
        "orderList":[
            {
                "id":"2251799823470863898",
                "createdAt":1599730918000,
                "account_type":0,
                "coin_symbol":"BIX",
                "currency_symbol":"USDT",
                "order_side":1,
                "order_type":2,
                "price":"0.071300",
                "amount":"0.4825",
                "money":"0.03440225",
                "pay_bix":0,
                "fee_symbol":"BIX",
                "fee":"0.00000000",
                "is_maker":0,
                "relay_id":"12826902662624234"
            },
            {
                "id":"2251799823470863900",
                "createdAt":1599730918000,
                "account_type":0,
                "coin_symbol":"BIX",
                "currency_symbol":"USDT",
                "order_side":1,
                "order_type":2,
                "price":"0.071500",
                "amount":"39.8408",
                "money":"2.84861720",
                "pay_bix":0,
                "fee_symbol":"BIX",
                "fee":"0.00000000",
                "is_maker":0,
                "relay_id":"12826902662624234"
            },
            {
                "id":"2251799823470863902",
                "createdAt":1599730918000,
                "account_type":0,
                "coin_symbol":"BIX",
                "currency_symbol":"USDT",
                "order_side":1,
                "order_type":2,
                "price":"0.071500",
                "amount":"9.6767",
                "money":"0.69188405",
                "pay_bix":0,
                "fee_symbol":"BIX",
                "fee":"0.00000000",
                "is_maker":0,
                "relay_id":"12826902662624234"
            }
        ]
    },
    "cmd":"orderDetail",
    "state":0
}
名称 描述
state 0代表成功,否则代表失败
sum 成交总额
orderList 成交记录列表
id 成交记录id
createdAt 成交时间
account_type 账户类型 0-币币账户
coin_symbol 交易币种
currency_symbol 定价币种
order_side 交易方向,1-买,2-卖
order_type 订单类型,1-市价单,2-限价单
price 成交价格
amount 成交数量
money 成交金额
pay_bix bix抵扣,0-未开启 1-开启
fee_symbol 手续费币种
fee 手续费
is_maker 是否maker,0-否,1-是
relay_id 关联订单id
其它字段 忽略

委托单详情

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let url = "https://api.bibox.com/v3.1/orderpending/order";

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //your apikey secret

let param = {
    id: "12845594488036185",
    account_type: 0
};

let cmd = JSON.stringify(param); //format param
let timestamp = '' + (Date.now());
let sign = CryptoJS.HmacMD5(timestamp + cmd, secret).toString();//sign cmds

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: cmd//post参数字符串
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

POST https://api.bibox.com/v3.1/orderpending/order

参数名称 是否必须 类型 描述 默认值 取值范围
id true string 委托单id
account_type true integer 账户类型 0-币币账户

Response

{
    "result":{
        "id":"12845594488036185",
        "createdAt":1604305967000,
        "account_type":0,
        "pair":"BIX_USDT",
        "coin_symbol":"BIX",
        "currency_symbol":"USDT",
        "order_side":2,
        "order_type":2,
        "price":"0.054580",
        "deal_price":"0.000000",
        "amount":"100.0000",
        "money":"5.45800000",
        "deal_amount":"0.0000",
        "deal_percent":"0.00%",
        "deal_money":"0.00000000",
        "deal_count":0,
        "status":5,
        "unexecuted":"100.0000"
    },
    "cmd":"order",
    "state":0
}
名称 描述
state 0代表成功,否则代表失败
id 订单id
createdAt 创建时间
account_type 账户类型 0-币币账户
pair 交易对
coin_symbol 交易币种
currency_symbol 定价币种
order_side 交易方向,1-买,2-卖
order_type 订单类型,1-市价单,2-限价单
price 委托价格
amount 委托数量
money 委托金额
deal_amount 已成交数量
deal_percent 成交百分比
unexecuted 未成交数量
status 状态,-1 失败,0或1-待成交,2-部分成交,3-完全成交,4-部分撤销,5-完全撤销,6-待撤销
其它字段 忽略

成交明细

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let url = "https://api.bibox.com/v3.1/orderpending/orderHistoryList";

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //your apikey secret

let param = {
    pair: 'BIX_USDT',
    account_type: 0,
    page: 1,
    size: 10
};

let cmd = JSON.stringify(param); //format param
let timestamp = '' + (Date.now());
let sign = CryptoJS.HmacMD5(timestamp + cmd, secret).toString();//sign cmds

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: cmd//post参数字符串
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

POST https://api.bibox.com/v3.1/orderpending/orderHistoryList

参数名称 是否必须 类型 描述 默认值 取值范围
pair false string 交易对 BIX_BTC, ETH_BTC, ...
account_type true integer 账户类型 0-币币账户
order_side false integer 交易方向 1-买,2-卖
coin_symbol false string 交易币种 BIX, EOS, ...
currency_symbol false string 定价币种 BTC, USDT, ...
page true integer 第几页 从1开始
size true integer 每页数量 1-50

Response

{
    "result":{
        "count":1,
        "page":1,
        "items":[
            {
                "id":"2251799823470863902",
                "createdAt":1599730918000,
                "account_type":0,
                "coin_symbol":"BIX",
                "currency_symbol":"USDT",
                "order_side":1,
                "order_type":2,
                "price":"0.071500",
                "amount":"9.6767",
                "money":"0.69188405",
                "pay_bix":0,
                "fee_symbol":"BIX",
                "fee":"0.00000000",
                "is_maker":0,
                "relay_id":"12826902662624234"
            }
        ]
    },
    "cmd":"orderHistoryList",
    "state":0
}
名称 描述
state 0代表成功,否则代表失败
count 当前页记录数,若存在下页,count=当前页记录数+1
page 第几页
items 记录列表
id 订单id
createdAt 成交时间
account_type 账户类型 0-币币账户
coin_symbol 交易币种
currency_symbol 定价币种
order_side 交易方向,1-买,2-卖
order_type 订单类型,1-市价单,2-限价单
price 成交价格
amount 成交数量
money 成交金额
fee 手续费
pay_bix bix抵扣,0-未开启 1-开启
fee_symbol 手续费币种
is_maker 是否maker
relay_id 关联订单id
其它字段 忽略

最新成交明细

查询指定id号之后的成交记录,分页返回1000条

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let url = "https://api.bibox.com/v3.1/orderpending/orderDetailsLast";

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //your apikey secret

let param = {
    pair: 'BIX_USDT',
    account_type: 0,
    page: 1,
    id:"2251799823470863900"
};

let cmd = JSON.stringify(param); //format param
let timestamp = '' + (Date.now());
let sign = CryptoJS.HmacMD5(timestamp + cmd, secret).toString();//sign cmds

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: cmd//post参数字符串
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }

        console.log(body)

    });

POST https://api.bibox.com/v3.1/orderpending/orderDetailsLast

参数名称 是否必须 类型 描述 默认值 取值范围
pair false string 交易对 BIX_BTC, ETH_BTC, ...
account_type true integer 账户类型 0-币币账户
id true string 成交记录开始的id号 大于"1000000000"
page true integer 第几页 从1开始

Response

{
    "result":{
        "count":2,
        "page":1,
        "items":[
            {
                "id":"2251799823470863902",
                "createdAt":1599730918000,
                "account_type":0,
                "coin_symbol":"BIX",
                "currency_symbol":"USDT",
                "order_side":1,
                "order_type":2,
                "price":"0.071500",
                "amount":"9.6767",
                "money":"0.69188405",
                "pay_bix":0,
                "fee_symbol":"BIX",
                "fee":"0.00000000",
                "is_maker":0,
                "relay_id":"12826902662624234"
            },
            {
                "id":"2251799825448005865",
                "createdAt":1604312287000,
                "account_type":0,
                "coin_symbol":"BIX",
                "currency_symbol":"USDT",
                "order_side":2,
                "order_type":2,
                "price":"0.054330",
                "amount":"100.0000",
                "money":"5.43300000",
                "pay_bix":0,
                "fee_symbol":"USDT",
                "fee":"0.00000000",
                "is_maker":1,
                "relay_id":"12874181782731851"
            }
        ]
    },
    "cmd":"orderDetailsLast",
    "state":0
}
名称 描述
state 0代表成功,否则代表失败
count 当前页记录数,若存在下页,count=当前页记录数+1
page 第几页
items 记录列表
id 订单id
createdAt 成交时间
account_type 账户类型 0-币币账户
coin_symbol 交易币种
currency_symbol 定价币种
order_side 交易方向,1-买,2-卖
order_type 订单类型,1-市价单,2-限价单
price 成交价格
amount 成交数量
money 成交金额
pay_bix bix抵扣,0-未开启 1-开启
fee_symbol 手续费币种
fee 手续费
is_maker 是否maker,0-否,1-是
relay_id 关联订单id
其它字段 忽略

资金划转(需要ApiKey)

钱包划转到币币

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let timestamp = Date.now(); // 1.当前时间戳

let param = {
    "type": 0,
    "amount": "100",
    "symbol": 'USDT'
};

let strParam = JSON.stringify(param); // 2.格式化参数

let strToSign = '' + timestamp + strParam; // 3.这就是需要签名的字符串

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //你的 apikey 密码
let sign = CryptoJS.HmacMD5(strToSign, secret).toString();//4.签名后的结果

let url = "https://api.bibox.com/v3.1/assets/transfer/spot";

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//5.设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: strParam // 6.格式化参数
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }
        console.log(body) // 7.返回值

    });

POST https://api.bibox.com/v3.1/assets/transfer/spot

参数名称 是否必须 类型 描述 默认值 取值范围
symbol true string 币种
amount false string 数量
type false int 0钱包转币币; 1币币转钱包

Response

{}

钱包划转到杠杆

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let timestamp = Date.now(); // 1.当前时间戳

let param = {
    "pair": "*_USDT",
    "amount": 100,
    "symbol": 'USDT'
};

let strParam = JSON.stringify(param); // 2.格式化参数

let strToSign = '' + timestamp + strParam; // 3.这就是需要签名的字符串

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //你的 apikey 密码
let sign = CryptoJS.HmacMD5(strToSign, secret).toString();//4.签名后的结果

let url = "https://api.bibox.com/v3.1/credit/transferAssets/base2credit";

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//5.设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: strParam // 6.格式化参数
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }
        console.log(body) // 7.返回值

    });

POST https://api.bibox.com/v3.1/credit/transferAssets/base2credit

参数名称 是否必须 类型 描述 默认值 取值范围
coin_symbol true string 币种
amount false double 数量
pair false string 仓位 EOS_USDT,BTC_USDT, *_USDT...

Response

{}

杠杆划转到钱包

Request

let CryptoJS = require("crypto-js");
let request = require("request");

let timestamp = Date.now(); // 1.当前时间戳

let param = {
    "pair": "BTC_USDT",
    "amount": 100,
    "symbol": 'USDT'
};

let strParam = JSON.stringify(param); // 2.格式化参数

let strToSign = '' + timestamp + strParam; // 3.这就是需要签名的字符串

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //你的 apikey 密码
let sign = CryptoJS.HmacMD5(strToSign, secret).toString();//4.签名后的结果

let url = "https://api.bibox.com/v3.1/credit/transferAssets/credit2base";

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//5.设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: strParam // 6.格式化参数
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }
        console.log(body) // 7.返回值

    });

POST https://api.bibox.com/v3.1/credit/transferAssets/credit2base

参数名称 是否必须 类型 描述 默认值 取值范围
coin_symbol true string 币种
amount false double 数量
pair false string 仓位 EOS_USDT,BTC_USDT, *_USDT...

Response

{}

杠杆交易(需要ApiKey)

获取放贷信息

示例

let CryptoJS = require("crypto-js");
let request = require("request");

let timestamp = Date.now(); // 1.当前时间戳

let param = {
    "page":1,
    "status":[
        0,
        1
    ],
    "coin_symbol":"USDT",
    "size":1
};

let strParam = JSON.stringify(param); // 2.格式化参数

let strToSign = '' + timestamp + strParam; // 3.这就是需要签名的字符串

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //你的 apikey 密码
let sign = CryptoJS.HmacMD5(strToSign, secret).toString();//4.签名后的结果

let url = "https://api.bibox.com/v3.1/credit/lendOrder/get";

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//5.设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: strParam // 6.格式化参数
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }
        console.log(body) // 7.返回值

    });

POST https://api.bibox.com/v3.1/credit/lendOrder/get

参数名称 是否必须 类型 描述 默认值 取值范围
coin_symbol true string 币种
status false int 0-借出 1-部分收回 2-完成
page false int 页码
size false int 每页数量

Response

{
    "count": 2,
    "page": 1,
    "items": [
        {
            "id": 14,
            "user_id": 8114202916,
            "coin_id": 60,
            "coin_symbol": "USDT",
            "amount": "1000.00000000",
            "amount_receipt": "0.00000000",
            "interest_rate": "0.00200000",
            "insurance_rate": "0.10000000",
            "fee": "0.00000000",
            "insurance": "0.00000000",
            "interest": "2.33333324",
            "interest_receipt": "0.00000000",
            "period": 7,
            "expireAt": "2019-11-18T03:00:00.000Z",
            "status": 0,
            "createdAt": "2019-11-11T03:50:47.000Z",
            "days": 1
        }
    ],
    "validSymbols": [
        "USDT"
    ]
}

名称 描述
coin_symbol 币种
amount 已放款数量
amount_receipt 已收回放款
interest_rate 利率
insurance_rate 保险费率
fee 已收回放款
insurance 保险
interest 利息
status 0:已借出,1部分收回,2全部收回

获取借款信息

示例

let CryptoJS = require("crypto-js");
let request = require("request");

let timestamp = Date.now(); // 1.当前时间戳

let param = {
    "page":1,
    "status":[
        1,
        2
    ],
    "size":10,
    "pair":"BTC_USDT"
};

let strParam = JSON.stringify(param); // 2.格式化参数

let strToSign = '' + timestamp + strParam; // 3.这就是需要签名的字符串

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //你的 apikey 密码
let sign = CryptoJS.HmacMD5(strToSign, secret).toString();//4.签名后的结果

let url = "https://api.bibox.com/v3.1/credit/borrowOrder/get";

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//5.设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: strParam // 6.格式化参数
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }
        console.log(body) // 7.返回值

    });

POST https://api.bibox.com/v3.1/credit/borrowOrder/get

参数名称 是否必须 类型 描述 默认值 取值范围
coin_symbol true string 交易币种 USDT, EOS...
pair true string 仓位 BTC_USDT, ETH_USDT, *_USDT-全仓
status true int或Array 订单状态 0未成交, 1借款成功, 2部分还款, 3-6已完成
page true integer 第几页 从1开始
size true integer 每页数量 1-50

Response

{
    "count": 2,
    "page": 1,
    "items": [
        {
            "id": 539354,
            "user_id": 8114202916,
            "coin_id": 60,
            "coin_symbol": "USDT",
            "pair": "BTC_USDT",
            "amount": "406.00000000",
            "amount_refund": "0.00000000",
            "interest_rate": "0.00010000",
            "interest_rate_hour": "0.00000417",
            "interest": "0.26559180",
            "interest_refund": "0.00000000",
            "period": 7,
            "expireAt": "2019-11-15T11:00:00.000Z",
            "status": 1,
            "createdAt": "2019-11-08T11:53:15.000Z"
        }
    ],
    "validSymbols": [
        {
            "coin_symbol": "USDT",
            "pair": "BTC_USDT"
        }
    ]
}

名称 描述
coin_symbol 币种
pair 仓位信息
amount 借款数量
amount_refund 已还款数量
interest_rate 日利率
interest 未还利息
interest_refund 已还利息
status 1借款成功,2部分还款,3还款成功

获取放贷未成交信息

示例

let CryptoJS = require("crypto-js");
let request = require("request");

let timestamp = Date.now(); // 1.当前时间戳

let param = {
    "page":1,
    "status":[
        0,
        1
    ],
    "coin_symbol":"EOS",
    "size":50
}

let strParam = JSON.stringify(param); // 2.格式化参数

let strToSign = '' + timestamp + strParam; // 3.这就是需要签名的字符串

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //你的 apikey 密码
let sign = CryptoJS.HmacMD5(strToSign, secret).toString();//4.签名后的结果

let url = "https://api.bibox.com/v3.1/credit/lendOrderbook/get";

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//5.设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: strParam // 6.格式化参数
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }
        console.log(body) // 7.返回值

    });

POST https://api.bibox.com/v3.1/credit/lendOrderbook/get

参数名称 是否必须 类型 描述 默认值 取值范围
coin_symbol true string 交易币种 USDT, EOS, ...
status true integer或integerArray 订单状态 0未成交, 1部分成交, 2已完成
page true integer 第几页 从1开始
size true integer 每页数量 1-50

Response

{
    "count":1,
    "page":1,
    "items":[
        {
            "id":1,
            "user_id":10000000,
            "coin_id":61,
            "coin_symbol":"EOS",
            "amount":5,
            "amount_finish":0,
            "interest_rate":0.001,
            "period":7,
            "expireAt":"2018-12-29T10:59:18.000Z", 
            "status":0,
            "createdAt":"2018-12-22T10:59:18.000Z" 
        }
    ],
    "validSymbols":[
        "EOS"
    ]
}

名称 描述
coin_symbol 币种
amount 待成交数量
amount_finish 已成交数量
interest_rate 利率

获取放贷资产信息

示例

let CryptoJS = require("crypto-js");
let request = require("request");

let timestamp = Date.now(); // 1.当前时间戳

let param = {
    "coin_symbol":"EOS"
};

let strParam = JSON.stringify(param); // 2.格式化参数

let strToSign = '' + timestamp + strParam; // 3.这就是需要签名的字符串

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //你的 apikey 密码
let sign = CryptoJS.HmacMD5(strToSign, secret).toString();//4.签名后的结果

let url = "https://api.bibox.com/v3.1/credit/transferAssets/lendAssets";

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//5.设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: strParam // 6.格式化参数
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }
        console.log(body) // 7.返回值

    });

POST https://api.bibox.com/v3.1/credit/transferAssets/lendAssets

参数名称 是否必须 类型 描述 默认值 取值范围
coin_symbol true string 币种

Response

{
    "balance":"1.52319980",
    "lend":"0.00000000",
    "lend_book":"0.00000000",
    "interest":"0.00000000",
    "lend_receipt":"1.44000000",
    "interest_receipt":"0.16115200" 
}

名称 描述
balance 可用余额
lend 待收贷款数量
lend_book 预订贷款数量
interest 待收利息
lend_receipt 已收贷款数量
interest_receipt 已收利息

获取借款资产信息

示例

let CryptoJS = require("crypto-js");
let request = require("request");

let timestamp = Date.now(); // 1.当前时间戳

let param = {
    "pair":"BTC_USDT",
};

let strParam = JSON.stringify(param); // 2.格式化参数

let strToSign = '' + timestamp + strParam; // 3.这就是需要签名的字符串

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //你的 apikey 密码
let sign = CryptoJS.HmacMD5(strToSign, secret).toString();//4.签名后的结果

let url = "https://api.bibox.com/v3.1/credit/transferAssets/borrowAsset";

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//5.设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: strParam // 6.格式化参数
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }
        console.log(body) // 7.返回值

    });

POST https://api.bibox.com/v3.1/credit/transferAssets/borrowAssets

参数名称 是否必须 类型 描述 默认值 取值范围
pair true string 仓位 BTC_USDT, ETH_USDT, *_USDT-全仓

Response

{
    "pair": "BTC_USDT",
    "currency_deposit": "8406.00000000",
    "currency_borrow": "506.34642529",
    "currency_can_borrow": "70590.53574710",
    "margin_radio": "1660.13",
    "max_leverage_ratio": 10, 
    "current_leverage_radio": "2",
    "force_deal_radio": 110,
    "force_price": "0",
    "items": [
        {
            "coin_symbol": "BTC",
            "coin_id": 42,
            "balance": "0.00000000",
            "freeze": "0.00000000",
            "borrow": "0",
            "can_transfer_credit": "0.00000000",
            "can_transfer_main": "0",
            "can_borrow": "8.82381696",
            "borrow_book": "0",
            "force_price": "0",
            "bust_price": "0",
            "price": "8000",
            "interest": "0",
            "total": "0.00000000"
        },
        {
            "coin_symbol": "USDT",
            "coin_id": 60,
            "balance": "8406.00000000",
            "freeze": "0.00000000",
            "borrow": "506.34642529",
            "can_transfer_credit": "7494.57643447",
            "can_transfer_main": "5000.00000000",
            "can_borrow": "70590.53574710",
            "borrow_book": "0",
            "force_price": "0",
            "bust_price": "0",
            "price": "1",
            "interest": "0.34642529",
            "total": "8406.00000000"
        }
    ]
}

名称 描述
pair 仓位
currency_deposit 折合成计价币余额
currency_borrow 折合成计价币已借
currency_can_borrow 折合成计价币可借
margin_radio 保证金率
current_leverage_radio 当前杠杆倍数
force_deal_radio 爆仓保证金率
force_price 爆仓价(逐仓)
balance 单个币种余额
freeze 币种冻结
borrow 币种借款
interest 产生利息

借款

示例

let CryptoJS = require("crypto-js");
let request = require("request");

let timestamp = Date.now(); // 1.当前时间戳

let param = {
    "coin_symbol": "BTC",
    "pair": "BTC_USDT",
    "amount":"5.0036"
};

let strParam = JSON.stringify(param); // 2.格式化参数

let strToSign = '' + timestamp + strParam; // 3.这就是需要签名的字符串

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //你的 apikey 密码
let sign = CryptoJS.HmacMD5(strToSign, secret).toString();//4.签名后的结果

let url = "https://api.bibox.com/v3.1/credit/borrowOrder/autobook";

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//5.设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: strParam // 6.格式化参数
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }
        console.log(body) // 7.返回值

    });

POST https://api.bibox.com/v3.1/credit/borrowOrder/autobook

参数名称 是否必须 类型 描述 默认值 取值范围
coin_symbol true string 需要借款的币种 EOS, BTC, USDT
pair true string 需要借款的仓位 BTC_USDT, *_USDT
amount true double 借款数量

Response

{}

还款

示例

let CryptoJS = require("crypto-js");
let request = require("request");

let timestamp = Date.now(); // 1.当前时间戳

let param = {
    "coin_symbol": "BTC",
    "pair": "BTC_USDT",
    "amount":"5.0036"
};

let strParam = JSON.stringify(param); // 2.格式化参数

let strToSign = '' + timestamp + strParam; // 3.这就是需要签名的字符串

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //你的 apikey 密码
let sign = CryptoJS.HmacMD5(strToSign, secret).toString();//4.签名后的结果

let url = "https://api.bibox.com/v3.1/credit/borrowOrder/refund";

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//5.设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: strParam // 6.格式化参数
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }
        console.log(body) // 7.返回值

    });

POST https://api.bibox.com/v3.1/credit/borrowOrder/refund

参数名称 是否必须 类型 描述 默认值 取值范围
coin_symbol true string 需要还款的币种 EOS, BTC, USDT
pair true string 需要还款的仓位 BTC_USDT, *_USDT
amount true double 还款数量

Response

{}

发布放贷单

示例

let CryptoJS = require("crypto-js");
let request = require("request");

let timestamp = Date.now(); // 1.当前时间戳

let param = {
    "coin_symbol":"EOS",
    "amount":"5",
    "interest_rate":0.001,
    "is_insurance":1,
    "force":1
};

let strParam = JSON.stringify(param); // 2.格式化参数

let strToSign = '' + timestamp + strParam; // 3.这就是需要签名的字符串

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //你的 apikey 密码
let sign = CryptoJS.HmacMD5(strToSign, secret).toString();//4.签名后的结果

let url = "https://api.bibox.com/v3.1/credit/lendOrderbook/publish";

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//5.设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: strParam // 6.格式化参数
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }
        console.log(body) // 7.返回值

    });

POST https://api.bibox.com/v3.1/credit/lendOrderbook/publish

参数名称 是否必须 类型 描述 默认值 取值范围
coin_symbol true string 交易币种 USDT, EOS, ...
amount true double 放款数量
interest_rate true double 放款利率
is_insurance true integer 是否开启保险 0或1
force true integer 1

Response

{}

撤销放贷单

示例

let CryptoJS = require("crypto-js");
let request = require("request");

let timestamp = Date.now(); // 1.当前时间戳

let param = {
     "orderbook_id":9064
};

let strParam = JSON.stringify(param); // 2.格式化参数

let strToSign = '' + timestamp + strParam; // 3.这就是需要签名的字符串

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //你的 apikey 密码
let sign = CryptoJS.HmacMD5(strToSign, secret).toString();//4.签名后的结果

let url = "https://api.bibox.com/v3.1/credit/lendOrderbook/cancel";

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//5.设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: strParam // 6.格式化参数
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }
        console.log(body) // 7.返回值

    });

POST https://api.bibox.com/v3.1/credit/lendOrderbook/cancel

参数名称 是否必须 类型 描述 默认值 取值范围
orderbook_id true integer 订单id

Response

{}

信用账户下单

示例

let CryptoJS = require("crypto-js");
let request = require("request");

let timestamp = Date.now(); // 1.当前时间戳

let param = {
    "account_type":1,
    "pair":"BTC_USDT",
    "order_type":2,
    "price":"100",
    "amount":"1",
    "money":"100.0000",
    "order_side":1
};

let strParam = JSON.stringify(param); // 2.格式化参数

let strToSign = '' + timestamp + strParam; // 3.这就是需要签名的字符串

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //你的 apikey 密码
let sign = CryptoJS.HmacMD5(strToSign, secret).toString();//4.签名后的结果

let url = "https://api.bibox.com/v3.1/credit/trade/trade";

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//5.设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: strParam // 6.格式化参数
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }
        console.log(body) // 7.返回值

    });

POST https://api.bibox.com/v3.1/credit/trade/trade

参数名称 是否必须 类型 描述 默认值 取值范围
pair string 交易对
account_type integer 账户类型 1-逐仓账户 257-全仓账户
order_type integer 交易类型 2-限价单
order_side integer 交易方向 1-买,2-卖
price string 委托价格 最小值 0.00000001
amount string 委托数量 最小值 0.0001
money string 委托金额

Response

{}

名称 描述
orders_id 订单id

信用账户撤单

示例

let CryptoJS = require("crypto-js");
let request = require("request");

let timestamp = Date.now(); // 1.当前时间戳

let param = {
    "orders_id": "4631142976192513"               //委托单id
};

let strParam = JSON.stringify(param); // 2.格式化参数

let strToSign = '' + timestamp + strParam; // 3.这就是需要签名的字符串

let apikey = "900625568558820892a8c833c33ebc8fd2701efe"; //your apikey
let secret = "c708ac3e70d115ec29efbee197330627d7edf842"; //你的 apikey 密码
let sign = CryptoJS.HmacMD5(strToSign, secret).toString();//4.签名后的结果

let url = "https://api.bibox.com/v3.1/credit/trade/cancel";

request.post({
        url: url,//请求路径
        method: "POST",//请求方式
        headers: {//5.设置请求头
            'content-type': 'application/json',
            'bibox-api-key': apikey,
            'bibox-api-sign': sign,
            'bibox-timestamp': timestamp
        },
        body: strParam // 6.格式化参数
    },

    function optionalCallback(err, httpResponse, body) {
        if (err) {
            return console.error('upload failed:', err);
        }
        console.log(body) // 7.返回值

    });

POST https://api.bibox.com/v3.1/credit/trade/cancel

参数名称 是否必须 类型 描述 默认值 取值范围
orders_id true string 委托单id

Response

{}

WebSocket

订阅 Kline 数据

完整例子


const WebSocket = require('ws');
const zlib = require('zlib');

const biboxws = 'wss://push.bibox.me';

let wsClass = function () {

};

wsClass.prototype._decodeMsg = async function (data) {
    let that = this;
    return new Promise((resolve, reject) => {
        // console.log(Buffer.from(data, 'base64'))
        zlib.unzip(Buffer.from(data, 'base64'), (err, buffer) => {
            if (err) {
                return reject(err);
            }
            try {
                console.log('_decodeMsg', buffer.toString())
                let data = JSON.parse(buffer.toString());
                resolve(data);
            } catch (e) {
                console.log('_decodeMsg catch', buffer.toString())
                reject(e);
            }
        });
    }).catch(err => {
        console.warn(err);
    });
};

wsClass.prototype._consumerMsg = function (msg) {
    let that = this;
    Promise.resolve().then(async () => {
        let data = msg.data;
        if (msg.binary == 1) {
            data = await that._decodeMsg(data);
        }
    }).catch(err => {

    });
};

wsClass.prototype._initWs = async function () {
    let that = this;
    let ws = new WebSocket(biboxws);
    that.ws = ws;

    ws.on('open', function open() {
        console.log(new Date(), 'open')
        {
            ws.send(JSON.stringify({
                event: 'addChannel',
                channel: 'bibox_sub_spot_BTC_USDT_kline_1min',
                binary: 0,
                ver: 0,
            }));
        }
    });

    ws.on('close', err => {
        console.log('close, ', err);
    });

    ws.on('error', err => {
        console.log('error', err);
    });

    ws.on('ping', err => {
        console.log('ping ', err.toString('utf8'));
    });

    ws.on('pong', err => {
        console.log('pong ', err.toString('utf8'));
    });

    ws.on('message', data => {
        console.log('message', data)
        let jdata = JSON.parse(data); // 获得数据
        for (let i = 0; i < jdata.length; i++) {
            let item = jdata[i];
            if (!item.data) {
                continue;
            }
            that._consumerMsg(item);
        }
    });
};

let instance = new wsClass();

instance._initWs().catch(err => {
    console.log(err);
});

wss://push.bibox.me

参数名称 是否必须 类型 描述 默认值 取值范围
pair true string 交易对 交易对,BTC_USDT, ETH_USDT
period true string K线周期 1min, 5min, 15min, 30min, 1hour, 2hour, 4hour, 6hour, 12hour, day, week
event true string 行为 'addChannel'
channel true string 'bibox_sub_spot_' + ${pair} + '_kline_' + ${period}
binary true int 0
ver true int 0

Response

[
    {
        "channel":"bibox_sub_spot_BTC_USDT_kline_1min",
        "binary":0,
        "data_type":1,
        "data":[
            {
                "time":1604326320000,
                "open":"13365.29000000",
                "high":"13366.59990000",
                "low":"13349.58700000",
                "close":"13352.61990000",
                "vol":"42.19560000"
            },
            {
                "time":1604326380000,
                "open":"13352.63000000",
                "high":"13352.67000000",
                "low":"13352.58000000",
                "close":"13352.58990000",
                "vol":"17.27390000"
            }
        ]
    }
]

名称 描述
time k线某周期开始时间
open 开盘价
high 最高价
low 最低价
close 收盘价
vol 成交量
binary 0代表数据没有压缩,1代表数据压缩了
其它字段 忽略

订阅 Market 数据

完整例子


const WebSocket = require('ws');
const zlib = require('zlib');

const biboxws = 'wss://push.bibox.me';

let wsClass = function () {

};

wsClass.prototype._decodeMsg = async function (data) {
    let that = this;
    return new Promise((resolve, reject) => {
        // console.log(Buffer.from(data, 'base64'))
        zlib.unzip(Buffer.from(data, 'base64'), (err, buffer) => {
            if (err) {
                return reject(err);
            }
            try {
                console.log('_decodeMsg', buffer.toString())
                let data = JSON.parse(buffer.toString());
                resolve(data);
            } catch (e) {
                console.log('_decodeMsg catch', buffer.toString())
                reject(e);
            }
        });
    }).catch(err => {
        console.warn(err);
    });
};

wsClass.prototype._consumerMsg = function (msg) {
    let that = this;
    Promise.resolve().then(async () => {
        let data = msg.data;
        if (msg.binary == 1) {
            data = await that._decodeMsg(data);
        }
    }).catch(err => {

    });
};

wsClass.prototype._initWs = async function () {
    let that = this;
    let ws = new WebSocket(biboxws);
    that.ws = ws;

    ws.on('open', function open() {
        console.log(new Date(), 'open')
        {
            ws.send(JSON.stringify({
                event: 'addChannel',
                channel: 'bibox_sub_spot_ALL_ALL_market',
                binary: 0,
                ver: 0,
            }));
        }
    });

    ws.on('close', err => {
        console.log('close, ', err);
    });

    ws.on('error', err => {
        console.log('error', err);
    });

    ws.on('ping', err => {
        console.log('ping ', err.toString('utf8'));
    });

    ws.on('pong', err => {
        console.log('pong ', err.toString('utf8'));
    });

    ws.on('message', data => {
        console.log('message', data)
        let jdata = JSON.parse(data); // 获得数据
        for (let i = 0; i < jdata.length; i++) {
            let item = jdata[i];
            if (!item.data) {
                continue;
            }
            that._consumerMsg(item);
        }
    });
};

let instance = new wsClass();

instance._initWs().catch(err => {
    console.log(err);
});

wss://push.bibox.me

参数名称 是否必须 类型 描述 默认值 取值范围
binary true int 0
ver true int 8

Response

[
    {
        "channel":"bibox_sub_spot_ALL_ALL_market",
        "binary":0,
        "data_type":1,
        "data":[
            {
                "id":1,
                "coin_symbol":"BIX",
                "currency_symbol":"BTC",
                "last":"0.00006604",
                "high":"0.00006712",
                "low":"0.00006421",
                "change":"+0.00000121",
                "percent":"+1.87%",
                "vol24H":"54475636",
                "amount":"3571.11",
                "last_cny":"2.91",
                "high_cny":"2.95",
                "low_cny":"2.83",
                "last_usd":"0.42",
                "high_usd":"0.43",
                "low_usd":"0.41"
            },
            {
                "id":2,
                "coin_symbol":"BIX",
                "currency_symbol":"ETH",
                "last":"0.00190235",
                "high":"0.00192190",
                "low":"0.00181724",
                "change":"+0.00008058",
                "percent":"+4.42%",
                "vol24H":"32059017",
                "amount":"59861.18",
                "last_cny":"2.90",
                "high_cny":"2.93",
                "low_cny":"2.77",
                "last_usd":"0.42",
                "high_usd":"0.42",
                "low_usd":"0.40"
            }
        ]
    }
]

名称 描述
state 0代表成功,否则代表失败
id 交易对id
coin_symbol 交易币种
currency_symbol 定价币种
last 24h最新价
high 24h最高价
low 24h最低价
change 24h涨跌
percent 24h涨跌幅
vol24H 24h成交量
amount 24h成交额
last_cny 24h最新价折算cny
high_cny 24h最高价折算cny
low_cny 24h最低价折算cny
last_usd 24h最新价折算usd
high_usd 24h最高价折算usd
low_usd 24h最低价折算usd
其它字段 忽略

订阅 Depth 数据

完整例子


const WebSocket = require('ws');
const zlib = require('zlib');

const biboxws = 'wss://push.bibox.me';

let wsClass = function () {

};

wsClass.prototype._decodeMsg = async function (data) {
    let that = this;
    return new Promise((resolve, reject) => {
        // console.log(Buffer.from(data, 'base64'))
        zlib.unzip(Buffer.from(data, 'base64'), (err, buffer) => {
            if (err) {
                return reject(err);
            }
            try {
                console.log('_decodeMsg', buffer.toString())
                let data = JSON.parse(buffer.toString());
                resolve(data);
            } catch (e) {
                console.log('_decodeMsg catch', buffer.toString())
                reject(e);
            }
        });
    }).catch(err => {
        console.warn(err);
    });
};

wsClass.prototype._consumerMsg = function (msg) {
    let that = this;
    Promise.resolve().then(async () => {
        let data = msg.data;
        if (msg.binary == 1) {
            data = await that._decodeMsg(data);
        }
    }).catch(err => {

    });
};

wsClass.prototype._initWs = async function () {
    let that = this;
    let ws = new WebSocket(biboxws);
    that.ws = ws;

    ws.on('open', function open() {
        console.log(new Date(), 'open')
        {
            ws.send(JSON.stringify({
                event: 'addChannel',
                channel: 'bibox_sub_spot_BIX_BTC_depth',
                binary: 0,
                ver: 0,
            }));
        }
    });

    ws.on('close', err => {
        console.log('close, ', err);
    });

    ws.on('error', err => {
        console.log('error', err);
    });

    ws.on('ping', err => {
        console.log('ping ', err.toString('utf8'));
    });

    ws.on('pong', err => {
        console.log('pong ', err.toString('utf8'));
    });

    ws.on('message', data => {
        console.log('message', data)
        let jdata = JSON.parse(data); // 获得数据
        for (let i = 0; i < jdata.length; i++) {
            let item = jdata[i];
            if (!item.data) {
                continue;
            }
            that._consumerMsg(item);
        }
    });
};

let instance = new wsClass();

instance._initWs().catch(err => {
    console.log(err);
});

wss://push.bibox.me

参数名称 是否必须 类型 描述 默认值 取值范围
pair true string 交易对 BIX_BTC, BIX_ETH, BTC_USDT, ETH_USDT......

Response

[
    {
        "channel":"bibox_sub_spot_BIX_BTC_depth",
        "binary":0,
        "data_type":1,
        "data": {
            "pair":"BIX_BTC",
            "update_time":1536648343927,
            "asks":[
                {
                    "price":"0.0000683",
                    "volume":"1048.8046"
                },
                {
                    "price":"0.00006831",
                    "volume":"1008.2509"
                }
            ],
            "bids":[
                {
                    "price":"0.00006801",
                    "volume":"2.3472"
                },
                {
                    "price":"0.00006793",
                    "volume":"0.3458"
                }
            ]
        }
    }
]

名称 描述
state 0代表成功,否则代表失败
pair 交易对
update_time 时间戳
asks 卖方深度
bids 买方深度
price 委托价格
volume 委托数量
其它字段 忽略

订阅 Deals 数据

完整例子


const WebSocket = require('ws');
const zlib = require('zlib');

const biboxws = 'wss://push.bibox.me';

let wsClass = function () {

};

wsClass.prototype._decodeMsg = async function (data) {
    let that = this;
    return new Promise((resolve, reject) => {
        // console.log(Buffer.from(data, 'base64'))
        zlib.unzip(Buffer.from(data, 'base64'), (err, buffer) => {
            if (err) {
                return reject(err);
            }
            try {
                console.log('_decodeMsg', buffer.toString())
                let data = JSON.parse(buffer.toString());
                resolve(data);
            } catch (e) {
                console.log('_decodeMsg catch', buffer.toString())
                reject(e);
            }
        });
    }).catch(err => {
        console.warn(err);
    });
};

wsClass.prototype._consumerMsg = function (msg) {
    let that = this;
    Promise.resolve().then(async () => {
        let data = msg.data;
        if (msg.binary == 1) {
            data = await that._decodeMsg(data);
        }
    }).catch(err => {

    });
};

wsClass.prototype._initWs = async function () {
    let that = this;
    let ws = new WebSocket(biboxws);
    that.ws = ws;

    ws.on('open', function open() {
        console.log(new Date(), 'open')
        {
            ws.send(JSON.stringify({
                event: 'addChannel',
                channel: 'bibox_sub_spot_BIX_BTC_deals',
                binary: 0,
                ver: 8,
            }));
        }
    });

    ws.on('close', err => {
        console.log('close, ', err);
    });

    ws.on('error', err => {
        console.log('error', err);
    });

    ws.on('ping', err => {
        console.log('ping ', err.toString('utf8'));
    });

    ws.on('pong', err => {
        console.log('pong ', err.toString('utf8'));
    });

    ws.on('message', data => {
        console.log('message', data)
        let jdata = JSON.parse(data); // 获得数据
        for (let i = 0; i < jdata.length; i++) {
            let item = jdata[i];
            if (!item.data) {
                continue;
            }
            that._consumerMsg(item);
        }
    });
};

let instance = new wsClass();

instance._initWs().catch(err => {
    console.log(err);
});

wss://push.bibox.me

参数名称 是否必须 类型 描述 默认值 取值范围
pair true string 交易对 BIX_BTC, BIX_ETH, BTC_USDT, ETH_USDT......

Response

[
    {
        "channel":"bibox_sub_spot_BIX_BTC_deals",
        "binary":0,
        "data_type":1,
        "data":[
            {
                "pair":"BIX_BTC",
                "price":"0.00006788",
                "amount":"9705.9732",
                "time":1536648308000,
                "side":2
            },
            {
                "pair":"BIX_BTC",
                "price":"0.00006788",
                "amount":"11914.8712",
                "time":1536648308000,
                "side":2
            }
        ]
    }
]

名称 描述
state 0代表成功,否则代表失败
pair 交易对
price 成交价格
amount 成交数量
time 成交时间
side taker成交方向,1-买,2-卖
其它字段 忽略

订阅 Ticker 数据

完整例子


const WebSocket = require('ws');
const zlib = require('zlib');

const biboxws = 'wss://push.bibox.me';

let wsClass = function () {

};

wsClass.prototype._decodeMsg = async function (data) {
    let that = this;
    return new Promise((resolve, reject) => {
        // console.log(Buffer.from(data, 'base64'))
        zlib.unzip(Buffer.from(data, 'base64'), (err, buffer) => {
            if (err) {
                return reject(err);
            }
            try {
                console.log('_decodeMsg', buffer.toString())
                let data = JSON.parse(buffer.toString());
                resolve(data);
            } catch (e) {
                console.log('_decodeMsg catch', buffer.toString())
                reject(e);
            }
        });
    }).catch(err => {
        console.warn(err);
    });
};

wsClass.prototype._consumerMsg = function (msg) {
    let that = this;
    Promise.resolve().then(async () => {
        let data = msg.data;
        if (msg.binary == 1) {
            data = await that._decodeMsg(data);
        }
    }).catch(err => {

    });
};

wsClass.prototype._initWs = async function () {
    let that = this;
    let ws = new WebSocket(biboxws);
    that.ws = ws;

    ws.on('open', function open() {
        console.log(new Date(), 'open')
        {
            ws.send(JSON.stringify({
                event: 'addChannel',
                channel: 'bibox_sub_spot_BIX_BTC_ticker',
                binary: 0,
                ver: 8,
            }));
        }
    });

    ws.on('close', err => {
        console.log('close, ', err);
    });

    ws.on('error', err => {
        console.log('error', err);
    });

    ws.on('ping', err => {
        console.log('ping ', err.toString('utf8'));
    });

    ws.on('pong', err => {
        console.log('pong ', err.toString('utf8'));
    });

    ws.on('message', data => {
        console.log('message', data)
        let jdata = JSON.parse(data); // 获得数据
        for (let i = 0; i < jdata.length; i++) {
            let item = jdata[i];
            if (!item.data) {
                continue;
            }
            that._consumerMsg(item);
        }
    });
};

let instance = new wsClass();

instance._initWs().catch(err => {
    console.log(err);
});

wss://push.bibox.me

参数名称 是否必须 类型 描述 默认值 取值范围
pair true string 交易对 BIX_BTC, BIX_ETH, BTC_USDT, ETH_USDT......

Response

[
    {
        "channel":"bibox_sub_spot_BIX_BTC_deals",
        "binary":0,
        "data_type":1,
        "data":{
            "pair":"BIX_BTC",
            "last":"0.00006837",
            "last_usd":"0.43",
            "last_cny":"2.96",
            "high":"0.00007401",
            "low":"0.00006628",
            "buy":"0.00006814",
            "buy_amount":"2654.5376",
            "sell":"0.00006876",
            "sell_amount":"170.3094",
            "vol":"48027601",
            "percent":"-6.73%",
            "timestamp":1536650154258,
            "base_last_cny":"2.96838961"
        }
    }
]

名称 描述
state 0代表成功,否则代表失败
pair 交易对symbol
buy 最新买一价
buy_amount 买一量
sell 最新卖一价
sell_amount 卖一量
high 24h最高价
last 最新成交价
low 24h最低价
timestamp 时间戳
vol 24h成交量
percent 24h涨跌幅
last_cny 最新成交价,cny计价
last_usd 最新成交价,usd计价
其它字段 忽略

订阅用户数据方法

实际例子


'use strict'

const WebSocket = require('ws');
let CryptoJS = require("crypto-js");

const biboxws = 'wss://push.bibox.me'; // 1.请求路径

let apikey = '900625568558820892a8c833c33ebc8fd2701efe'; // 你的apikey
let param = {  // 定义参数对象param,需要用到apikey
    "apikey": apikey,
    "channel": "bibox_sub_spot_ALL_ALL_login",
    "event": "addChannel"
};
let strParam = JSON.stringify(param); // 格式化参数对象param,得到strParam
let secret = 'c708ac3e70d115ec29efbee197330627d7edf842'; // apikey的密码
let sign = CryptoJS.HmacMD5(strParam, secret).toString(); // 用apikey的密码secret对strParam进行HmacMD5签名,得到签名结果sign
let wsparam = {  // 2.请求参数
    "apikey": apikey,
    "channel": "bibox_sub_spot_ALL_ALL_login",
    "event": "addChannel",
    "sign": sign,
};


let init = function () {

    let ws = new WebSocket(biboxws);

    setInterval(function () {
        if (ws && ws.readyState == WebSocket.OPEN) {
            console.log('manu ping');
            ws.ping(Date.now());
        }
    }, 1000 * 10);

    ws.on('open', function open() {

        console.log('open')
        ws.send(JSON.stringify(wsparam));

    });

    ws.on('close', err => {
        console.log('close, ', err);
    });

    ws.on('error', err => {
        console.log('error', err);
    });

    ws.on('ping', err => {
        console.log('ping', err)
    });

    ws.on('pong', err => {
        console.log('pong', err)
    });

    ws.on('message', function incoming(data) {
        let jdata = JSON.parse(data); // 返回结果
        if (!jdata.ping) {
            console.log('message', data)
        }

    });
};

module.exports = {};

init();


wss://push.bibox.me

参数名称 是否必须 类型 描述 默认值 取值范围
apikey true string 您在Bibox交易所申请的apikey
sign true string 使用您在Bibox交易所申请的apisecret对整个请求数据进行签名
event true string 行为 'addChannel'
channel true string 'bibox_sub_spot_ALL_ALL_login'

1.定义参数对象param,需要用到apikey

let apikey = 'thisisyourapikey';

let param = { "apikey": apikey, "channel": "bibox_sub_spot_ALL_ALL_login", "event": "addChannel" };

2.格式化参数对象param,得到strParam

let strParam = JSON.stringify(param);

3.用apikey的密码secret对strParam进行HmacMD5签名,得到签名结果sign

let CryptoJS = require("crypto-js");

let secret = 'c708ac3e70d115ec29efbee197330627d7edf842';

let sign = CryptoJS.HmacMD5(strParam, secret).toString();

4.生成订阅参数 wsparam

let wsparam = { "apikey": apikey, "channel": "bibox_sub_spot_ALL_ALL_login", "event": "addChannel", "sign": sign, };

Response

[
    {
        "channel":"bibox_sub_spot_ALL_ALL_login",
        "binary":"0",
        "data_type":0,
        "data":{
            "result":"订阅成功"
        }
    }
]

名称 描述
result "订阅成功" 代表订阅成功
其它字段 忽略

订阅用户数据解析币币资产

assets

Response

[
    {
        "channel":"bibox_sub_spot_ALL_ALL_login",
        "binary":"0",
        "data_type":1,
         "data":{
             "assets":{
                 "normal":{ 
                     "BIX":{
                         "balance":"497.59601765",
                         "freeze":"0.00000000"  
                     },
                     "USDT":{
                         "balance":"20.52027574",
                         "freeze":"22.12000000"
                     }
                 }
             }
         }
    }
]

名称 描述
normal 币币账户资产
balance 可用资产
freeze 冻结资产
其它字段 忽略

订阅用户数据解析信用资产

assets

Response

[
    {
        "channel":"bibox_sub_spot_ALL_ALL_login",
        "binary":"0",
        "data_type":1,
         "data":{
             "assets":{
                 "credit":{
                     "BIX_USDT":{
                         "BIX":{
                             "balance":"681.74441804",
                             "freeze":"0.00000000"
                         },
                         "USDT":{
                             "balance":"0.21698199",
                             "freeze":"0.00000000"
                         }
                     },
                     "BTC_USDT":{
                         "BTC":{
                             "balance":"100",
                             "freeze":"0.00000000"
                         },
                         "USDT":{
                             "balance":"10",
                             "freeze":"0.00000000"
                         }
                     }
                 }
             }
         }
    }
]

名称 描述
credit 信用账户资产
balance 可用资产
freeze 冻结资产
其它字段 忽略

订阅用户数据解析币币委托单

orderpending

Response

[
    {
        "channel":"bibox_sub_spot_ALL_ALL_login",
        "binary":"0",
        "data_type":1,
        "data":{
            "orderpending":{
                "id":"12875281286404369",
                "client_oid":"0",
                "account_type":0,
                "coin_symbol":"BIX",
                "currency_symbol":"USDT",
                "price":"0.053000",
                "deal_price":"0.000000",
                "amount":"100.0000",
                "vamount":"100.0000",
                "deal_amount":"0.0000",
                "money":"5.30000000",
                "deal_money":"0.00000000",
                "deal_count":0,
                "deal_percent":"0.00%",
                "order_from":1,
                "order_side":2,
                "order_type":2,
                "status":1,
                "unexecuted":"100.0000",
                "createdAt":1604325924719
            }
        }
    }
]

名称 描述
state 0代表成功,否则代表失败
count 当前页记录数,若存在下页,count=当前页记录数+1
page 第几页,从1开始
items 记录列表
id 订单id
client_oid 自定义id
createdAt 创建时间
account_type 账户类型 0-币币账户
coin_symbol 交易币种
currency_symbol 定价币种
order_side 交易方向,1-买,2-卖
order_type 订单类型,1-市价单,2-限价单
price 委托价格
amount 委托数量
money 委托金额
deal_amount 成交数量
deal_percent 成交百分比
unexecuted 未成交数量
status 状态,-1 失败,0或1-待成交,2-部分成交,3-完全成交,4-部分撤销,5-完全撤销,6-待撤销
其它字段 忽略

订阅用户数据解析币币成交详情

history

Response

[
    {
        "channel":"bibox_sub_spot_ALL_ALL_login",
        "binary":"0",
        "data_type":1,
        "data":{
            "history":{
                "id":"2251799825471069694",
                "account_type":0,
                "coin_symbol":"BIX",
                "currency_symbol":"USDT",
                "price":"0.050921",
                "amount":"64.2237",
                "money":"3.27033502",
                "fee":"0.00000000",
                "order_from":0,
                "order_side":1,
                "order_type":2,
                "is_maker":0,
                "relay_id":"12939052839213054",
                "createdAt":1604387364308
            }
        }
    }
]

名称 描述
state 0代表成功,否则代表失败
id 成交记录id
createdAt 成交时间
account_type 账户类型 0-币币账户
coin_symbol 交易币种
currency_symbol 定价币种
order_side 交易方向,1-买,2-卖
order_type 订单类型,1-市价单,2-限价单
price 成交价格
amount 成交数量
money 成交金额
fee 手续费
is_maker 是否maker
relay_id 关联订单id
其它字段 忽略

Errors

错误码

Code 描述 Msg
2003 Cookie 失效 Cookie expired
2033 操作失败!订单已完成或已撤销 Operation failed! Order completed or canceled
2034 操作失败!请检查参数是否正确 Operation failed! Please check parameter
2040 操作失败!没有该订单 Operation failed! No record
2064 订单撤销中,不能再次撤销 Canceling. Unable to cancel again
2065 委托价格设置过高,请重新设置价格 Precatory price is exorbitant, please reset
2066 委托价格设置过低,请重新设置价格 Precatory price is low , please reset
2067 暂不支持市价单 Limit Order Only
2068 下单数量不能低于0.0001 Min Amount:0.0001
2069 市价单无法撤销 Market order can not be canceled
2078 下单价格非法 unvalid order price
2085 币种最小下单数量限制 the trade amount is low
2086 账户资产异常,限制下单 Abnormal account assets, trade is forbiden
2091 请求过于频繁,请稍后再试 request is too frequency, please try again later
2092 币种最小下单金额限制 Minimum amount not met
3000 请求参数错误 Requested parameter incorrect
3002 参数不能为空 Parameter cannot be null
3009 推送订阅channel不合法 Illegal subscription channel
3010 websocket连接异常 websocket connection error
3011 接口不支持apikey请求方式 Illegal subscribe event
3012 apikey无效 Interface does not support apikey request method
3016 交易对错误 Invalid apikey
3017 推送订阅event不合法 Trading pair error
3024 apikey权限不足 apikey authorization insufficient
3025 apikey签名验证失败 apikey signature verification failed
3026 apikey ip受限制 apikey ip is restricted
3027 账户没有apikey No apikey in your account
3028 账户apikey数量超过了限制数量 Account apikey has exceeded the limit amount
3029 apikey允许ip数量超过了限制数量 apikey ip has exceeded the limit amount
3033 查询类请求限制一个cmd query allow only one cmd
3034 最大cmd个数限制 maxinum cmds
3035 cmd请求个数限制 too many cmds
4000 当前网络连接不稳定,请稍候重试 the network is unstable now, please try again later
4003 服务器繁忙,请稍后再试 The server is busy, please try again later