Comparing version 1.0.11 to 1.0.12
@@ -54,9 +54,8 @@ "use strict"; | ||
strict_param_validation: false }, options); | ||
this.globalRequestOptions = Object.assign(Object.assign({ | ||
this.globalRequestOptions = Object.assign({ | ||
// in ms == 5 minutes by default | ||
timeout: 1000 * 60 * 5 }, requestOptions), { | ||
// FTX requirements | ||
headers: { | ||
[getHeader('key', options.domain)]: key, | ||
} }); | ||
timeout: 1000 * 60 * 5, headers: {} }, requestOptions); | ||
if (typeof key === 'string') { | ||
this.globalRequestOptions.headers[getHeader('key', options.domain)] = key; | ||
} | ||
if (typeof this.options.subAccountName === 'string') { | ||
@@ -67,3 +66,3 @@ this.globalRequestOptions.headers[getHeader('subaccount', options.domain)] = this.options.subAccountName; | ||
if (key && !secret) { | ||
throw new Error('API Key & Secret are both required for private enpoints'); | ||
throw new Error('API Key & Secret are both required for private endpoints'); | ||
} | ||
@@ -70,0 +69,0 @@ if (this.options.disable_time_sync !== true) { |
{ | ||
"name": "ftx-api", | ||
"version": "1.0.11", | ||
"version": "1.0.12", | ||
"description": "Node.js connector for FTX's REST APIs and WebSockets", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
116525
1924