Production usage
Set timeouts and bound concurrency
Set an HTTP timeout for each operation and limit concurrent requests across workers. See Configuration for client options.
Retry reads deliberately
Retry transient read failures with a maximum attempt count or deadline, exponential backoff and jitter. Respect server retry guidance. Correct invalid parameters, permissions and signatures before retrying.
Resolve uncertain order outcomes
Bybit may accept an order before a request times out. Query getActiveOrders() with its category and orderLinkId or order ID before resubmitting. If the order is absent, check order history and executions; a filled order may no longer be active.
Save order identifiers before submission. Track acknowledgement, acceptance and fills separately.
Recover streaming state
The client reconnects and restores subscriptions. Listen for reconnect, reconnected and exception, and reconcile orders and positions after a connection gap.
Bybit V5 channels have different snapshot and delta semantics. Follow the documentation for each topic instead of treating every update as a complete replacement.
Track feed freshness and finish recovery before using affected data for new orders.
Logging
Record operation names, response codes, duration, retries and reconnects. Select fields using the SDK's error format; whole request and error objects can contain credentials.
Shut down cleanly
Stop new work, settle or reconcile outstanding requests, call WebsocketClient.closeAll() and clear application timers. The stream example includes shutdown handlers.
Upgrading
Review release notes and run integration checks before upgrading. Commit the lockfile to reproduce deployed versions.