Skip to content

Commit

Permalink
feat: Handle market positions (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
beekeweerts committed Jan 27, 2021
1 parent abf53d4 commit 58f0e84
Show file tree
Hide file tree
Showing 7 changed files with 866 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
"changelog:commit": "git add CHANGELOG.md && git commit -m \"docs: Updated changelog\"",
"clean": "rimraf .nyc_output coverage dist",
"demo:login": "ts-node ./src/demo/login.ts",
"demo:position": "ts-node ./src/demo/position.ts",
"demo:order": "ts-node ./src/demo/order.ts",
"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\"",
Expand Down
3 changes: 3 additions & 0 deletions src/client/RESTClient.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import axios, {AxiosInstance, AxiosInterceptorManager, AxiosRequestConfig, AxiosResponse} from 'axios';
import {LoginAPI} from '../login';
import {MarketAPI} from '../market';
import {DealingAPI} from '../dealing';

export interface Authorization {
clientSessionToken?: string;
Expand All @@ -21,6 +22,7 @@ export class RESTClient {

readonly login: LoginAPI;
readonly market: MarketAPI;
readonly dealing: DealingAPI;

readonly httpClient: AxiosInstance;
private readonly auth: Authorization = {};
Expand Down Expand Up @@ -54,5 +56,6 @@ export class RESTClient {

this.login = new LoginAPI(this.httpClient, this.auth);
this.market = new MarketAPI(this.httpClient);
this.dealing = new DealingAPI(this.httpClient);
}
}

0 comments on commit 58f0e84

Please sign in to comment.