Interface: RestClientOptions
Properties
| Property | Type | Description |
|---|---|---|
apiRegion? | APIRegion | - |
baseUrl? | string | Optionally override API protocol + domain e.g baseUrl: 'https://api.bytick.com' |
customSignMessageFn? | (message: string, secret: string) => Promise<string> | Allows you to provide a custom "signMessage" function, e.g. to use node's much faster createHmac method Look in the examples folder for a demonstration on using node's createHmac instead. |
demoTrading? | boolean | Set to true to use Bybit's V5 demo trading: https://bybit-exchange.github.io/docs/v5/demo |
enable_time_sync? | boolean | Disabled by default. This can help on machines with consistent latency problems. Note: this feature is not recommended as one slow request can cause problems |
encodeSerialisedValues? | boolean | Default: true. If true, request parameters will be URI encoded during the signing process. New behaviour introduced in v3.2.1 to fix rare parameter-driven sign errors with unified margin cursors containing "%". |
keepAlive? | boolean | Enable keep alive for REST API requests (via axios). See: https://github.com/tiagosiebler/bybit-api/issues/368 |
keepAliveMsecs? | number | When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. Only relevant if keepAlive is set to true. Default: 1000 (defaults comes from https agent) |
key? | string | Your API key |
parse_exceptions? | boolean | Default: true. whether to try and post-process request exceptions. |
parseAPIRateLimits? | boolean | Default: false. Enable to parse/include per-API/endpoint rate limits in responses. |
recv_window? | number | Override the max size of the request window (in ms) |
secret? | string | Your API secret |
siteId? | string | Site ID sent as the x-site-id header on every REST request. WebSocket clients expose the same top-level siteId option. Brazil and Argentina internal accounts now use api.bybit.com without this header. Keep passing it only if a remaining site still requires x-site-id. See https://bybit-exchange.github.io/docs/v5/guide#authentication |
strict_param_validation? | boolean | Default: false. If true, we'll throw errors if any params are undefined |
sync_interval_ms? | string | number | How often to sync time drift with bybit servers |
syncTimeBeforePrivateRequests? | boolean | Determines whether to perform time synchronization before sending private requests |
testnet? | boolean | Set to true to connect to testnet. Uses the live environment by default. |
throwExceptions? | boolean | Default: false. Enable to automatically throw responses for failed REST API requests |
throwOnFailedRateLimitParse? | boolean | Default: false. Enable to throw error if rate limit parser fails |