Quotes API

Get the latest market quotation data

Interface Description
GET /api_v1/ticker Get the price data
GET /api_v1/depth Get depth data
GET /api_v1/orders Get the deal
GET /api_v1/tickerall Get the price of all coins
GET /api_v1/kline Get Kline data

Quotes API

Get the latest market trade data

Interface Description
POST /api_v1/tradeAdd Trade
POST /api_v1/openOrders Get open trust
POST /api_v1/tradeCancel Cancel the order
POST /api_v1/balances My balances

1、Interface description

  • 1.1 Ticker

    Path:/api_v1/ticker

    Request type:GET

    parameter
    parameter Parameters of the mean example
    language string language(en、cn 、hk),default 'en'
    coin Currency abbreviation eth_btc 、ltc_btc 、 lsk_btc

    Request URL

    HTTP http://www.bit-z.com/api_v1/ticker

    HTTPS: https://www.bit-z.com/api_v1/ticker


    Request instance: https://www.bit-z.com/api_v1/ticker?coin=mzc_btc

    return json dictionary

    An example of the result returned:

    {
        "code": 0, //Status code
        "msg": "Success", //prompt
        "data": {
            "date": 1505472441,  //Time&stimestamp
            "last": 0, The latest price
            "buy": "0.10000000",  //the buy price
            "sell": 0,  //the sell price
            "high": 0,  //The highest price
            "low": 0,  //The lowest price
            "vol": 0  //Volume
            }
        }
  • 1.2 Depth

    Path:/api_v1/depth

    Request type:GET

    parameter
    parameter Parameters of the mean example
    language string language(en、cn 、hk),default 'en'
    coin Currency abbreviation eth_btc 、ltc_btc 、 lsk_btc

    Request URL

    HTTP http://www.bit-z.com/api_v1/depth

    HTTPS: https://www.bit-z.com/api_v1/depth


    Request instance: https://www.bit-z.com/api_v1/depth?coin=ltc_btc

    return json dictionary

    An example of the result returned:

    {
      	"code": 0, //Status code
      	"msg": "Success",  //prompt
      	"data": {
        	"asks": [[0.00417,5000],[0.004,29]],//[Buy data[price, volume]]
        	"bids": [[0.00024,2.0088],[0.00023262,2]]//[Sell data[price, volume]]
        	"date": 1505472481 //Time&stimestamp
      	}
        }
  • 1.3 Orders

    Path:/api_v1/orders

    Request type:GET

    parameter
    parameter Parameters of the mean example
    language string language(en、cn 、hk),default 'en'
    coin Currency abbreviation eth_btc 、ltc_btc 、 lsk_btc

    Request URL

    HTTP http://www.bit-z.com/api_v1/orders

    HTTPS: https://www.bit-z.com/api_v1/orders


    Request instance: https://www.bit-z.com/api_v1/orders?coin=mzc_btc

    return json dictionary

    An example of the result returned:

    {
      	"code": 0,  //Status code
      	"msg": "Success", //prompt
      	"data": {
        	"max": 0, //The highest price
        	"min": 0, //The lowest price
        	"sum": 0, //Volume
        	"d": [{
            		"t": "00:00:00", //time
            		"p": 0, //price
            		"n": 0, //Volume
            		"s": "sell|buy" //type
          		}]
     	    }
        }
  • 1.4 Tickerall

    Path:/api_v1/tickerall

    Request type: GET

    Request parameter
    Parameter Type Whether or not Remarks
    language string no language(en、cn 、hk),default 'en'

    Request mode GET


    Request URL

    HTTP http://www.bit-z.com/api_v1/tickerall

    HTTPS: https://www.bit-z.com/api_v1/tickerall


    Request instance : https://www.bit-z.com/api_v1/tickerall

    Return JSON dictionary

    Return results sample:

    {
        "code": 0, //status code
        "msg": "Success", //message
        "data": {
            	"ltc_btc": {
    	            "date": 1506063078,  //time&stimestamp
    	            "last": "0.01297061", //Latest price
    	            "buy": "0.01296937", //Buy one price
    	            "sell": "0.01297061", //Selling univalent
    	            "high": "0.01355093", //Highest price
    	            "low": "0.01263860", //Minimum price
    	            "vol": "41417.9852" //24 hour volume
    	        },
    	        "eth_btc": {
    	            "date": 1506063078,
    	            "last": "0.07262708",
    	            "buy": "0.07262708",
    	            "sell": "0.07265075",
    	            "high": "0.07396673",
    	            "low": "0.07064294",
    	            "vol": "6088.3691"
    	        },
            }
        }
  • 1.5 Kline

    Path:/api_v1/kline

    Request type: GET

    Request parameter
    Parameter Type Whether or not Remarks
    language string no language(en、cn 、hk),default 'en'
    coin string yes eth_btc 、ltc_btc 、etc_btc
    type string yes 1m 、5m 、15m 、30m 、1h 、1d (m: minute, h:hour, d:day)

    Request mode GET


    Request URL

    HTTP http://www.bit-z.com/api_v1/kline

    HTTPS: https://www.bit-z.com/api_v1/kline


    Request instance : https://www.bit-z.com/api_v1/kline?coin=mzc_btc&type=5m

    Return JSON dictionary

    Return results sample:

    {
      "code": 0, // status code
      "msg": "Success", //message
      "data": {
        "des": "",
        "isSuc": true,
        "datas": {
          "USDCNY": "**",
          "contractUnit": "MZC",
          "data": "[[1494235500000,1.00000000,1.00000000,1.00000000,1.00000000,1.0000],
          	[1494412200000,1.00000000,1.00000000,1.00000000,1.00000000,1.0000],
          	[1495869000000,0.00100000,0.00100000,0.00100000,0.00100000,100.0000],
          	[1495869900000,0.10000000,0.10000000,0.10000000,0.10000000,100.0000],
          	[1497255000000,0.00010000,0.00010000,0.00010000,0.00010000,10.0000]]",
          "marketName": "Bit-Z",
          "moneyType": "BTC",
          "symbol": "mzc_btc",
          "url": "https://www.bit-z.com"
        }
      }
    }

2、Interface description

  • 2.1 tradeAdd

    Path:/api_v1/tradeAdd

    Request type: POST

    Request parameter
    Parameter Type Whether or not Remarks
    api_key string yes User request for api_key
    tim&stimestamp string yes Current tim&stimestamp
    nonce string yes Random 6 bit character
    sign string yes Signature of request parameter
    type string yes Buy type in buy out sell
    price float yes Commission price
    number float yes Quantity entrusted
    coin string yes Transaction pair ltc_btc
    tradepwd string yes Transaction password

    Request mode POST

    How to sign a request parameter

    User-submitted parameters are required to sign in addition to sign.

    First, the signature string is required to be sorted by parameter name (comparing the first letter of all parameter names, in abcd order. If the first letters are the same, then it depends on the second letter, and so on, for each of the parameters).

    For example: for the following parameters for the signature:

    api_key = 376892265asdad5d12726d8bbfbd8912b3 & timestamp = 1510235730 & nonce = 309127 & type = in & price = 0.04751351 & number = 10 & coin = eth_btc & tradepwd = asdf

    For example:

    api_key = 376892265asdad5d12726d8bbfbd8912b3 & coin = eth_btc & nonce = 309127 & number = 10 & price = 0.04751351 & timestamp = 1510235730 & tradepwd = asdf & type = in Apply for stitching secret_key

    The "sign" is the must transferred signature parameters.

    Finally, the 32-bit md5 algorithm is used to sign the final signature string to get the signature result string (the string is assigned to the parameter sign).


    Request URL

    HTTP http://www.bit-z.com/api_v1/tradeAdd

    HTTPS: https://www.bit-z.com/api_v1/tradeAdd


    Request instance : https://www.bit-z.com/api_v1/tradeAdd

    Return JSON dictionary

    Return results sample:

    {
    "code": 0, // status code
    "msg": "Success", //message
    "data": order_id
    }
  • 2.2 openOrders(My commission)

    Path:/api_v1/openOrders

    Request type:POST

    Request parameter
    Parameter Type Whether or not Remarks
    api_key string yes User request for apiKey
    timestamp string yes Current tim&stimestamp
    nonce string yes Random 6 bit character
    sign string yes Signature of request parameter
    coin string yes Transaction pair ltc_btc

    Request mode POST

    How to sign a request parameter

    User-submitted parameters are required to sign in addition to sign.

    First, the signature string is required to be sorted by parameter name (comparing the first letter of all parameter names, in abcd order. If the first letters are the same, then it depends on the second letter, and so on, for each of the parameters).

    For example: for the following parameters for the signature:

    api_key = 376892265asdad5d12726d8bbfbd8912b3 & timestamp = 1510235730 & nonce = 309127 & coin = eth_btc

    For example:

    api_key = 376892265asdad5d12726d8bbfbd8912b3 & coin = eth_btc & nonce = 309127 & timestamp = 1510235730 Apply for stitching secret_key

    The "sign" is the must transferred signature parameters.

    Finally, the 32-bit md5 algorithm is used to sign the final signature string to get the signature result string (the string is assigned to the parameter sign).


    Return URL

    HTTP: http://www.bit-z.com/api_v1/openOrders

    HTTPS: https://www.bit-z.com/api_v1/openOrders


    Request instance : https://www.bit-z.com/api_v1/openOrders

    Return JSON dictionary

    Return results sample:

    {
      "code": 0, // status code
      "msg": "Success", //message
      "data": openOrders_list
      }
    
  • 2.3 tradeCancel(Cancel the order)

    Path:/api_v1/tradeCancel

    Request type:POST

    Request parameter
    Parameter Type Whether or not Remarks
    api_key string yes User request for apiKey
    id string yes entrust id
    timestamp string yes Current tim&stimestamp
    nonce string yes Random 6 bit character
    sign string yes Signature of request parameter

    Request mode POST

    How to sign a request parameter

    User-submitted parameters are required to sign in addition to sign.

    First, the signature string is required to be sorted by parameter name (comparing the first letter of all parameter names, in abcd order. If the first letters are the same, then it depends on the second letter, and so on, for each of the parameters).

    For example: for the following parameters for the signature:

    api_key = 376892265asdad5d12726d8bbfbd8912b3 & id = 302221 & timestamp = 1510235730 & nonce = 309127

    For example:

    api_key = 376892265asdad5d12726d8bbfbd8912b3 & id = 302221 & timestamp = 1510235730 & nonce = 309127 Apply for stitching secret_key

    The "sign" is the must transferred signature parameters.

    Finally, the 32-bit md5 algorithm is used to sign the final signature string to get the signature result string (the string is assigned to the parameter sign).


    Return URL

    HTTP: http://www.bit-z.com/api_v1/tradeCancel

    HTTPS: https://www.bit-z.com/api_v1/tradeCancel


    Request instance : https://www.bit-z.com/api_v1/tradeCancel

    Return JSON dictionary

    Return results sample:

    {
      "code": 0, // status code
      "msg": "Success", //message
      "data": trust_id
      }
    
  • 2.4 balacnes(Balances)

    Path:/api_v1/balances

    Request type:POST

    Request parameter
    Parameter Type Whether or not Remarks
    api_key string yes User request for apiKey
    timestamp string yes Current tim&stimestamp
    nonce string yes Random 6 bit character
    sign string yes Signature of request parameter

    Request mode POST

    How to sign a request parameter

    User-submitted parameters are required to sign in addition to sign.

    First, the signature string is required to be sorted by parameter name (comparing the first letter of all parameter names, in abcd order. If the first letters are the same, then it depends on the second letter, and so on, for each of the parameters).

    For example: for the following parameters for the signature:

    api_key = 376892265asdad5d12726d8bbfbd8912b3 & id = 302221 & timestamp = 1510235730 & nonce = 309127

    For example:

    api_key = 376892265asdad5d12726d8bbfbd8912b3 & id = 302221 & timestamp = 1510235730 & nonce = 309127 Apply for stitching secret_key

    The "sign" is the must transferred signature parameters.

    Finally, the 32-bit md5 algorithm is used to sign the final signature string to get the signature result string (the string is assigned to the parameter sign).


    Return URL

    HTTP: http://www.bit-z.com/api_v1/balances

    HTTPS: https://www.bit-z.com/api_v1/balances


    Request instance : https://www.bit-z.com/api_v1/balances

    Return JSON dictionary

    Return results sample:

    {
      "code": 0, // status code
      "msg": "Success", //message
      "data": balance list
      }
    

3、Error code comparison table

error code detailed description
0 Success
100 The required parameter cannot be empty
101 Illegal parameter
102 The requested virtual currency does not exist
103 Key does not exist
104 Signature mismatch
105 System error
106 Request too often
200 IP restrictions cannot request this resource
201 Order does not exist
202 Non open API
203 Nonce must be a 6 bit string
204 Currency trading temporarily closed
205 Request expired
206 The current delegate information does not exist
401 Please complete your trade password
402 No trading time
403 Price entry error
404 Amount entry error
405 Not in the trading range
406 Trade password error
407 Single order quantity limit
408 There is not enough money

4、FAQ

  • 4.1 Return the result of random code

    Change the User-Agent of the calling program to the standard browser User-Agent.