move constants to venue

deribit_fix
Nelson Torres 2024-11-15 14:41:47 -03:00
parent 2bdbe0f20e
commit 75d1d007fb
1 changed files with 1 additions and 5 deletions

View File

@ -58,6 +58,7 @@ from cryptofeed.symbols import Symbol
# types for managing the cb callbacks. # types for managing the cb callbacks.
# from cryptofeed.types import L1Book # from cryptofeed.types import L1Book
from .venues import ( from .venues import (
_ws_url,
MarketType, MarketType,
PAIRTYPES, PAIRTYPES,
Pair, Pair,
@ -95,11 +96,6 @@ _spawn_kwargs = {
} }
_url = 'https://www.deribit.com'
_ws_url = 'wss://www.deribit.com/ws/api/v2'
_testnet_ws_url = 'wss://test.deribit.com/ws/api/v2'
# convert datetime obj timestamp to unixtime in milliseconds # convert datetime obj timestamp to unixtime in milliseconds
def deribit_timestamp(when): def deribit_timestamp(when):
return int((when.timestamp() * 1000) + (when.microsecond / 1000)) return int((when.timestamp() * 1000) + (when.microsecond / 1000))