stability and error cleaning. rule to read specs
This commit is contained in:
@@ -98,6 +98,14 @@ class BybitInterface(ExchangeInterface):
|
||||
testnet=self.test_mode
|
||||
)
|
||||
|
||||
# Sync server time for REST client and prefer larger recv_window
|
||||
try:
|
||||
self.rest_client.sync_server_time()
|
||||
# Increase REST recv window defensively
|
||||
self.rest_client.recv_window_ms = max(self.rest_client.recv_window_ms, 20000)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Test pybit connection first
|
||||
try:
|
||||
account_info = self.session.get_wallet_balance(accountType="UNIFIED")
|
||||
|
||||
Reference in New Issue
Block a user