K 线数据(蜡烛图)
GET /market/history/kline
聚合行情 (此接口获取ticker信息同时提供最近24小时的交易聚合信息)
GET /market/detail/merged
所有交易对的最新 Tickers
GET /market/tickers
市场深度数据
GET /market/depth
最近市场成交记录
GET /market/trade
获得近期交易记录
GET /market/history/trade
最近24小时行情数据
GET /market/detail
WebSocket 行情数据
Global站行情请求地址
wss://api.huobi.pro/ws
可以获得:
K线数据
市场深度行情数据
市场最新成交明细
提供24小时内最新市场概要
【API接口测试数据】
说明:内地服务器无法访问以下接口(你懂的)
获取所有币种:
https://api.huobi.pro/v1/common/currencys
{
"status": "ok",
"data": ["hb10", "usdt", "btc", "bch", "eth", "xrp", "ltc", "ht", "ada", "eos", "iota", "xem", "xmr", "dash", "neo", "trx", "icx", "lsk", "qtum", "etc", "btg", "omg", "hc", "zec", "dcr", "steem", "bts", "waves", "snt", "salt", "gnt", "cmt", "btm", "pay", "knc", "powr", "bat", "dgd", "ven", "qash", "zrx", "gas", "mana", "eng", "cvc", "mco", "mtl", "rdn", "storj", "chat", "srn", "link", "act", "tnb", "qsp", "req", "phx", "appc", "rcn", "smt", "adx", "tnt", "ost", "itc", "lun", "gnx", "ast", "evx", "mds", "snc", "propy", "eko", "nas", "bcd", "wax", "wicc", "topc", "swftc", "dbc", "elf", "aidoc", "qun", "iost", "yee", "dat", "theta", "let", "dta", "utk", "meet", "zil", "soc", "ruff", "ocn", "ela", "bcx", "sbtc", "etf", "bifi", "zla", "stk", "wpr", "mtn", "mtx", "edu", "blz", "abt", "ont", "ctxc", "bft", "wan", "kan", "lba", "poly", "pai", "wtc", "box", "dgb", "gxc", "bix", "xlm", "xvg", "hit", "ong", "bt1", "bt2", "xzc", "vet", "ncash", "grs", "egcc", "she", "mex", "iic", "gsc", "uc", "uip", "cnn", "aac", "uuu", "cdc", "lxt", "but", "18c", "datx", "portal", "gtc", "hot", "man", "get", "pc", "ren", "eosdac", "ae", "bkbt", "gve", "seele", "fti", "ekt", "xmx", "ycc", "fair", "ssp", "eon", "eop", "lym", "zjlt", "meetone", "pnt", "idt", "dac", "bcv", "sexc", "tos", "musk", "add", "mt", "kcash", "iq", "ncc", "rccc", "hpt", "cvcoin", "rte", "trio", "ardr", "nano", "usdc", "gusd", "tusd", "pax", "husd", "zen", "rbtc", "bsv", "dock", "mxc", "xtz", "wgp", "nuls", "cova", "lamb", "cvnt", "btt", "doge", "sc", "kmd", "mgo", "abl", "loom", "nexo", "mzk", "etn", "npxs", "top", "adt", "mvl", "iris", "hvt", "tfuel", "ugas", "new", "atom", "inc", "tt", "rsr", "nkn", "atp", "skm", "algo"]
}
获取所有交易对:
https://api.huobi.pro/v1/common/symbols
{
"status": "ok",
"data": [{
"base-currency": "link",
"quote-currency": "btc",
"price-precision": 8,
"amount-precision": 2,
"symbol-partition": "innovation",
"symbol": "linkbtc",
"state": "online",
"value-precision": 8,
"min-order-amt": 0.1,
"max-order-amt": 1000000,
"min-order-value": 0.0001
}, {
"base-currency": "bkbt",
"quote-currency": "eth",
"price-precision": 8,
"amount-precision": 2,
"symbol-partition": "innovation",
"symbol": "bkbteth",
"state": "online",
"value-precision": 8,
"min-order-amt": 1,
"max-order-amt": 100000000,
"min-order-value": 0.001
}, {
"base-currency": "top",
"quote-currency": "ht",
"price-precision": 6,
"amount-precision": 4,
"symbol-partition": "innovation",
"symbol": "topht",
"state": "online",
"value-precision": 8,
"min-order-amt": 1,
"max-order-amt": 100000000,
"min-order-value": 0.1
}]
}
https://api.huobi.pro/market/history/klineperiod=1day&size=10&symbol=btcusdt
{
"status": "ok",
"ch": "market.btcusdt.kline.1day",
"ts": 1561067356625,
"data": [{
"id": 1561046400,
"open": 9373.500000000000000000,
"close": 9501.890000000000000000,
"low": 9290.000000000000000000,
"high": 9580.000000000000000000,
"amount": 9182.215184702761010413,
"vol": 86652552.693200689875693480270000000000000000,
"count": 86487
}, {
"id": 1560960000,
"open": 9090.390000000000000000,
"close": 9374.390000000000000000,
"low": 9066.000000000000000000,
"high": 9403.580000000000000000,
"amount": 24571.782618099504255252,
"vol": 227523098.842329523409461129030000000000000000,
"count": 256164
}, {
"id": 1560873600,
"open": 9084.970000000000000000,
"close": 9090.760000000000000000,
"high": 9199.000000000000000000,
"low": 8966.000000000000000000,
"vol": 188913859.234153659086458523,
"amount": 20775.071328255934572166,
"count": 205269
}, {
"id": 1560787200,
"open": 9158.370000000000000000,
"close": 9085.250000000000000000,
"high": 9439.000000000000000000,
"low": 8966.000000000000000000,
"vol": 302906501.600844905414440988,
"amount": 32944.353993966982312921,
"count": 351908
}, {
"id": 1560700800,
"open": 9200.000000000000000000,
"close": 9158.360000000000000000,
"high": 9368.980000000000000000,
"low": 8830.330000000000000000,
"vol": 272731711.312018258988066982,
"amount": 29860.355187755246251318,
"count": 362724
}, {
"id": 1560614400,
"open": 8750.010000000000000000,
"close": 9200.000000000000000000,
"high": 9337.930000000000000000,
"low": 8728.280000000000000000,
"vol": 373255419.436284343888666260,
"amount": 41260.797813875241058156,
"count": 444852
}, {
"id": 1560528000,
"open": 8385.000000000000000000,
"close": 8750.000000000000000000,
"high": 8787.000000000000000000,
"low": 8314.650000000000000000,
"vol": 206348748.676312883833476594,
"amount": 24025.164694222630280999,
"count": 473524
}, {
"id": 1560441600,
"open": 8172.260000000000000000,
"close": 8385.000000000000000000,
"high": 8447.500000000000000000,
"low": 8136.900000000000000000,
"vol": 187001459.381641924418370852,
"amount": 22612.929555278417491807,
"count": 263757
}, {
"id": 1560355200,
"open": 8135.690000000000000000,
"close": 8172.490000000000000000,
"high": 8215.710000000000000000,
"low": 8011.000000000000000000,
"vol": 187851374.057020327121649497,
"amount": 23143.230322244546883587,
"count": 313459
}, {
"id": 1560268800,
"open": 7763.270000000000000000,
"close": 8133.960000000000000000,
"high": 8199.000000000000000000,
"low": 7690.190000000000000000,
"vol": 222191477.910977921555768407,
"amount": 27930.815235547505891014,
"count": 261577
}]
}
网友评论