API documentation

Getting Started

The first step is to get the API public key and private key

Request the transaction API, need to obtain the public key and private key, click the application。

Note: the key related to your account security, please do not leak to anyone ,Click Apply

The second step, signature

1、Collect the necessary parameters for signature as follows ( take Balance as a sample: check the request parameters, excluding the signature itself)

Request parameters: Take Balance as an examplekeysignaturecoinnoncePublic API KeySignatureCurrencySelf-incrementing

2、Combine above parameters to a string like:key=xxxxxx&coin=btc&nonce=1508482053

3、 To make the signature, use HMacSHA256 function to encrypt the above string. The encryption key is your private API key digested by MD5 algorithm

4、Submit the signature and other parameters to API.

NOTE: 1.Please make sure the result of MD5 digest should be all lowercase (otherwise you need to transfer it manually).

2. The order of parameters when generating signature must be the same as that when submitting.

API Reference

Ticker

URI: /api/v1/ticker

Request Method: GET

Parameters DescriptionParameterDescriptioncoinbtc , ltc , eth , bch. Default: btc 

Sample Response

  {
    "high":39700,
    "low":36300,
    "buy":1.879,
    "sell":0,
    "last":38800,
    "vol":283.954
  }

Response DescriptionParameterDescriptionhighThe highest price in the past 24 hours.lowThe lowest price in the past 24 hours.buyThe current highest bid price.sellThe current lowest ask price.lastThe price of the latest deal.volThe total deal amount in the past 24 hours.

Account Balance

URI: /api/v1/balance/

Request Method: POST

Parameters DescriptionParameterDescriptioncoinbtc , ltc , eth , bch. Default: btc keyAPI key signaturesignature noncenonce 

Sample Response

{
	"uid":8,
	"nameauth":0,
	"moflag":0,
	"btc_balance":4234234,
	"btc_lock":0,
	"ltc_balance":32429.6,
	"ltc_lock":2.4,
	"eth_balance":0,
	"eth_lock":0,
	"jpy_balance":2344581.519,
	"jpy_lock":868862.481
}

Response DescriptionParameterDescriptionjpy_balanceTotal JPY.btc_balanceTotal BTC.jpy_lockLock JPY.btc_lockLock BTC.nameauthReal-name authentication status, 0 -> no, 1 -> wait, 2 -> success.moflagCellphone status, 0 -> no ,1 -> yes.

Wallet

URI: /api/v1/wallet/

Request Method: POST

Parameters DescriptionParameterDescriptioncoinbtc , ltc , eth , bch. Default: btc keyAPI key signaturesignature noncenonce 

Sample Response

{
	"result":true,
	"address":"1xxxxxxxxxxxxxxxxxxxxxxxx"
}

Response DescriptionParameterDescriptionresulttrue(success), false(fail).addressBitcoin address.

Trade_list

URI: /api/v1/trade_list/

Request Method: POST

Parameters DescriptionParameterDescriptioncoinbtc , ltc , eth , bch. Default: btc keyAPI keysignaturesignature noncenoncesinceunix timestamp(utc timezone) default == 0 type[open or all] 

Sample Response

[
	{
		"id":"11",
		"datetime":"2014-10-21 10:47:20",
		"type":"sell",
		"price":42000,
		"amount_original":1.2,
		"amount_outstanding":1.2
	},
	{
		"id":"10",
		"datetime":"2014-10-20 13:29:39",
		"type":"sell",
		"price":42000,
		"amount_original":1.2,
		"amount_outstanding":1.2
	},
	.....
]
				

Response DescriptionParameterDescriptionidID.datetimedate and time.type”buy” or “sell”.priceprice.amount_originaltotal number.amount_outstandingThe number of remaining.

Trade_view

URI: /api/v1/trade_view/

Request Method: POST

Parameters DescriptionParameterDescriptioncoinbtc , ltc , eth , bch. Default: btc keyAPI key signaturesignature noncenonce idID 

Sample Response

{
	"id":11,
	"datetime":"2014-10-21 10:47:20",
	"type":"sell",
	"price":42000,
	"amount_original":1.2,
	"amount_outstanding":1.2,
	"status":"cancelled",
}

Response DescriptionParameterDescriptionidID.datetimeformat:YYYY-mm-dd HH:ii:ss.type”buy” or “sell”.priceprice.amount_originaltotal number.amount_outstandingThe number of remaining.statusOrder status:no, part, cancelled, all.

Trade_cancel

URI: /api/v1/trade_cancel/

Request Method: POST

Parameters DescriptionParameterDescriptioncoinbtc , ltc , eth , bch. Default: btc keyAPI key signaturesignature noncenonce idID 

Sample Response

{
	"result":true,
	"id":"11"
}

Response DescriptionParameterDescriptionresulttrue(success), false(fail).idID.

Trade_add

URI: /api/v1/trade_add/

Request Method: POST

Parameters DescriptionParameterDescriptioncoinbtc , ltc , eth , bch. Default: btc keyAPI key signaturesignaturenoncenonce amountTotal number priceprice typebuy or sell 

Sample Response

{
	"result":true,
	"id":"11"
}

Response DescriptionParameterDescriptionidID.resulttrue(success), false(fail).

Sample Code

PHP PYTHON

Error Code

success{ “result”:true, “code”:”101″ }

Response DescriptionError CodeSolution100Required parameters can not be empty.101Illegal parameter.102coin does not exist.103Key does not exist.104Signature does not match.105Insufficient permissions.106Request expired(nonce error).107The price must be an integer.200Lack of balance.201Too small for the number of trading.202Price must be in 0 – 1000000.203Order does not exist.301No Verified.401System error.402Requests too frequently.403Non-open API.404IP restriction does not request the resource.

BtcBox Co.,Ltd.
Cryptocurrency Exchange Business Registration No. 00008
JVCEA Membership number 1008
BTCBOX Blog