Merge pull request #295 from tiagosiebler/batchTypes
v3.7.6: feat() update batch order types & categories
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "bybit-api",
|
"name": "bybit-api",
|
||||||
"version": "3.7.4",
|
"version": "3.7.6",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "bybit-api",
|
"name": "bybit-api",
|
||||||
"version": "3.7.4",
|
"version": "3.7.6",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.21.0",
|
"axios": "^0.21.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bybit-api",
|
"name": "bybit-api",
|
||||||
"version": "3.7.5",
|
"version": "3.7.6",
|
||||||
"description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
|
"description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"types": "lib/index.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
|
|||||||
@@ -432,7 +432,8 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint allows you to place more than one order in a single request. Covers: option (unified account).
|
* This endpoint allows you to place more than one order in a single request.
|
||||||
|
* Covers: Option (UTA, UTA Pro) / USDT Perpetual, UDSC Perpetual, USDC Futures (UTA Pro)
|
||||||
*
|
*
|
||||||
* Make sure you have sufficient funds in your account when placing an order.
|
* Make sure you have sufficient funds in your account when placing an order.
|
||||||
* Once an order is placed, according to the funds required by the order,
|
* Once an order is placed, according to the funds required by the order,
|
||||||
@@ -443,7 +444,7 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
* The structure of the two lists are completely consistent.
|
* The structure of the two lists are completely consistent.
|
||||||
*/
|
*/
|
||||||
batchSubmitOrders(
|
batchSubmitOrders(
|
||||||
category: 'option',
|
category: 'option' | 'linear',
|
||||||
orders: BatchOrderParamsV5[],
|
orders: BatchOrderParamsV5[],
|
||||||
): Promise<
|
): Promise<
|
||||||
APIResponseV3WithTime<BatchOrdersResponseV5<BatchCreateOrderResultV5[]>>
|
APIResponseV3WithTime<BatchOrdersResponseV5<BatchCreateOrderResultV5[]>>
|
||||||
@@ -455,14 +456,15 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint allows you to amend more than one open order in a single request. Covers: option (unified account).
|
* This endpoint allows you to amend more than one open order in a single request.
|
||||||
|
* Covers: Option (UTA, UTA Pro) / USDT Perpetual, UDSC Perpetual, USDC Futures (UTA Pro)
|
||||||
*
|
*
|
||||||
* You can modify unfilled or partially filled orders. Conditional orders are not supported.
|
* You can modify unfilled or partially filled orders. Conditional orders are not supported.
|
||||||
*
|
*
|
||||||
* A maximum of 20 orders can be amended per request.
|
* A maximum of 20 orders can be amended per request.
|
||||||
*/
|
*/
|
||||||
batchAmendOrders(
|
batchAmendOrders(
|
||||||
category: 'option',
|
category: 'option' | 'linear',
|
||||||
orders: BatchAmendOrderParamsV5[],
|
orders: BatchAmendOrderParamsV5[],
|
||||||
): Promise<
|
): Promise<
|
||||||
APIResponseV3WithTime<BatchOrdersResponseV5<BatchAmendOrderResultV5[]>>
|
APIResponseV3WithTime<BatchOrdersResponseV5<BatchAmendOrderResultV5[]>>
|
||||||
@@ -474,14 +476,15 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint allows you to cancel more than one open order in a single request. Covers: option (unified account).
|
* This endpoint allows you to cancel more than one open order in a single request.
|
||||||
|
* Covers: Option (UTA, UTA Pro) / USDT Perpetual, UDSC Perpetual, USDC Futures (UTA Pro)
|
||||||
*
|
*
|
||||||
* You must specify orderId or orderLinkId. If orderId and orderLinkId is not matched, the system will process orderId first.
|
* You must specify orderId or orderLinkId. If orderId and orderLinkId is not matched, the system will process orderId first.
|
||||||
*
|
*
|
||||||
* You can cancel unfilled or partially filled orders. A maximum of 20 orders can be cancelled per request.
|
* You can cancel unfilled or partially filled orders. A maximum of 20 orders can be cancelled per request.
|
||||||
*/
|
*/
|
||||||
batchCancelOrders(
|
batchCancelOrders(
|
||||||
category: 'option',
|
category: 'option' | 'linear',
|
||||||
orders: BatchCancelOrderParamsV5[],
|
orders: BatchCancelOrderParamsV5[],
|
||||||
): Promise<
|
): Promise<
|
||||||
APIResponseV3WithTime<BatchOrdersResponseV5<BatchCancelOrderResultV5[]>>
|
APIResponseV3WithTime<BatchOrdersResponseV5<BatchCancelOrderResultV5[]>>
|
||||||
|
|||||||
@@ -109,21 +109,43 @@ export interface BatchOrderParamsV5 {
|
|||||||
orderType: OrderTypeV5;
|
orderType: OrderTypeV5;
|
||||||
qty: string;
|
qty: string;
|
||||||
price?: string;
|
price?: string;
|
||||||
|
triggerDirection?: 1 | 2;
|
||||||
|
triggerBy?: OrderTriggerByV5;
|
||||||
orderIv?: string;
|
orderIv?: string;
|
||||||
timeInForce?: OrderTimeInForceV5;
|
timeInForce?: OrderTimeInForceV5;
|
||||||
orderLinkId: string;
|
positionIdx?: PositionIdx;
|
||||||
|
orderLinkId?: string;
|
||||||
|
takeProfit?: string;
|
||||||
|
stopLoss?: string;
|
||||||
|
tpTriggerBy?: OrderTriggerByV5;
|
||||||
|
slTriggerBy?: OrderTriggerByV5;
|
||||||
reduceOnly?: boolean;
|
reduceOnly?: boolean;
|
||||||
mmp?: boolean;
|
closeOnTrigger?: boolean;
|
||||||
smpType?: OrderSMPTypeV5;
|
smpType?: OrderSMPTypeV5;
|
||||||
|
mmp?: boolean;
|
||||||
|
tpslMode?: 'Full' | 'Partial';
|
||||||
|
tpLimitPrice?: string;
|
||||||
|
slLimitPrice?: string;
|
||||||
|
tpOrderType?: OrderTypeV5;
|
||||||
|
slOrderType?: OrderTypeV5;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BatchAmendOrderParamsV5 {
|
export interface BatchAmendOrderParamsV5 {
|
||||||
symbol: string;
|
symbol: string;
|
||||||
orderId?: string;
|
orderId?: string;
|
||||||
orderLinkId?: string;
|
orderLinkId?: string;
|
||||||
|
orderIv?: string;
|
||||||
|
triggerPrice?: string;
|
||||||
qty?: string;
|
qty?: string;
|
||||||
price?: string;
|
price?: string;
|
||||||
orderIv?: string;
|
tpslMode?: 'Full' | 'Partial';
|
||||||
|
takeProfit?: string;
|
||||||
|
stopLoss?: string;
|
||||||
|
tpTriggerBy?: OrderTriggerByV5;
|
||||||
|
slTriggerBy?: OrderTriggerByV5;
|
||||||
|
triggerBy?: OrderTriggerByV5;
|
||||||
|
tpLimitPrice?: string;
|
||||||
|
slLimitPrice?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BatchCancelOrderParamsV5 {
|
export interface BatchCancelOrderParamsV5 {
|
||||||
|
|||||||
Reference in New Issue
Block a user