forked from singlesly/bingx-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccount.service.ts
More file actions
20 lines (17 loc) · 938 Bytes
/
Copy pathaccount.service.ts
File metadata and controls
20 lines (17 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { RequestExecutorInterface } from 'bingx-api/bingx/request-executor/request-executor.interface';
import { AccountInterface } from 'bingx-api/bingx/account/account.interface';
import { BingxGetPerpetualSwapAccountAssetEndpoint } from 'bingx-api/bingx/endpoints/bingx-get-perpetual-swap-account-asset-endpoint';
import { BingxPerpetualSwapPositionsEndpoint } from 'bingx-api/bingx/endpoints/bingx-perpetual-swap-positions-endpoint';
export class AccountService {
constructor(private readonly requestExecutor: RequestExecutorInterface) {}
public getPerpetualSwapAccountAssetInformation(account: AccountInterface) {
return this.requestExecutor.execute(
new BingxGetPerpetualSwapAccountAssetEndpoint(account),
);
}
public getPerpetualSwapPositions(symbol: string, account: AccountInterface) {
return this.requestExecutor.execute(
new BingxPerpetualSwapPositionsEndpoint(symbol, account),
);
}
}