kraken: always insert ticks `list`, only append if vlm
parent
3be1d610e0
commit
efd52e8ce3
|
@ -24,7 +24,6 @@ from contextlib import (
|
||||||
)
|
)
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import (
|
from typing import (
|
||||||
Any,
|
|
||||||
AsyncGenerator,
|
AsyncGenerator,
|
||||||
Callable,
|
Callable,
|
||||||
Optional,
|
Optional,
|
||||||
|
@ -460,12 +459,16 @@ async def stream_quotes(
|
||||||
last = quote.close
|
last = quote.close
|
||||||
|
|
||||||
quote = normalize(quote)
|
quote = normalize(quote)
|
||||||
|
ticks = quote.setdefault(
|
||||||
|
'ticks',
|
||||||
|
[],
|
||||||
|
)
|
||||||
if tick_volume:
|
if tick_volume:
|
||||||
quote['ticks'] = [{
|
ticks.append({
|
||||||
'type': 'trade',
|
'type': 'trade',
|
||||||
'price': last,
|
'price': last,
|
||||||
'size': tick_volume,
|
'size': tick_volume,
|
||||||
}]
|
})
|
||||||
|
|
||||||
case 'l1':
|
case 'l1':
|
||||||
# passthrough quote msg
|
# passthrough quote msg
|
||||||
|
|
Loading…
Reference in New Issue