接口描述:
  • 获取K线数据
请求URL:
  • https://apiv2.bitz.com/Market/kline
请求方式:
  • GET
参数:
参数名 必选 类型 备注
size integer 获取数量 范围1-300
to string 微秒戳,返回传入微秒戳之前的数据
symbol string eth_btc、ltc_btc 交易对
resolution string 1min 、5min 、15min 、30min 、60min、 4hour 、 1day 、5day 、1week、 1mon
请求示例:
  • https://apiv2.bitz.com/Market/kline?symbol=eos_btc&resolution=1mon&size=300
返回结果实例:
{
    "status": 200,
    "msg": "",
    "data": {
        "bars": [
            {
                "time": "1530288000000",
                "open": "0.00127236", //开盘价
                "high": "0.00159900", //最高价
                "low": "0.00120082",  //最低价
                "close": "0.00120148", //收盘价
                "volume": "539601.23460000", //成交量
                "datetime": "2018-06-30 00:00:00"
            },
            {
                "time": "1527696000000",
                "open": "0.00162150",
                "high": "0.00204430",
                "low": "0.00125145",
                "close": "0.00127348",
                "volume": "19151781.62590000",
                "datetime": "2018-05-31 00:00:00"
            },
        ],
        "resolution": "1mon", //类型
        "symbol": "eos_btc",  //交易对
        "from": "1530288000000",
        "to": "1506700800000",
        "size": "300"
    },
    "time": 1532671796,
    "microtime": "0.95496500 1532671796",
    "source": "api"
}

results matching ""

    No results matching ""