stability and error cleaning. rule to read specs

This commit is contained in:
Dobromir Popov
2025-08-10 13:05:41 +03:00
parent e05163deb7
commit 6861d0f20b
4 changed files with 51 additions and 8 deletions

View File

@@ -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")