Restful API 资金划转
资产查询(需要apikey)
钱包账户
参数名称 |
是否必须 |
类型 |
描述 |
默认值 |
取值范围 |
select |
false |
integer |
是否查询资产明细 |
|
不传-各币种总资产合计,1-请求所有币种资产明细 |
{
"cmd":"transfer/mainAssets",
"body":{
"select":1
}
}
{
"url":"https://api.bibox.com/v1/transfer",
"form":{
"cmds":"[{\"cmd\":\"transfer/mainAssets\",\"body\":{\"select\":1}}]",
"apikey":"1e01c22ff8c59e9d98d93423817303f0e7c6d79d",
"sign":"f035f70b6084613946f0944aa620d8a8"
}
}
{
"result":[
{
"result":{
"total_btc":"0.00034073",
"total_cny":"18.44",
"total_usd":"2.66",
"assets_list":[
{
"coin_symbol":"BIX",
"BTCValue":"0.00000000",
"CNYValue":"0.00",
"USDValue":"0.00",
"balance":"0.00005540",
"freeze":"0.00000000"
},
...
]
},
"cmd":"transfer/mainAssets"
}
]
}
信用账户资产
参数名称 |
是否必须 |
类型 |
描述 |
默认值 |
取值范围 |
select |
false |
integer |
是否查询资产明细 |
|
不传-各币种总资产合计,1-请求所有币种资产明细 |
{
"cmd":"transfer/creditAssets",
"body":{
}
}
{
"url":"https://api.bibox.com/v1/transfer",
"form":{
"cmds":"[{\"cmd\":\"transfer/creditAssets\",\"body\":{}}]",
"apikey":"1e01c22ff8c59e9d98d93423817303f0e7c6d79d",
"sign":"5fe1468b9d98f5b6879d8db1d46d766f"
}
}
{
"result":[
{
"result":{
"total_btc":"0.00063800",
"total_cny":"34.55",
"total_usd":"5.00",
"assets_list":[
{
"balance":"0.00000000",
"freeze":"0.00000000",
"BTCValue":"0.00000000",
"CNYValue":"0.00",
"USDValue":"0.00",
"pair":"EOS_USDT",
"coin_symbol":"EOS"
},
{
"coin_symbol":"USDT",
"pair":"EOS_USDT",
"BTCValue":"0.00063800",
"CNYValue":"34.55",
"USDValue":"5.00",
"balance":"5.00000000",
"freeze":"0.00000000"
},
...
]
},
"cmd":"transfer/creditAssets"
}
]
}
钱包账户与币币账户互转(需要apikey)
钱包账户划转到币币账户
参数名称 |
是否必须 |
类型 |
描述 |
默认值 |
取值范围 |
symbol |
true |
string |
交易对 |
---- |
EOS,BTC... |
amount |
true |
double |
转账金额 |
---- |
> 0 |
type |
true |
integer |
转账类型 |
---- |
0钱包转币币; 1币币转钱包 |
param: {
"type": 0,
"amount": "100",
"symbol": 'USDT'
}
post body:
{
body: JSON.stringify(param),
apikey: yourApiKey,
sign: '用apisecret对序列化后的body进行签名'
}
yourApiKey = '178bed72cc7dcdca538b756817a87666432673af';
yourSecret = "3e412e42957b720d155b2c8798726a0e8ed80807";
post body:
{
body: "{\"type\":0,\"amount\":\"100\",\"symbol\":\"USDT\"}",
apikey: "178bed72cc7dcdca538b756817a87666432673af",
sign: "a8ac84f2e6c2ead3dac4e46cf9c6e01e",
}
{
"result":{
"id":"39030177501581312",
"state":0
}
}
{
"error":{
"code":"2027",
"msg":"可用余额不足"
}
}
钱包账户与信用账户互转(需要apikey)
钱包账户划转到信用账户
参数名称 |
是否必须 |
类型 |
描述 |
默认值 |
取值范围 |
coin_symbol |
true |
string |
币种 |
---- |
EOS,BTC... |
amount |
true |
double |
转账金额 |
---- |
> 0 |
pair |
true |
string |
交易对 |
---- |
EOS_USDT,BTC_USDT... |
{
"cmd":"transferAssets/base2credit",
"body":{
"coin_symbol":"USDT",
"amount":5,
"pair":"EOS_USDT"
}
}
{
"result":[
{
"result":"操作成功",
"cmd":"transferAssets/base2credit"
}
]
}
信用户划转到钱包账户
参数名称 |
是否必须 |
类型 |
描述 |
默认值 |
取值范围 |
coin_symbol |
true |
string |
币种 |
---- |
EOS,BTC... |
amount |
true |
double |
转账金额 |
---- |
> 0 |
pair |
true |
string |
交易对 |
---- |
EOS_USDT,BTC_USDT...信用交易对 |
{
"cmd":"transferAssets/credit2base",
"body":{
"coin_symbol":"USDT",
"amount":5,
"pair":"EOS_USDT"
}
}
{
"result":[
{
"result":"操作成功",
"cmd":"transferAssets/credit2base"
}
]
}
钱包账户与合约账户互转(需要apikey)