bybit-api
Advanced tools
Comparing version 2.1.9 to 2.1.10
@@ -1,8 +0,10 @@ | ||
export * from './inverse-client'; | ||
export * from './inverse-futures-client'; | ||
export * from './linear-client'; | ||
export * from './spot-client'; | ||
export * from './websocket-client'; | ||
export * from './logger'; | ||
export * from './types/shared'; | ||
export * from './types/spot'; | ||
export * from "./inverse-client"; | ||
export * from "./inverse-futures-client"; | ||
export * from "./linear-client"; | ||
export * from "./spot-client"; | ||
export * from "./websocket-client"; | ||
export * from "./logger"; | ||
export * from "./types/shared"; | ||
export * from "./types/spot"; | ||
export * from "./util/WsStore"; | ||
export * from "./constants/enum"; |
@@ -21,2 +21,4 @@ "use strict"; | ||
__exportStar(require("./types/spot"), exports); | ||
__exportStar(require("./util/WsStore"), exports); | ||
__exportStar(require("./constants/enum"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -5,3 +5,4 @@ import { AxiosRequestConfig } from 'axios'; | ||
import SharedEndpoints from './shared-endpoints'; | ||
import { SymbolIntervalFromLimitParam, SymbolLimitParam, SymbolParam } from '.'; | ||
import { SymbolIntervalFromLimitParam, SymbolLimitParam, SymbolParam } from './types/shared'; | ||
import { linearPositionModeEnum, positionTpSlModeEnum } from './constants/enum'; | ||
export declare class LinearClient extends SharedEndpoints { | ||
@@ -83,4 +84,4 @@ protected requestWrapper: RequestWrapper; | ||
/** | ||
* Conditional orders | ||
*/ | ||
* Conditional orders | ||
*/ | ||
placeConditionalOrder(params: { | ||
@@ -151,6 +152,22 @@ side: string; | ||
}): GenericAPIResponse; | ||
/** | ||
* Switch between one-way vs hedge mode. Use `linearPositionModeEnum` for the mode parameter. | ||
*/ | ||
setPositionMode(params: { | ||
symbol: string; | ||
mode: typeof linearPositionModeEnum[keyof typeof linearPositionModeEnum]; | ||
}): GenericAPIResponse; | ||
/** @deprecated use setPositionTpSlMode() instead */ | ||
setSwitchMode(params?: { | ||
symbol: string; | ||
tp_sl_mode: string; | ||
tp_sl_mode: typeof positionTpSlModeEnum[keyof typeof positionTpSlModeEnum]; | ||
}): GenericAPIResponse; | ||
/** | ||
* Switch TP/SL mode between full or partial. When set to Partial, TP/SL orders may have a quantity less than the position size. | ||
* This is set with the setTradingStop() method. Use `positionTpSlModeEnum` for the tp_sl_mode parameter. | ||
*/ | ||
setPositionTpSlMode(params: { | ||
symbol: string; | ||
tp_sl_mode: typeof positionTpSlModeEnum[keyof typeof positionTpSlModeEnum]; | ||
}): GenericAPIResponse; | ||
setAddReduceMargin(params?: { | ||
@@ -194,4 +211,4 @@ symbol: string; | ||
/** | ||
* Risk Limit | ||
*/ | ||
* Risk Limit | ||
*/ | ||
getRiskLimitList(params: SymbolParam): GenericAPIResponse; | ||
@@ -204,6 +221,6 @@ setRiskLimit(params: { | ||
/** | ||
* Funding | ||
*/ | ||
* Funding | ||
*/ | ||
getPredictedFundingFee(params: SymbolParam): GenericAPIResponse; | ||
getLastFundingFee(params: SymbolParam): GenericAPIResponse; | ||
} |
@@ -72,4 +72,4 @@ "use strict"; | ||
/** | ||
* Conditional orders | ||
*/ | ||
* Conditional orders | ||
*/ | ||
placeConditionalOrder(params) { | ||
@@ -105,5 +105,19 @@ return this.requestWrapper.post('private/linear/stop-order/create', params); | ||
} | ||
/** | ||
* Switch between one-way vs hedge mode. Use `linearPositionModeEnum` for the mode parameter. | ||
*/ | ||
setPositionMode(params) { | ||
return this.requestWrapper.post('private/linear/position/switch-mode', params); | ||
} | ||
/** @deprecated use setPositionTpSlMode() instead */ | ||
setSwitchMode(params) { | ||
return this.requestWrapper.post('private/linear/tpsl/switch-mode', params); | ||
} | ||
/** | ||
* Switch TP/SL mode between full or partial. When set to Partial, TP/SL orders may have a quantity less than the position size. | ||
* This is set with the setTradingStop() method. Use `positionTpSlModeEnum` for the tp_sl_mode parameter. | ||
*/ | ||
setPositionTpSlMode(params) { | ||
return this.requestWrapper.post('private/linear/tpsl/switch-mode', params); | ||
} | ||
setAddReduceMargin(params) { | ||
@@ -125,4 +139,4 @@ return this.requestWrapper.post('private/linear/position/add-margin', params); | ||
/** | ||
* Risk Limit | ||
*/ | ||
* Risk Limit | ||
*/ | ||
getRiskLimitList(params) { | ||
@@ -135,4 +149,4 @@ return this.requestWrapper.get('public/linear/risk-limit', params); | ||
/** | ||
* Funding | ||
*/ | ||
* Funding | ||
*/ | ||
getPredictedFundingFee(params) { | ||
@@ -139,0 +153,0 @@ return this.requestWrapper.get('private/linear/funding/predicted-funding', params); |
{ | ||
"name": "bybit-api", | ||
"version": "2.1.9", | ||
"version": "2.1.10", | ||
"description": "Node.js connector for Bybit's REST APIs and WebSockets, with TypeScript & integration tests.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172258
55
2960