Skip to content

Public 深度盘口

CoinTiger-API edited this page Jul 1, 2019 · 4 revisions

深度盘口

NOTE

替换$symbol$为tchbtc, ethbtc等相应币对

请求

{
 "event":"sub",
 "params":{
 	    "channel":"market_$symbol$_depth_step[0-2]",
 	    "cb_id":"自定义",
 	    "asks":150,
 	    "bids":150
 	  }
}

返回订阅状态1次

{
 "event_rep":"subed",
 "channel":"market_$symbol$_depth_step[0-2]",
 "cb_id":"原路返回",
 "asks":150,
 "bids":150,
 "ts":1506584998239,
 "status":"ok"
}

持续返回订阅消息

{
 "channel":"market_$symbol$_depth_step[0-2]",
            //深度有3个维度,0、1、2
 "ts":1506584998239,//请求时间
 "tick":{
	 "asks":[//卖盘
	 	 {22112.22,0.9332},
 		 {22112.21,0.2},
	        ],
	 "buys":[//买盘
		 {22111.22,0.9332},
		 {22111.21,0.2},
	        ]
	}
}

Clone this wiki locally