forked from singlesly/bingx-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbingx-api.client.ts
More file actions
26 lines (21 loc) · 1.03 KB
/
Copy pathbingx-api.client.ts
File metadata and controls
26 lines (21 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { RequestExecutorInterface } from 'bingx-api/bingx/request-executor/request-executor.interface';
import { ListenKeyService } from 'bingx-api/bingx-client/services/listen-key.service';
import { TradeService } from 'bingx-api/bingx-client/services/trade.service';
import { AccountService } from 'bingx-api/bingx-client/services/account.service';
export class BingxApiClient {
private readonly services = {
[ListenKeyService.name]: new ListenKeyService(this.requestExecutor),
[TradeService.name]: new TradeService(this.requestExecutor),
[AccountService.name]: new AccountService(this.requestExecutor),
};
constructor(private readonly requestExecutor: RequestExecutorInterface) {}
public getListenKeyService(): ListenKeyService {
return this.services[ListenKeyService.name] as ListenKeyService;
}
public getTradeService(): TradeService {
return this.services[TradeService.name] as TradeService;
}
public getAccountService(): AccountService {
return this.services[AccountService.name] as AccountService;
}
}