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
  • example
// Request
{
    "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"
    }
}

// Response sucess
{
    "result":[
        {
            "result":{
                "total_btc":"0.00034073",                    //The total assets of all tokens, equivalent to BTC
                "total_cny":"18.44",                         //The total assets of all tokens, equivalent to CNY
                "total_usd":"2.66",                          //The total assets of all tokens, equivalent to USD
                "assets_list":[                              //The asset details of tokens
                    {
                        "coin_symbol":"BIX",                 //tokens
                        "BTCValue":"0.00000000",             //equivalent to BTC
                        "CNYValue":"0.00",                   //equivalent to CNY
                        "USDValue":"0.00",                   //equivalent to USD
                        "balance":"0.00005540",              //Available
                        "freeze":"0.00000000"                //Freeze
                    },
                    ...
                ]
            },
            "cmd":"transfer/mainAssets"
        }
    ]
}

Spot Assets

Contract Assets

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
  • example
// Request
{
    "cmd":"transfer/creditAssets",
    "body":{

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

// Response sucess
{
    "result":[
        {
            "result":{
                "total_btc":"0.00063800",          //The total assets of all tokens, equivalent to BTC
                "total_cny":"34.55",               //The total assets of all tokens, equivalent to CNY
                "total_usd":"5.00",                //The total assets of all tokens, equivalent to USD
                "assets_list":[
                    {
                        "balance":"0.00000000",    //Available
                        "freeze":"0.00000000",     //Freeze
                        "BTCValue":"0.00000000",   //equivalent to BTC
                        "CNYValue":"0.00",         //equivalent to RMB
                        "USDValue":"0.00",         //equivalent to USD
                        "pair":"EOS_USDT",         //Trading pair
                        "coin_symbol":"EOS"        //tokens
                    },
                    {
                        "coin_symbol":"USDT",
                        "pair":"EOS_USDT",
                        "BTCValue":"0.00063800",
                        "CNYValue":"34.55",
                        "USDValue":"5.00",
                        "balance":"5.00000000",
                        "freeze":"0.00000000"
                    }
                ]
            },
            "cmd":"transfer/creditAssets"
        }
    ]
}

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
  • example
// Request
param: {
    "type": 0,
    "amount": "100",
    "symbol": 'USDT'
}
post body:
{
    body: JSON.stringify(param), // stringify param
    apikey: yourApiKey,
    sign:  'signature you body with your apisecret '
}

yourApiKey = '178bed72cc7dcdca538b756817a87666432673af';
yourSecret = "3e412e42957b720d155b2c8798726a0e8ed80807";
post body:
{
    body: "{\"type\":0,\"amount\":\"100\",\"symbol\":\"USDT\"}",
    apikey: "178bed72cc7dcdca538b756817a87666432673af",
    sign:  "a8ac84f2e6c2ead3dac4e46cf9c6e01e", //signature "{\"type\":0,\"amount\":\"100\",\"symbol\":\"USDT\"}" with yourSecret
}


// Response success
{
    "result":{
        "id":"39030177501581312",
        "state":0                       //  0 success, other fail;
    }
}
// Response fail
{
    "error":{
        "code":"2027",
        "msg":"账户余额不足"
    }
}

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...
  • example
// Request
{
    "cmd":"transferAssets/base2credit",
    "body":{
        "coin_symbol":"USDT",
        "amount":5,
        "pair":"EOS_USDT"
    }
}

// Response sucess
{
    "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
  • example
// Request
{
    "cmd":"transferAssets/credit2base",
    "body":{
        "coin_symbol":"USDT",
        "amount":5,
        "pair":"EOS_USDT"
    }
}

// Response sucess
{
    "result":[
        {
            "result":"操作成功",
            "cmd":"transferAssets/credit2base"
        }
    ]
}

Main Assets Transfer to Contract Assets(need apikey)

Main Assets Transfer to Contract Assets

Copyright © bibox.com 2019 all right reserved,powered by GitbookUpdate Date: 2019-11-13

results matching ""

    No results matching ""