ig-trading-api
Advanced tools
Comparing version 0.13.2 to 0.13.3
@@ -0,0 +0,0 @@ import { AxiosInstance } from 'axios'; |
@@ -0,0 +0,0 @@ "use strict"; |
export {}; |
@@ -0,0 +0,0 @@ "use strict"; |
export * from './AccountAPI'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { Authorization, RESTClient } from './client/RESTClient'; |
@@ -0,0 +0,0 @@ "use strict"; |
export {}; |
@@ -0,0 +0,0 @@ "use strict"; |
export * from './RESTClient'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -1,2 +0,2 @@ | ||
import { AxiosInstance, AxiosInterceptorManager, AxiosRequestConfig, AxiosResponse } from 'axios'; | ||
import { AxiosDefaults, AxiosInstance, AxiosInterceptorManager, AxiosRequestConfig, AxiosResponse } from 'axios'; | ||
import { LoginAPI } from '../login'; | ||
@@ -19,3 +19,3 @@ import { MarketAPI } from '../market'; | ||
private readonly apiKey; | ||
get defaults(): AxiosRequestConfig; | ||
get defaults(): AxiosDefaults; | ||
get interceptors(): { | ||
@@ -22,0 +22,0 @@ request: AxiosInterceptorManager<AxiosRequestConfig>; |
@@ -63,8 +63,8 @@ "use strict"; | ||
this.httpClient.interceptors.request.use((config) => __awaiter(this, void 0, void 0, function* () { | ||
const updatedHeaders = Object.assign(Object.assign({}, config.headers), { 'X-IG-API-KEY': isAuthorization(this.apiKey) ? this.apiKey.apiKey : this.apiKey }); | ||
const updatedHeaders = Object.assign(Object.assign({}, config.headers), { 'X-IG-API-KEY': isAuthorization(this.apiKey) ? `${this.apiKey.apiKey}` : this.apiKey }); | ||
const { accessToken, accountId, securityToken, clientSessionToken } = this.auth; | ||
if (config.url === login_1.LoginAPI.URL.SESSION && config.method === 'put') { | ||
// Edge case to switch accounts which doesn't work with Bearer tokens | ||
updatedHeaders['X-SECURITY-TOKEN'] = securityToken; | ||
updatedHeaders.CST = clientSessionToken; | ||
updatedHeaders['X-SECURITY-TOKEN'] = `${securityToken}`; | ||
updatedHeaders.CST = `${clientSessionToken}`; | ||
} | ||
@@ -71,0 +71,0 @@ else { |
export {}; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { AxiosInstance } from 'axios'; |
@@ -0,0 +0,0 @@ "use strict"; |
export {}; |
@@ -0,0 +0,0 @@ "use strict"; |
export * from './DealingAPI'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { APIClient } from './APIClient'; |
@@ -0,0 +0,0 @@ "use strict"; |
export * from './LightstreamerAPI'; | ||
export * from './interfaces'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ export declare enum ChartResolution { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { LightstreamerClient, Subscription } from 'lightstreamer-client-node'; |
@@ -68,4 +68,4 @@ "use strict"; | ||
}, | ||
snapshotTime: dt.toFormat('yyyy/LL/dd hh:mm:ss'), | ||
snapshotTimeUTC: dt.toFormat("yyyy-LL-dd'T'hh:mm:ss"), | ||
snapshotTime: dt.toFormat('yyyy/LL/dd HH:mm:ss'), | ||
snapshotTimeUTC: dt.toFormat("yyyy-LL-dd'T'HH:mm:ss"), | ||
}; | ||
@@ -72,0 +72,0 @@ onCandleUpdate(epic, candle); |
@@ -0,0 +0,0 @@ "use strict"; |
export * from './LoginAPI'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { AxiosInstance } from 'axios'; |
@@ -0,0 +0,0 @@ "use strict"; |
export {}; |
@@ -0,0 +0,0 @@ "use strict"; |
export * from './MarketAPI'; | ||
export * from './prices'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { AxiosInstance } from 'axios'; |
@@ -0,0 +0,0 @@ "use strict"; |
export {}; |
@@ -0,0 +0,0 @@ "use strict"; |
export * from './PriceAPI'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { AxiosInstance } from 'axios'; |
@@ -0,0 +0,0 @@ "use strict"; |
export {}; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -6,34 +6,34 @@ { | ||
"dependencies": { | ||
"@types/node": "15.14.9", | ||
"axios": "0.21.4", | ||
"@types/node": "16.11.25", | ||
"axios": "0.26.0", | ||
"axios-retry": "3.1.9", | ||
"lightstreamer-client-node": "8.0.3", | ||
"luxon": "2.0.2" | ||
"luxon": "2.3.0" | ||
}, | ||
"description": "IG Trading API for Node.js, written in TypeScript.", | ||
"devDependencies": { | ||
"@types/jasmine": "3.9.1", | ||
"@types/luxon": "2.0.4", | ||
"@typescript-eslint/eslint-plugin": "4.31.2", | ||
"@typescript-eslint/parser": "4.31.2", | ||
"@types/jasmine": "3.10.3", | ||
"@types/luxon": "2.0.9", | ||
"@typescript-eslint/eslint-plugin": "5.12.0", | ||
"@typescript-eslint/parser": "5.12.0", | ||
"cross-env": "7.0.3", | ||
"dotenv-defaults": "3.0.0", | ||
"eslint": "7.32.0", | ||
"eslint-config-prettier": "8.3.0", | ||
"dotenv-defaults": "5.0.0", | ||
"eslint": "8.9.0", | ||
"eslint-config-prettier": "8.4.0", | ||
"eslint-plugin-prettier": "4.0.0", | ||
"eslint-plugin-sort-keys-fix": "1.1.2", | ||
"eslint-plugin-typescript-sort-keys": "1.8.0", | ||
"eslint-plugin-typescript-sort-keys": "2.1.0", | ||
"generate-changelog": "1.8.0", | ||
"husky": "4.3.8", | ||
"jasmine": "3.9.0", | ||
"lint-staged": "11.1.2", | ||
"nock": "13.1.3", | ||
"jasmine": "4.0.2", | ||
"lint-staged": "12.3.4", | ||
"nock": "13.2.4", | ||
"nyc": "15.1.0", | ||
"prettier": "2.4.1", | ||
"pretty-quick": "3.1.1", | ||
"prettier": "2.5.1", | ||
"pretty-quick": "3.1.3", | ||
"rimraf": "3.0.2", | ||
"ts-node": "10.2.1", | ||
"typedoc": "0.21.9", | ||
"typedoc-plugin-markdown": "3.10.4", | ||
"typescript": "4.4.3" | ||
"ts-node": "10.5.0", | ||
"typedoc": "0.22.11", | ||
"typedoc-plugin-markdown": "3.11.13", | ||
"typescript": "4.5.5" | ||
}, | ||
@@ -100,3 +100,3 @@ "engines": { | ||
}, | ||
"version": "0.13.2" | ||
"version": "0.13.3" | ||
} |
Sorry, the diff of this file is not supported yet
241703
+ Added@types/node@16.11.25(transitive)
+ Addedaxios@0.26.0(transitive)
+ Addedluxon@2.3.0(transitive)
- Removed@types/node@15.14.9(transitive)
- Removedaxios@0.21.4(transitive)
- Removedluxon@2.0.2(transitive)
Updated@types/node@16.11.25
Updatedaxios@0.26.0
Updatedluxon@2.3.0