var ticker = new KiteTicker("xxxx", "ZO7692", "xxxx"); var items=[53471239,53710343,53727751,53710087,53737223,53556743,53781767,53711111]; ticker.connect(); ticker.on("tick", onTick); ticker.on("connect", onConnect);
function onTick(ticks) { $.each( ticks, function( key, value ) { console.log(value); }); };
function onConnect() { ticker.subscribe(items); ticker.setMode(ticker.modeFull, [items]); }
var items=[53471239,53710343,53727751,53710087,53737223,53556743,53781767,53711111];
ticker.connect();
ticker.on("tick", onTick);
ticker.on("connect", onConnect);
function onTick(ticks) {
$.each( ticks, function( key, value ) {
console.log(value);
});
};
function onConnect() {
ticker.subscribe(items);
ticker.setMode(ticker.modeFull, [items]);
}
{mode: "quote", tradeable: true, Token: 53471239, LastTradedPrice: 39208, LastTradeQuantity: 1, …}
AverageTradePrice
:
39216.68
ClosePrice
:
39353
Depth
:
{buy: Array(0), sell: Array(0)}
HighPrice
:
39280
LastTradeQuantity
:
1
LastTradedPrice
:
39208
LowPrice
:
39198
NetPriceChangeFromClosingPrice
:
-0.36845983787767134
OpenPrice
:
39280
Token
:
53471239
TotalBuyQuantity
:
524
TotalSellQuantity
:
708
VolumeTradedToday
:
885
mode
:
"quote"
tradeable
:
true
For every trade depth is zero. Also response length is always 44 byte which is for quote mode.
You can check out new syntax here.