API Document

币龙网客服 - 2018年11月30日 l 17:41:36 CST

REST Endpoints

https://www.bitalong.com

 

Public API Methods

Please note that making more than 6 calls per second to the public API, or repeatedly and needlessly fetching excessive amounts of data, can result in your IP being banned.

 

There are six public methods, all of which take HTTP GET requests and return output in JSON format:

 

  • pairs

call: https://www.bitalong.com/api/index/pairs

Returns the pair for all markets. Sample output:

 

["btc_usdt","bch_usdt","ltc_usdt","eth_usdt","etc_usdt","zec_usdt","xmr_usdt","dash_usdt","doge_usdt","qtum_usdt","eos_usdt","ae_usdt","zil_usdt","ae_btc","zil_btc","pivx_btc","dero_btc","ltc_btc","bch_btc","eth_btc","zec_btc","xmr_btc","dash_btc","doge_btc","qtum_btc","eos_btc","etn_btc"]

 

  • tickers

call:  https://www.bitalong.com/api/index/tickers

Returns the ticker for all markets. Sample output:

{

         "btc_usdt": {

                   "result": "true",

                   "last": "6739.4042",

                   "lowestAsk": "6753.4800",

                   "highestBid": "6726.5100",

                   "percentChange": "-2.59",

                   "baseVolume": "435.4103",

                   "quoteVolume": "2968554.2683",

                   "high24hr": "6951.0471",

                   "low24hr": "6655.0953"

         },

         "bch_usdt": {

                   "result": "true",

                   "last": "468.2111",

                   "lowestAsk": "469.0969",

                   "highestBid": "466.8883",

                   "percentChange": "-1.90",

                   "baseVolume": "4791.6736",

                   "quoteVolume": "2220615.8794",

                   "high24hr": "482.0203",

                   "low24hr": "461.1908"

         }

}

 

  • ticker

call: https://www.bitalong.com/api/index/ticker/btc_usdt

Required GET parameters are "[pair]", Returns the ticker for given market(eg. btc_usdt). Sample output:

{

         "result": "true",

         "last": "6738.7654",

         "lowestAsk": "6752.2375",

         "highestBid": "6724.7136",

         "percentChange": "-2.60",

         "baseVolume": "435.5750",

         "quoteVolume": "2968554.2683",

         "high24hr": "6951.0471",

         "low24hr": "6655.0953"

}

 

  • orderBook

call: https://www.bitalong.com/api/index/orderBook/btc_usdt

Required GET parameters are "[pair]", Returns the order book for a given market(eg. btc_usdt).Sample output:

{

         "result": "true",

         "asks": [

                   ["6787.1294", "0.1406"],

                   ["6785.6183", "0.4705"],

                   ["6784.1071", "0.6442"],

                   ["6782.5960", "0.2962"],

                   ["6781.0848", "0.3315"],

                   ["6779.5737", "0.3443"],

                   ["6778.0626", "0.0449"],

                   ["6776.5514", "0.6736"],

                   ["6775.0403", "0.4739"],

                   ["6755.7266", "0.1160"],

                   ["6754.6033", "0.1198"],

                   ["6753.4800", "0.1185"]

         ],

         "bids": [

                   ["6725.9412", "0.1198"],

                   ["6724.8179", "0.1199"],

                   ["6723.6947", "0.1192"],

                   ["6705.0786", "0.0345"],

                   ["6704.3945", "0.0572"],

                   ["6703.7105", "0.0054"],

                   ["6703.5750", "0.0483"],

                   ["6702.0638", "0.0095"],

                   ["6700.5527", "0.0170"],

                   ["6699.0415", "0.0138"],

                   ["6697.5304", "0.0287"],

                   ["6696.0193", "0.0505"]

         ]

}

 

  • tradeHistory

call: https://www.bitalong.com/api/index/tradeHistory/btc_usdt

Returns the past 80 trades for a given market(eg. btc_usdt).Sample output:

  {

    "result": "true",

    "data": [

        {

            "tradeID": "21314854",

            "date": "2018-10-15 15:37:49",

            "type": "sell",

            "rate": "7078.6576",

            "amount": 0.01,

            "total": 70.786576

        },

        {

            "tradeID": "21314822",

            "date": "2018-10-15 15:37:28",

            "type": "buy",

            "rate": "7090.1246",

            "amount": 0.097,

            "total": 687.742086

        }

    ],

    "elapsed": "0.0008ms"

}

 

  • marketinfo

call: https://www.bitalong.com/api/index/marketinfo

Returns information about currencies. Sample output:

    "result": "true",

    "pairs": {

        "eth_btc": {

            "decimal_places": "8",

            "min_amount": "0.00002",

            "fee_buy": "0.2",

            "fee_sell": "0.2"

        },

        "ltc_btc": {

            "decimal_places": "8",

            "min_amount": "0.00001",

            "fee_buy": "0.2",

            "fee_sell": "0.2"

        },

        "xmr_btc": {

            "decimal_places": "8",

            "min_amount": "0.00002",

            "fee_buy": "0.2",

            "fee_sell": "0.2"

        },

        "ltc_eth": {

            "decimal_places": "6",

            "min_amount": "0.000001",

            "fee_buy": "0.2",

            "fee_sell": "0.2"

        },

        "xmr_eth": {

            "decimal_places": "6",

            "min_amount": "0.000001",

            "fee_buy": "0.2",

            "fee_sell": "0.2"

        },

        "dash_btc": {

            "decimal_places": "8",

            "min_amount": "0.00001",

            "fee_buy": "0.2",

            "fee_sell": "0.2"

        }

    }

}

 

 

 

 

 

 

评论

登录 添加您的评论。