Restful API Transfer Assets
Query assets( apikey)
Main assets
Name |
Necessary or not |
Type |
Description |
Default |
Value Range |
select |
false |
integer |
integer |
View or not the asset details |
0-The total assets of all tokens, 1-the asset details of all tokens |
{
"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"
}
]
}
Credit Assets
Name |
Necessary or not |
Type |
Description |
Default |
Value Range |
select |
false |
integer |
View or not the asset details |
|
0-The total assets of all tokens, 1-the asset details of all tokens |
{
"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"
}
]
}
Main Assets And Spot Assets(needs apikey)
Main assets transfer to spot assets
Name |
Necessary or not |
Type |
Description |
Default |
Value Range |
symbol |
true |
string |
Trading pair |
---- |
EOS,BTC... |
amount |
true |
double |
transfer amount |
---- |
> 0 |
type |
true |
integer |
transfer type |
---- |
0 main assets -> spot assets; 1 spot assets -> main assets |
param: {
"type": 0,
"amount": "100",
"symbol": 'USDT'
}
post body:
{
body: JSON.stringify(param),
apikey: yourApiKey,
sign: 'signature you body with your apisecret '
}
yourApiKey = '178bed72cc7dcdca538b756817a87666432673af';
yourSecret = "3e412e42957b720d155b2c8798726a0e8ed80807";
post body:
{
body: "{\"type\":0,\"amount\":\"100\",\"symbol\":\"USDT\"}",
apikey: "178bed72cc7dcdca538b756817a87666432673af",
sign: "a8ac84f2e6c2ead3dac4e46cf9c6e01e",
}
{
"result":{
"id":"39030177501581312",
"state":0
}
}
{
"error":{
"code":"2027",
"msg":"账户余额不足"
}
}
Main Assets Transfer to Credit Assets(needs apikey)
Main assets to credit assets
Name |
Necessary or not |
Type |
Description |
Default |
Value Range |
coin_symbol |
true |
string |
tokens |
---- |
EOS,BTC... |
amount |
true |
double |
transfer amount |
---- |
> 0 |
pair |
true |
string |
Trading pair |
---- |
EOS_USDT,BTC_USDT... |
{
"cmd":"transferAssets/base2credit",
"body":{
"coin_symbol":"USDT",
"amount":5,
"pair":"EOS_USDT"
}
}
{
"result":[
{
"result":"操作成功",
"cmd":"transferAssets/base2credit"
}
]
}
Credit assets transfer to main assets
Name |
Necessary or not |
Type |
Description |
Default |
Value Range |
coin_symbol |
true |
string |
tokens |
---- |
EOS,BTC... |
amount |
true |
double |
amount |
---- |
> 0 |
pair |
true |
string |
Trading pair |
---- |
EOS_USDT,BTC_USDT...Trading pair |
{
"cmd":"transferAssets/credit2base",
"body":{
"coin_symbol":"USDT",
"amount":5,
"pair":"EOS_USDT"
}
}
{
"result":[
{
"result":"操作成功",
"cmd":"transferAssets/credit2base"
}
]
}
Main Assets Transfer to Contract Assets(need apikey)