Skip to content

Commit ae1c561

Browse files
committed
chore(): added comments for new headers
1 parent a6429a9 commit ae1c561

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

src/RestClient.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,8 @@ export class RestClient extends BaseRestClient {
12481248
* - At most 4 currency pairs, maximum 10 orders each, are allowed in one request
12491249
* - No mixture of spot orders and margin orders, i.e. account must be identical for all orders
12501250
*
1251+
* NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.
1252+
*
12511253
* @param params Parameters for creating a batch of orders
12521254
* @returns Promise<SubmitSpotBatchOrdersResp[]>
12531255
*/
@@ -1302,6 +1304,8 @@ export class RestClient extends BaseRestClient {
13021304
*
13031305
* You can place orders with spot, portfolio, margin or cross margin account through setting the account field. It defaults to spot, which means spot account is used to place orders. If the user is using unified account, it defaults to the unified account.
13041306
*
1307+
* NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.
1308+
*
13051309
* @param params Parameters for creating an order
13061310
* @returns Promise<Order>
13071311
*/
@@ -1332,6 +1336,8 @@ export class RestClient extends BaseRestClient {
13321336
* If account is not set, all open orders, including spot, portfolio, margin and cross margin ones, will be cancelled.
13331337
* You can set account to cancel only orders within the specified account.
13341338
*
1339+
* NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.
1340+
*
13351341
* @param params Parameters for cancelling all open orders in specified currency pair
13361342
* @returns Promise<Order[]>
13371343
*/
@@ -1358,6 +1364,8 @@ export class RestClient extends BaseRestClient {
13581364
*
13591365
* Multiple currency pairs can be specified, but maximum 20 orders are allowed per request.
13601366
*
1367+
* NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.
1368+
*
13611369
* @param params Parameters for cancelling a batch of orders
13621370
* @returns Promise<DeleteSpotBatchOrdersResp[]>
13631371
*/
@@ -1395,6 +1403,8 @@ export class RestClient extends BaseRestClient {
13951403
*
13961404
* Currently, only supports modification of price or amount fields.
13971405
*
1406+
* NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.
1407+
*
13981408
* @param params Parameters for amending an order
13991409
* @returns Promise<Order>
14001410
*/
@@ -1421,6 +1431,8 @@ export class RestClient extends BaseRestClient {
14211431
*
14221432
* Spot, portfolio and margin orders are cancelled by default. If trying to cancel cross margin orders or portfolio margin account are used, account must be set to cross_margin.
14231433
*
1434+
* NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.
1435+
*
14241436
* @param params Parameters for cancelling a single order
14251437
* @returns Promise<Order>
14261438
*/
@@ -1489,6 +1501,8 @@ export class RestClient extends BaseRestClient {
14891501
*
14901502
* Default modification of orders for spot, portfolio, and margin accounts. To modify orders for a cross margin account, the account parameter must be specified as cross_margin. For portfolio margin accounts, the account parameter can only be specified as cross_margin. Currently, only modifications to price or quantity (choose one) are supported.
14911503
*
1504+
* NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.
1505+
*
14921506
* @param params Parameters for batch modification of orders
14931507
* @returns Promise<Order[]>
14941508
*/
@@ -2403,6 +2417,8 @@ export class RestClient extends BaseRestClient {
24032417
* In dual position mode, to close one side position, you need to set auto_size side, reduce_only to true, and size to 0.
24042418
* Set stp_act to decide the strategy of self-trade prevention. For detailed usage, refer to the stp_act parameter in the request body.
24052419
*
2420+
* NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.
2421+
*
24062422
* @param params Parameters for creating a futures order
24072423
* @returns Promise<FuturesOrder>
24082424
*/
@@ -2437,6 +2453,8 @@ export class RestClient extends BaseRestClient {
24372453
*
24382454
* Zero-filled order cannot be retrieved 10 minutes after order cancellation.
24392455
*
2456+
* NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.
2457+
*
24402458
* @param params Parameters for cancelling all open orders matched
24412459
* @returns Promise<FuturesOrder[]>
24422460
*/
@@ -2478,6 +2496,8 @@ export class RestClient extends BaseRestClient {
24782496
* If the execution is successful, the normal order content is included; if the execution fails, the label field is included to indicate the cause of the error.
24792497
* In the rate limiting, each order is counted individually.
24802498
*
2499+
* NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.
2500+
*
24812501
* @param params Parameters for creating a batch of futures orders
24822502
* @returns Promise<FuturesOrder[]>
24832503
*/
@@ -2518,6 +2538,8 @@ export class RestClient extends BaseRestClient {
25182538
/**
25192539
* Cancel a single order
25202540
*
2541+
* NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.
2542+
*
25212543
* @param params Parameters for cancelling a single order
25222544
* @returns Promise<FuturesOrder>
25232545
*/
@@ -2539,6 +2561,8 @@ export class RestClient extends BaseRestClient {
25392561
/**
25402562
* Amend an order
25412563
*
2564+
* NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.
2565+
*
25422566
* @param params Parameters for amending an order
25432567
* @returns Promise<FuturesOrder>
25442568
*/
@@ -2664,6 +2688,8 @@ export class RestClient extends BaseRestClient {
26642688
*
26652689
* Multiple distinct order ID list can be specified. Each request can cancel a maximum of 20 records.
26662690
*
2691+
* NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.
2692+
*
26672693
* @param params Parameters for cancelling a batch of orders with an ID list
26682694
* @returns Promise<DeleteFuturesBatchOrdersResp[]>
26692695
*/
@@ -2688,6 +2714,8 @@ export class RestClient extends BaseRestClient {
26882714
*
26892715
* You can specify multiple different order IDs. You can only modify up to 10 orders in one request.
26902716
*
2717+
* NOTE: The "xGateExptime" parameter will translate to the "x-gate-exptime" header.
2718+
*
26912719
* @param params Array of BatchAmendOrderReq objects
26922720
* @param settle Settlement currency (e.g., 'btc', 'usdt', 'usd')
26932721
* @returns Promise<BatchAmendOrderResp[]>

src/types/response/futures.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,3 +445,34 @@ export interface BatchAmendOrderResp {
445445
stp_act: 'co' | 'cn' | 'cb' | '-';
446446
stp_id: number;
447447
}
448+
449+
/**
450+
* @deprecated - Use FuturesAccount instead
451+
*/
452+
export interface UpdateFuturesDualModeResp {
453+
total: string;
454+
unrealised_pnl: string;
455+
position_margin: string;
456+
order_margin: string;
457+
available: string;
458+
point: string;
459+
currency: string;
460+
in_dual_mode: boolean;
461+
enable_credit: boolean;
462+
position_initial_margin: string;
463+
maintenance_margin: string;
464+
bonus: string;
465+
enable_evolved_classic: boolean;
466+
history: {
467+
dnw: string;
468+
pnl: string;
469+
fee: string;
470+
refr: string;
471+
fund: string;
472+
point_dnw: string;
473+
point_fee: string;
474+
point_refr: string;
475+
bonus_dnw: string;
476+
bonus_offset: string;
477+
};
478+
}

0 commit comments

Comments
 (0)