Skip to content

Interface: RestClientOptions ​

Properties ​

PropertyTypeDescription
apiRegion?APIRegion-
baseUrl?stringOptionally 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?booleanSet to true to use Bybit's V5 demo trading: https://bybit-exchange.github.io/docs/v5/demo
enable_time_sync?booleanDisabled 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?booleanDefault: 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?booleanEnable keep alive for REST API requests (via axios). See: https://github.com/tiagosiebler/bybit-api/issues/368
keepAliveMsecs?numberWhen 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?stringYour API key
parse_exceptions?booleanDefault: true. whether to try and post-process request exceptions.
parseAPIRateLimits?booleanDefault: false. Enable to parse/include per-API/endpoint rate limits in responses.
recv_window?numberOverride the max size of the request window (in ms)
secret?stringYour API secret
siteId?stringSite 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?booleanDefault: false. If true, we'll throw errors if any params are undefined
sync_interval_ms?string | numberHow often to sync time drift with bybit servers
syncTimeBeforePrivateRequests?booleanDetermines whether to perform time synchronization before sending private requests
testnet?booleanSet to true to connect to testnet. Uses the live environment by default.
throwExceptions?booleanDefault: false. Enable to automatically throw responses for failed REST API requests
throwOnFailedRateLimitParse?booleanDefault: false. Enable to throw error if rate limit parser fails

Built by Siebly. Open source SDKs for exchange APIs.