Skip to content

查询当前成交、历史成交(v2 版本)

CoinTiger-API edited this page Jul 25, 2019 · 8 revisions

GET {Trading_Macro_v2}/order/match_results/v2 查询当前成交、历史成交

请求参数:

参数名称 是否必须 类型 描述 默认值 取值范围
api_key true string 平台分配的api key
symbol true string 交易对 btcbitcny, bchbtc, rcneth ...
start-date true string 查询开始日期, 日期格式yyyy-mm-dd 起始日期和结束日志时间最大间隔7天
end-date true string 查询结束日期, 日期格式yyyy-mm-dd 起始日期和结束日志时间最大间隔7天
from false string 查询起始 ID (撮合ID) 配合direct 使用
direct false string 查询方向 next prev 向前,next 向后
size false string 查询记录大小 默认:50 最多一次查询50条数据
time true string 当前时间戳

请求参数:示例(不能直接使用,需要替换自己的参数)

GET https://api.cointiger.com/api/v2/order/match_results/v2?api_key=c9a97adf-7909-444a-bf9e-1471210c4770&sign=4d19bc9e7d84706dd45aa2e393675a7b775fe920751f769aeac75cf7b94c2b4bad4612534343437890e0ee2df769a227aa3f0d4d0db9305a67fb78ec314526bc&symbol=ethbtc&start-date=2018-05-11&end-date=2018-05-12&direct=next&size=10&time=1525515995127

响应数据:

参数名称 是否必须 数据类型 描述 取值范围
id true long 撮合ID
price true string 委托价格
volume true string 成交数量
fee true string 手续费
orderId true long 订单 ID
symbol true string 交易对 btcbitcny, bchbtc, eoseth ...
type true string 委托类型 buy-market:市价买, sell-market:市价卖, buy-limit:限价买, sell-limit:限价卖
status true string 订单状态 2:完全成交, 3 :部分成交
mtime true string 成交时间
source true string 订单来源 api

响应例子:

{
  "status": "ok",
  "data": [{
		"id": 1084584,
		"price": 0.07231094,
		"volume": 1.000,
		"orderId": 5228948,
		"mtime": 1524823324000,
		"symbol": "ethbtc",
		"type": "buy-limit",
		"status": 2,
		"fee": 0.00100000,
		"source": "api"
	}...]
}