Compare commits

..

1 Commits

Author SHA1 Message Date
Nelson Torres fcf68b3fe9 Added cryptofeed and pyarrow necessary for the feed, enable deribit
in the brokers init file, at this point the feed is working, to check
the tables use vd tool.
2024-08-27 23:58:36 +00:00
2 changed files with 10 additions and 9 deletions

View File

@ -51,7 +51,6 @@ __brokers__: list[str] = [
'ib', 'ib',
'kraken', 'kraken',
'kucoin', 'kucoin',
'deribit',
# broken but used to work # broken but used to work
# 'questrade', # 'questrade',
@ -62,6 +61,7 @@ __brokers__: list[str] = [
# wstrade # wstrade
# iex # iex
'deribit',
# bitso # bitso
] ]

View File

@ -31,7 +31,9 @@ from typing import (
Callable, Callable,
) )
from pendulum import now from pendulum import (
now,
)
import trio import trio
from trio_typing import TaskStatus from trio_typing import TaskStatus
from rapidfuzz import process as fuzzy from rapidfuzz import process as fuzzy
@ -418,7 +420,6 @@ class Client:
new_bars: list[tuple] = [] new_bars: list[tuple] = []
for i in range(len(result.close)): for i in range(len(result.close)):
timestamp = (start_time + (i * (60 * 1000))) / 1000.0
_open = result.open[i] _open = result.open[i]
high = result.high[i] high = result.high[i]
low = result.low[i] low = result.low[i]
@ -426,12 +427,12 @@ class Client:
volume = result.volume[i] volume = result.volume[i]
row = [ row = [
timestamp, # time (start_time + (i * (60 * 1000))) / 1000.0, # time
_open, result.open[i],
high, result.high[i],
low, result.low[i],
close, result.close[i],
volume result.volume[i]
] ]
new_bars.append((i,) + tuple(row)) new_bars.append((i,) + tuple(row))