Merge pull request #325 from tiagosiebler/ordertypes
v3.9.7: feat(#324) add new account order v5 properties
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.9.6",
|
"version": "3.9.7",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "bybit-api",
|
"name": "bybit-api",
|
||||||
"version": "3.9.6",
|
"version": "3.9.7",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.6.6",
|
"axios": "^1.6.6",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bybit-api",
|
"name": "bybit-api",
|
||||||
"version": "3.9.6",
|
"version": "3.9.7",
|
||||||
"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",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
CategoryV5,
|
CategoryV5,
|
||||||
OrderCancelTypeV5,
|
OrderCancelTypeV5,
|
||||||
|
OrderCreateTypeV5,
|
||||||
OrderRejectReasonV5,
|
OrderRejectReasonV5,
|
||||||
OrderSideV5,
|
OrderSideV5,
|
||||||
OrderStatusV5,
|
OrderStatusV5,
|
||||||
@@ -24,9 +25,10 @@ export interface AccountOrderV5 {
|
|||||||
price: string;
|
price: string;
|
||||||
qty: string;
|
qty: string;
|
||||||
side: OrderSideV5;
|
side: OrderSideV5;
|
||||||
isLeverage: string;
|
isLeverage: '0' | '1';
|
||||||
positionIdx: PositionIdx;
|
positionIdx: PositionIdx;
|
||||||
orderStatus: OrderStatusV5;
|
orderStatus: OrderStatusV5;
|
||||||
|
createType: OrderCreateTypeV5;
|
||||||
cancelType: OrderCancelTypeV5;
|
cancelType: OrderCancelTypeV5;
|
||||||
rejectReason: OrderRejectReasonV5;
|
rejectReason: OrderRejectReasonV5;
|
||||||
avgPrice: string;
|
avgPrice: string;
|
||||||
@@ -39,15 +41,21 @@ export interface AccountOrderV5 {
|
|||||||
orderType: OrderTypeV5;
|
orderType: OrderTypeV5;
|
||||||
stopOrderType: StopOrderTypeV5;
|
stopOrderType: StopOrderTypeV5;
|
||||||
orderIv: string;
|
orderIv: string;
|
||||||
|
marketUnit: 'baseCoin' | 'quoteCoin';
|
||||||
triggerPrice: string;
|
triggerPrice: string;
|
||||||
takeProfit: string;
|
takeProfit: string;
|
||||||
stopLoss: string;
|
stopLoss: string;
|
||||||
tpslMode: 'Full' | 'Partial' | '';
|
tpslMode: 'Full' | 'Partial' | '';
|
||||||
|
ocoTriggerType:
|
||||||
|
| 'OcoTriggerByUnknown'
|
||||||
|
| 'OcoTriggerTp'
|
||||||
|
| 'OcoTriggerBySl'
|
||||||
|
| '';
|
||||||
tpLimitPrice: string;
|
tpLimitPrice: string;
|
||||||
slLimitPrice: string;
|
slLimitPrice: string;
|
||||||
tpTriggerBy: OrderTriggerByV5;
|
tpTriggerBy: OrderTriggerByV5;
|
||||||
slTriggerBy: OrderTriggerByV5;
|
slTriggerBy: OrderTriggerByV5;
|
||||||
triggerDirection: number;
|
triggerDirection: 1 | 2;
|
||||||
triggerBy: OrderTriggerByV5;
|
triggerBy: OrderTriggerByV5;
|
||||||
lastPriceOnCreated: string;
|
lastPriceOnCreated: string;
|
||||||
reduceOnly: boolean;
|
reduceOnly: boolean;
|
||||||
|
|||||||
@@ -40,6 +40,60 @@ export type OrderStatusV5 =
|
|||||||
| 'Deactivated'
|
| 'Deactivated'
|
||||||
| 'Active';
|
| 'Active';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines the types of order creation mechanisms.
|
||||||
|
*/
|
||||||
|
export type OrderCreateTypeV5 =
|
||||||
|
/** Represents an order created by a user. */
|
||||||
|
| 'CreateByUser'
|
||||||
|
/** Represents an order created by an admin closing. */
|
||||||
|
| 'CreateByAdminClosing'
|
||||||
|
/** Futures conditional order. */
|
||||||
|
| 'CreateByStopOrder'
|
||||||
|
/** Futures take profit order. */
|
||||||
|
| 'CreateByTakeProfit'
|
||||||
|
/** Futures partial take profit order. */
|
||||||
|
| 'CreateByPartialTakeProfit'
|
||||||
|
/** Futures stop loss order. */
|
||||||
|
| 'CreateByStopLoss'
|
||||||
|
/** Futures partial stop loss order. */
|
||||||
|
| 'CreateByPartialStopLoss'
|
||||||
|
/** Futures trailing stop order. */
|
||||||
|
| 'CreateByTrailingStop'
|
||||||
|
/** Laddered liquidation to reduce the required maintenance margin. */
|
||||||
|
| 'CreateByLiq'
|
||||||
|
/**
|
||||||
|
* If the position is still subject to liquidation (i.e., does not meet the required maintenance margin level),
|
||||||
|
* the position shall be taken over by the liquidation engine and closed at the bankruptcy price.
|
||||||
|
*/
|
||||||
|
| 'CreateByTakeOver_PassThrough'
|
||||||
|
/** Auto-Deleveraging(ADL) */
|
||||||
|
| 'CreateByAdl_PassThrough'
|
||||||
|
/** Order placed via Paradigm. */
|
||||||
|
| 'CreateByBlock_PassThrough'
|
||||||
|
/** Order created by move position. */
|
||||||
|
| 'CreateByBlockTradeMovePosition_PassThrough'
|
||||||
|
/** The close order placed via web or app position area - web/app. */
|
||||||
|
| 'CreateByClosing'
|
||||||
|
/** Order created via grid bot - web/app. */
|
||||||
|
| 'CreateByFGridBot'
|
||||||
|
/** Order closed via grid bot - web/app. */
|
||||||
|
| 'CloseByFGridBot'
|
||||||
|
/** Order created by TWAP - web/app. */
|
||||||
|
| 'CreateByTWAP'
|
||||||
|
/** Order created by TV webhook - web/app. */
|
||||||
|
| 'CreateByTVSignal'
|
||||||
|
/** Order created by Mm rate close function - web/app. */
|
||||||
|
| 'CreateByMmRateClose'
|
||||||
|
/** Order created by Martingale bot - web/app. */
|
||||||
|
| 'CreateByMartingaleBot'
|
||||||
|
/** Order closed by Martingale bot - web/app. */
|
||||||
|
| 'CloseByMartingaleBot'
|
||||||
|
/** Order created by Ice berg strategy - web/app. */
|
||||||
|
| 'CreateByIceBerg'
|
||||||
|
/** Order created by arbitrage - web/app. */
|
||||||
|
| 'CreateByArbitrage';
|
||||||
|
|
||||||
export type OrderCancelTypeV5 =
|
export type OrderCancelTypeV5 =
|
||||||
| 'CancelByUser'
|
| 'CancelByUser'
|
||||||
| 'CancelByReduceOnly'
|
| 'CancelByReduceOnly'
|
||||||
|
|||||||
Reference in New Issue
Block a user