Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Conversation

@ImaRicklePick
Copy link

#63 Solution for the issue described there

@ImaRicklePick ImaRicklePick marked this pull request as ready for review December 2, 2021 19:11
@dextertd
Copy link
Collaborator

This is not a good way to solve this issue. Ideally, it should be solved at the root, which is by syncing the computer's clock (which python's time module relies on). I don't think it should be addressed in code, as it disguises the problem, which could cause other issues later on that would be difficult to diagnose.

If one was to address it in code, it should be done in one of the following ways:

  1. use an attribute like signature_window shown here, but add the difference to the current time instead of removing the millisecond conversion as done by this PR. It should look something like
expires = int((time.time() + 1) * 1000 + self.signature_window
  1. create a method which queries for bybit's server time and automatically calculates the difference and adjusts expires accordingly (in the same way as in the above example)

But I don't think these are real solutions and I don't want to encourage their use... However, I am open to persuasion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants