-
Notifications
You must be signed in to change notification settings - Fork 611
Bybit converter #276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bybit converter #276
Conversation
Codacy Static Code Analysis issue with complexity of convert function, but honestly I just followed the pattern of the other convertors in the codebase. |
Thank you for your contribution! When multiple depth levels exist in one file, they must be fused for proper handling, or only a single depth level should be processed. Please refer to https://github.com/nkaz001/hftbacktest/blob/master/py-hftbacktest/hftbacktest/data/utils/tardis.py#L477 |
Ah makes sense, thanks. Will do |
Thanks done in 7e57100 Two functions: def convert_fused(
input_filename: str,
output_filename: Optional[str] = None,
base_latency: float = 0,
buffer_size: int = 100_000_000,
tick_size: float = 0.01,
lot_size: float = 0.001,
) -> NDArray: # using FuseMarketDepth for multi level fusion conversion.
def convert_depth(
input_filename: str,
output_filename: Optional[str] = None,
base_latency: float = 0,
buffer_size: int = 100_000_000,
single_depth_level: BybitDepthLevel = BybitDepthLevel.LEVEL_50,
) -> NDArray: # using single depth level for conversion. Let me know if this is what you had in mind, thanks. |
From issue: #261
Confirmed visually via the example script: