Port kraken to declare "wap" field
parent
b72d7d3085
commit
f27d639552
|
@ -57,13 +57,15 @@ _ohlc_dtype = [
|
||||||
('close', float),
|
('close', float),
|
||||||
('volume', float),
|
('volume', float),
|
||||||
('count', int),
|
('count', int),
|
||||||
('vwap', float),
|
('bar_wap', float),
|
||||||
]
|
]
|
||||||
|
|
||||||
# UI components allow this to be declared such that additional
|
# UI components allow this to be declared such that additional
|
||||||
# (historical) fields can be exposed.
|
# (historical) fields can be exposed.
|
||||||
ohlc_dtype = np.dtype(_ohlc_dtype)
|
ohlc_dtype = np.dtype(_ohlc_dtype)
|
||||||
|
|
||||||
|
_show_wap_in_history = True
|
||||||
|
|
||||||
|
|
||||||
class Client:
|
class Client:
|
||||||
|
|
||||||
|
@ -341,7 +343,7 @@ async def stream_quotes(
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
async with trio_websocket.open_websocket_url(
|
async with trio_websocket.open_websocket_url(
|
||||||
'wss://ws.kraken.com',
|
'wss://ws.kraken.com/',
|
||||||
) as ws:
|
) as ws:
|
||||||
|
|
||||||
# XXX: setup subs
|
# XXX: setup subs
|
||||||
|
@ -433,7 +435,7 @@ async def stream_quotes(
|
||||||
'high',
|
'high',
|
||||||
'low',
|
'low',
|
||||||
'close',
|
'close',
|
||||||
'vwap',
|
'bar_wap', # in this case vwap of bar
|
||||||
'volume']
|
'volume']
|
||||||
][-1] = (
|
][-1] = (
|
||||||
o,
|
o,
|
||||||
|
|
Loading…
Reference in New Issue