tardis-dev / tardis-machine

Locally runnable server with built-in data caching, providing both tick-level historical and consolidated real-time cryptocurrency market data via HTTP and WebSocket APIs
https://docs.tardis.dev/api/tardis-machine
Mozilla Public License 2.0
243 stars 48 forks source link

Minimum timestamp difference for replaying websockets #12

Closed r614 closed 2 years ago

r614 commented 2 years ago

Hi,

I am writing some tests using Tardis Machine for replaying normalized data through the websocket endpoint, and I was wondering if there's a minimum difference needed between the from and to datetime objects to actually replay data, or this is a bug.

I am able to replay data successfully for a time difference of >=1 min, but anything less than that returns no data from the websocket. Ex, if I try replaying data between ["2022-01-01 00:01:00", "2022-01-01 00:02:00"] I successfully receive data, but if I try ["2022-01-01 00:01:00", "2022-01-01 00:01:30"] I get an empty response with no other changes to the code. I know there are messages during that time difference because I receive them with the former arguments.

I am listening to ~13 exchanges and ~30 symbols, for reference.

thaaddeus commented 2 years ago

Hi, yes one minute is minimum resolution.