ig-trading-api
Advanced tools
Comparing version 0.13.4 to 0.13.5
@@ -0,0 +0,0 @@ import { AxiosInstance } from 'axios'; |
@@ -18,3 +18,3 @@ "use strict"; | ||
AccountStatus["SUSPENDED_FROM_DEALING"] = "SUSPENDED_FROM_DEALING"; | ||
})(AccountStatus = exports.AccountStatus || (exports.AccountStatus = {})); | ||
})(AccountStatus || (exports.AccountStatus = AccountStatus = {})); | ||
var AccountType; | ||
@@ -25,3 +25,3 @@ (function (AccountType) { | ||
AccountType["SPREADBET"] = "SPREADBET"; | ||
})(AccountType = exports.AccountType || (exports.AccountType = {})); | ||
})(AccountType || (exports.AccountType = AccountType = {})); | ||
var TransactionType; | ||
@@ -33,3 +33,3 @@ (function (TransactionType) { | ||
TransactionType["WITHDRAWAL"] = "WITHDRAWAL"; | ||
})(TransactionType = exports.TransactionType || (exports.TransactionType = {})); | ||
})(TransactionType || (exports.TransactionType = TransactionType = {})); | ||
var Channel; | ||
@@ -43,3 +43,3 @@ (function (Channel) { | ||
Channel["WEB"] = "WEB"; | ||
})(Channel = exports.Channel || (exports.Channel = {})); | ||
})(Channel || (exports.Channel = Channel = {})); | ||
var ActionType; | ||
@@ -65,3 +65,3 @@ (function (ActionType) { | ||
ActionType["WORKING_ORDER_DELETED"] = "WORKING_ORDER_DELETED"; | ||
})(ActionType = exports.ActionType || (exports.ActionType = {})); | ||
})(ActionType || (exports.ActionType = ActionType = {})); | ||
var ActivityStatus; | ||
@@ -72,3 +72,3 @@ (function (ActivityStatus) { | ||
ActivityStatus["UNKNOWN"] = "UNKNOWN"; | ||
})(ActivityStatus = exports.ActivityStatus || (exports.ActivityStatus = {})); | ||
})(ActivityStatus || (exports.ActivityStatus = ActivityStatus = {})); | ||
var ActivityType; | ||
@@ -80,3 +80,3 @@ (function (ActivityType) { | ||
ActivityType["WORKING_ORDER"] = "WORKING_ORDER"; | ||
})(ActivityType = exports.ActivityType || (exports.ActivityType = {})); | ||
})(ActivityType || (exports.ActivityType = ActivityType = {})); | ||
class AccountAPI { | ||
@@ -83,0 +83,0 @@ constructor(apiClient) { |
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"; |
@@ -0,0 +0,0 @@ import { AxiosDefaults, AxiosInstance, AxiosInterceptorManager, AxiosRequestConfig, AxiosResponse } from 'axios'; |
@@ -22,3 +22,10 @@ "use strict"; | ||
const axios_retry_1 = __importDefault(require("axios-retry")); | ||
const hasErrorCode_1 = require("./hasErrorCode"); | ||
class RESTClient { | ||
get defaults() { | ||
return this.httpClient.defaults; | ||
} | ||
get interceptors() { | ||
return this.httpClient.interceptors; | ||
} | ||
constructor(baseURL, apiKey) { | ||
@@ -39,4 +46,3 @@ this.apiKey = apiKey; | ||
retryCondition: (error) => { | ||
var _a, _b; | ||
const errorCode = (_b = (_a = error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.errorCode; | ||
const errorCode = (0, hasErrorCode_1.hasErrorCode)(error) ? error.response.data.errorCode : undefined; | ||
switch (errorCode) { | ||
@@ -92,10 +98,4 @@ case 'error.public-api.exceeded-api-key-allowance': | ||
} | ||
get defaults() { | ||
return this.httpClient.defaults; | ||
} | ||
get interceptors() { | ||
return this.httpClient.interceptors; | ||
} | ||
} | ||
exports.RESTClient = RESTClient; | ||
//# sourceMappingURL=RESTClient.js.map |
export {}; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { AxiosInstance } from 'axios'; |
@@ -17,3 +17,3 @@ "use strict"; | ||
Direction["SELL"] = "SELL"; | ||
})(Direction = exports.Direction || (exports.Direction = {})); | ||
})(Direction || (exports.Direction = Direction = {})); | ||
var PositionOrderType; | ||
@@ -24,3 +24,3 @@ (function (PositionOrderType) { | ||
PositionOrderType["QUOTE"] = "QUOTE"; | ||
})(PositionOrderType = exports.PositionOrderType || (exports.PositionOrderType = {})); | ||
})(PositionOrderType || (exports.PositionOrderType = PositionOrderType = {})); | ||
var PositionTimeInForce; | ||
@@ -30,3 +30,3 @@ (function (PositionTimeInForce) { | ||
PositionTimeInForce["FILL_OR_KILL"] = "FILL_OR_KILL"; | ||
})(PositionTimeInForce = exports.PositionTimeInForce || (exports.PositionTimeInForce = {})); | ||
})(PositionTimeInForce || (exports.PositionTimeInForce = PositionTimeInForce = {})); | ||
var OrderType; | ||
@@ -36,3 +36,3 @@ (function (OrderType) { | ||
OrderType["STOP"] = "STOP"; | ||
})(OrderType = exports.OrderType || (exports.OrderType = {})); | ||
})(OrderType || (exports.OrderType = OrderType = {})); | ||
var OrderTimeInForce; | ||
@@ -42,3 +42,3 @@ (function (OrderTimeInForce) { | ||
OrderTimeInForce["GOOD_TILL_DATE"] = "GOOD_TILL_DATE"; | ||
})(OrderTimeInForce = exports.OrderTimeInForce || (exports.OrderTimeInForce = {})); | ||
})(OrderTimeInForce || (exports.OrderTimeInForce = OrderTimeInForce = {})); | ||
var AffectedDealStatus; | ||
@@ -51,3 +51,3 @@ (function (AffectedDealStatus) { | ||
AffectedDealStatus["PARTIALLY_CLOSED"] = "PARTIALLY_CLOSED"; | ||
})(AffectedDealStatus = exports.AffectedDealStatus || (exports.AffectedDealStatus = {})); | ||
})(AffectedDealStatus || (exports.AffectedDealStatus = AffectedDealStatus = {})); | ||
var DealStatus; | ||
@@ -57,3 +57,3 @@ (function (DealStatus) { | ||
DealStatus["REJECTED"] = "REJECTED"; | ||
})(DealStatus = exports.DealStatus || (exports.DealStatus = {})); | ||
})(DealStatus || (exports.DealStatus = DealStatus = {})); | ||
var Status; | ||
@@ -66,3 +66,3 @@ (function (Status) { | ||
Status["PARTIALLY_CLOSED"] = "PARTIALLY_CLOSED"; | ||
})(Status = exports.Status || (exports.Status = {})); | ||
})(Status || (exports.Status = Status = {})); | ||
class DealingAPI { | ||
@@ -69,0 +69,0 @@ constructor(apiClient) { |
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 { |
@@ -10,3 +10,3 @@ "use strict"; | ||
ChartResolution["SECOND"] = "SECOND"; | ||
})(ChartResolution = exports.ChartResolution || (exports.ChartResolution = {})); | ||
})(ChartResolution || (exports.ChartResolution = ChartResolution = {})); | ||
var ChartFields; | ||
@@ -36,3 +36,3 @@ (function (ChartFields) { | ||
ChartFields["UTM"] = "UTM"; | ||
})(ChartFields = exports.ChartFields || (exports.ChartFields = {})); | ||
})(ChartFields || (exports.ChartFields = ChartFields = {})); | ||
//# sourceMappingURL=interfaces.js.map |
@@ -0,0 +0,0 @@ import { LightstreamerClient, Subscription } from 'lightstreamer-client-node'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
export * from './LoginAPI'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -25,3 +25,3 @@ import { AxiosInstance } from 'axios'; | ||
private readonly apiClient; | ||
private auth; | ||
private readonly auth; | ||
static readonly URL: { | ||
@@ -28,0 +28,0 @@ REFRESH_TOKEN: string; |
@@ -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"; |
@@ -158,3 +158,3 @@ import { AxiosInstance } from 'axios'; | ||
} | ||
export declare type MarketDetails = { | ||
export type MarketDetails = { | ||
marketDetails: MarketDetail[]; | ||
@@ -161,0 +161,0 @@ }; |
@@ -33,3 +33,3 @@ "use strict"; | ||
InstrumentType["UNKNOWN"] = "UNKNOWN"; | ||
})(InstrumentType = exports.InstrumentType || (exports.InstrumentType = {})); | ||
})(InstrumentType || (exports.InstrumentType = InstrumentType = {})); | ||
var InstrumentUnit; | ||
@@ -40,3 +40,3 @@ (function (InstrumentUnit) { | ||
InstrumentUnit["SHARES"] = "SHARES"; | ||
})(InstrumentUnit = exports.InstrumentUnit || (exports.InstrumentUnit = {})); | ||
})(InstrumentUnit || (exports.InstrumentUnit = InstrumentUnit = {})); | ||
var MarketOrderPreference; | ||
@@ -47,3 +47,3 @@ (function (MarketOrderPreference) { | ||
MarketOrderPreference["NOT_AVAILABLE"] = "NOT_AVAILABLE"; | ||
})(MarketOrderPreference = exports.MarketOrderPreference || (exports.MarketOrderPreference = {})); | ||
})(MarketOrderPreference || (exports.MarketOrderPreference = MarketOrderPreference = {})); | ||
var TrailingStopPreference; | ||
@@ -53,3 +53,3 @@ (function (TrailingStopPreference) { | ||
TrailingStopPreference["NOT_AVAILABLE"] = "NOT_AVAILABLE"; | ||
})(TrailingStopPreference = exports.TrailingStopPreference || (exports.TrailingStopPreference = {})); | ||
})(TrailingStopPreference || (exports.TrailingStopPreference = TrailingStopPreference = {})); | ||
var MarketStatus; | ||
@@ -64,3 +64,3 @@ (function (MarketStatus) { | ||
MarketStatus["TRADEABLE"] = "TRADEABLE"; | ||
})(MarketStatus = exports.MarketStatus || (exports.MarketStatus = {})); | ||
})(MarketStatus || (exports.MarketStatus = MarketStatus = {})); | ||
class MarketAPI { | ||
@@ -67,0 +67,0 @@ constructor(apiClient) { |
export {}; |
@@ -0,0 +0,0 @@ "use strict"; |
export * from './PriceAPI'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { AxiosInstance } from 'axios'; |
@@ -34,3 +34,3 @@ "use strict"; | ||
Resolution["WEEK"] = "WEEK"; | ||
})(Resolution = exports.Resolution || (exports.Resolution = {})); | ||
})(Resolution || (exports.Resolution = Resolution = {})); | ||
var ResolutionInMillis; | ||
@@ -53,3 +53,3 @@ (function (ResolutionInMillis) { | ||
ResolutionInMillis[ResolutionInMillis["WEEK"] = 604800000] = "WEEK"; | ||
})(ResolutionInMillis = exports.ResolutionInMillis || (exports.ResolutionInMillis = {})); | ||
})(ResolutionInMillis || (exports.ResolutionInMillis = ResolutionInMillis = {})); | ||
class PriceAPI { | ||
@@ -56,0 +56,0 @@ constructor(apiClient) { |
export {}; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -6,34 +6,32 @@ { | ||
"dependencies": { | ||
"@types/node": "16.11.45", | ||
"axios": "0.26.1", | ||
"@types/node": "^16.11.45", | ||
"axios": "^1.4.0", | ||
"axios-retry": "3.1.9", | ||
"lightstreamer-client-node": "8.0.4", | ||
"luxon": "3.0.1" | ||
"lightstreamer-client-node": "^9.0.0", | ||
"luxon": "^3.4.0" | ||
}, | ||
"description": "IG Trading API for Node.js, written in TypeScript.", | ||
"devDependencies": { | ||
"@types/jasmine": "4.0.3", | ||
"@types/luxon": "3.0.0", | ||
"@typescript-eslint/eslint-plugin": "5.30.7", | ||
"@typescript-eslint/parser": "5.30.7", | ||
"cross-env": "7.0.3", | ||
"dotenv-defaults": "5.0.2", | ||
"eslint": "8.20.0", | ||
"eslint-config-prettier": "8.5.0", | ||
"eslint-plugin-prettier": "4.2.1", | ||
"eslint-plugin-sort-keys-fix": "1.1.2", | ||
"eslint-plugin-typescript-sort-keys": "2.1.0", | ||
"generate-changelog": "1.8.0", | ||
"husky": "4.3.8", | ||
"jasmine": "4.2.1", | ||
"lint-staged": "13.0.3", | ||
"nock": "13.2.9", | ||
"nyc": "15.1.0", | ||
"prettier": "2.7.1", | ||
"pretty-quick": "3.1.3", | ||
"rimraf": "3.0.2", | ||
"ts-node": "10.9.1", | ||
"typedoc": "0.22.16", | ||
"typedoc-plugin-markdown": "3.12.1", | ||
"typescript": "4.7.4" | ||
"@types/jasmine": "^4.3.5", | ||
"@types/luxon": "^3.3.1", | ||
"@typescript-eslint/eslint-plugin": "^6.3.0", | ||
"@typescript-eslint/parser": "^6.3.0", | ||
"cross-env": "^7.0.3", | ||
"dotenv-defaults": "^5.0.2", | ||
"eslint": "^8.47.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"eslint-plugin-sort-keys-fix": "^1.1.2", | ||
"eslint-plugin-typescript-sort-keys": "^2.3.0", | ||
"generate-changelog": "^1.8.0", | ||
"jasmine": "^5.1.0", | ||
"lefthook": "^1.4.8", | ||
"nock": "^13.3.2", | ||
"nyc": "^15.1.0", | ||
"prettier": "^3.0.1", | ||
"rimraf": "^5.0.1", | ||
"ts-node": "^10.9.1", | ||
"typedoc": "^0.24.8", | ||
"typedoc-plugin-markdown": "^3.15.4", | ||
"typescript": "^5.1.6" | ||
}, | ||
@@ -70,4 +68,4 @@ "engines": { | ||
"build": "tsc", | ||
"changelog:commit": "git add CHANGELOG.md && git commit -m \"docs: Updated changelog\"", | ||
"clean": "rimraf .nyc_output coverage dist", | ||
"changelog:commit": "git add CHANGELOG.md && git commit -m \"docs: Updated changelog\" && git push origin", | ||
"clean": "rimraf .nyc_output coverage docs dist", | ||
"demo:account": "ts-node ./src/demo/account.ts", | ||
@@ -79,6 +77,5 @@ "demo:login": "ts-node ./src/demo/login.ts", | ||
"dist": "yarn clean && yarn build", | ||
"docs": "yarn docs:build && yarn docs:start", | ||
"docs:build": "yarn typedoc", | ||
"docs:release": "yarn docs:build && git add docs/* && git commit -m \"docs: Updated API\"", | ||
"docs:start": "docsify serve docs", | ||
"docs": "yarn docs:build", | ||
"docs:build": "typedoc", | ||
"docs:release": "yarn docs:build && git add docs/* && git commit -m \"docs: Updated API\" && yarn changelog:commit", | ||
"fix": "yarn fix:other && yarn fix:code", | ||
@@ -88,11 +85,11 @@ "fix:code": "yarn lint:code --fix", | ||
"lint": "yarn lint:types && yarn lint:code && yarn lint:other", | ||
"lint:code": "eslint --ignore-path .gitignore --ext .js,.jsx,.ts,.tsx .", | ||
"lint:code": "eslint --ignore-path .gitignore --ignore-pattern \"/docs/\" --ext .js,.jsx,.ts,.tsx --no-error-on-unmatched-pattern .", | ||
"lint:other": "yarn prettier --list-different", | ||
"lint:types": "tsc --noEmit", | ||
"postversion": "git push origin && git push origin --tags && npm publish", | ||
"prettier": "prettier --ignore-path .gitignore --loglevel silent \"**/*.{html,json,scss,yml}\"", | ||
"preversion": "git checkout main && git pull && yarn install && yarn lint && yarn test && yarn dist", | ||
"release:major": "generate-changelog -M && yarn changelog:commit && yarn docs:release && npm version major", | ||
"release:minor": "generate-changelog -m && yarn changelog:commit && yarn docs:release && npm version minor", | ||
"release:patch": "generate-changelog -p && yarn changelog:commit && yarn docs:release && npm version patch", | ||
"postversion": "git push origin && git push origin --tags && npm publish --access public", | ||
"prettier": "prettier --log-level silent \"**/*.{html,json,scss,yml}\"", | ||
"preversion": "git checkout main && git pull && npm run && npm run test && npm run dist", | ||
"release:major": "generate-changelog -M -x \"chore,test\" && yarn docs:release && npm version major", | ||
"release:minor": "generate-changelog -m -x \"chore,test\" && yarn docs:release && npm version minor", | ||
"release:patch": "generate-changelog -p -x \"chore,test\" && yarn docs:release && npm version patch", | ||
"start": "node --inspect -r ts-node/register src/demo/start.ts", | ||
@@ -103,3 +100,3 @@ "test": "nyc --nycrc-path=nyc.config.coverage.json jasmine --config=jasmine.json", | ||
}, | ||
"version": "0.13.4" | ||
"version": "0.13.5" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22
81
3779
239774
+ Added@types/node@16.18.119(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaxios@1.7.7(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcookiejar@2.1.4(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedform-data@4.0.1(transitive)
+ Addedjsonpatch@3.1.0(transitive)
+ Addedlightstreamer-client-node@9.2.1(transitive)
+ Addedluxon@3.5.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedproxy-from-env@1.1.0(transitive)
+ Addedws@8.18.0(transitive)
- Removed@types/node@16.11.45(transitive)
- Removedaxios@0.26.1(transitive)
- Removedfaye-websocket@0.11.4(transitive)
- Removedhttp-parser-js@0.5.8(transitive)
- Removedlightstreamer-client-node@8.0.4(transitive)
- Removedluxon@3.0.1(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedwebsocket-driver@0.7.4(transitive)
- Removedwebsocket-extensions@0.1.4(transitive)
- Removedxmlhttprequest@1.8.0(transitive)
- Removedxmlhttprequest-cookie@0.9.9(transitive)
Updated@types/node@^16.11.45
Updatedaxios@^1.4.0
Updatedluxon@^3.4.0