forked from singlesly/bingx-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbingx-cancel-all-orders-endpoint.ts
More file actions
38 lines (32 loc) · 1.03 KB
/
Copy pathbingx-cancel-all-orders-endpoint.ts
File metadata and controls
38 lines (32 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
27
28
29
30
31
32
33
34
35
36
37
38
import { Endpoint } from 'bingx-api/bingx/endpoints/endpoint';
import { EndpointInterface } from 'bingx-api/bingx/endpoints/endpoint.interface';
import { SignatureParametersInterface } from 'bingx-api/bingx/account/signature-parameters.interface';
import { DefaultSignatureParameters } from 'bingx-api/bingx/account/default-signature-parameters';
import { AccountInterface } from 'bingx-api/bingx/account/account.interface';
export interface CancelAllOrdersData {
success: unknown[];
failed: unknown[];
}
export class BingxCancelAllOrdersEndpoint<R = CancelAllOrdersData>
extends Endpoint
implements EndpointInterface<R>
{
constructor(
private readonly symbol: string,
account: AccountInterface,
) {
super(account);
}
method(): 'get' | 'post' | 'put' | 'patch' | 'delete' {
return 'delete';
}
parameters(): SignatureParametersInterface {
return new DefaultSignatureParameters({
symbol: this.symbol,
});
}
path(): string {
return '/openApi/swap/v2/trade/allOpenOrders';
}
readonly t!: R;
}