chore(4.1.0): updated earn types to include V5 suffix
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": "4.0.2",
|
"version": "4.1.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "bybit-api",
|
"name": "bybit-api",
|
||||||
"version": "4.0.2",
|
"version": "4.1.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.7.9",
|
"axios": "^1.7.9",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bybit-api",
|
"name": "bybit-api",
|
||||||
"version": "4.0.2",
|
"version": "4.1.0",
|
||||||
"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",
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ import {
|
|||||||
DeliveryRecordV5,
|
DeliveryRecordV5,
|
||||||
DepositAddressChainV5,
|
DepositAddressChainV5,
|
||||||
DepositRecordV5,
|
DepositRecordV5,
|
||||||
EarnOrderHistory,
|
EarnOrderHistoryV5,
|
||||||
EarnPosition,
|
EarnPositionV5,
|
||||||
EarnProduct,
|
EarnProductV5,
|
||||||
ExchangeBrokerAccountInfoV5,
|
ExchangeBrokerAccountInfoV5,
|
||||||
ExchangeBrokerEarningResultV5,
|
ExchangeBrokerEarningResultV5,
|
||||||
ExchangeBrokerSubAccountDepositRecordV5,
|
ExchangeBrokerSubAccountDepositRecordV5,
|
||||||
@@ -86,8 +86,8 @@ import {
|
|||||||
GetDeliveryPriceParamsV5,
|
GetDeliveryPriceParamsV5,
|
||||||
GetDeliveryRecordParamsV5,
|
GetDeliveryRecordParamsV5,
|
||||||
GetDepositRecordParamsV5,
|
GetDepositRecordParamsV5,
|
||||||
GetEarnOrderHistoryParams,
|
GetEarnOrderHistoryParamsV5,
|
||||||
GetEarnPositionParams,
|
GetEarnPositionParamsV5,
|
||||||
GetExchangeBrokerEarningsParamsV5,
|
GetExchangeBrokerEarningsParamsV5,
|
||||||
GetExecutionListParamsV5,
|
GetExecutionListParamsV5,
|
||||||
GetFeeRateParamsV5,
|
GetFeeRateParamsV5,
|
||||||
@@ -197,7 +197,7 @@ import {
|
|||||||
SpotLeveragedTokenOrderHistoryV5,
|
SpotLeveragedTokenOrderHistoryV5,
|
||||||
SpotMarginStateV5,
|
SpotMarginStateV5,
|
||||||
SubMemberV5,
|
SubMemberV5,
|
||||||
SubmitStakeRedeemParams,
|
SubmitStakeRedeemParamsV5,
|
||||||
SwitchIsolatedMarginParamsV5,
|
SwitchIsolatedMarginParamsV5,
|
||||||
SwitchPositionModeParamsV5,
|
SwitchPositionModeParamsV5,
|
||||||
TPSLModeV5,
|
TPSLModeV5,
|
||||||
@@ -2587,7 +2587,7 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
*/
|
*/
|
||||||
getEarnProduct(params: { category: string; coin?: string }): Promise<
|
getEarnProduct(params: { category: string; coin?: string }): Promise<
|
||||||
APIResponseV3WithTime<{
|
APIResponseV3WithTime<{
|
||||||
list: EarnProduct[];
|
list: EarnProductV5[];
|
||||||
}>
|
}>
|
||||||
> {
|
> {
|
||||||
return this.get('/v5/earn/product', params);
|
return this.get('/v5/earn/product', params);
|
||||||
@@ -2603,7 +2603,7 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
* within 48 hours. Once the redemption request is initiated, it cannot be canceled,
|
* within 48 hours. Once the redemption request is initiated, it cannot be canceled,
|
||||||
* and your principal will continue to earn interest until the process is completed.
|
* and your principal will continue to earn interest until the process is completed.
|
||||||
*/
|
*/
|
||||||
submitStakeRedeem(params: SubmitStakeRedeemParams): Promise<
|
submitStakeRedeem(params: SubmitStakeRedeemParamsV5): Promise<
|
||||||
APIResponseV3WithTime<{
|
APIResponseV3WithTime<{
|
||||||
orderId: string;
|
orderId: string;
|
||||||
orderLinkId: string;
|
orderLinkId: string;
|
||||||
@@ -2620,9 +2620,9 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
* Note: Either orderId or orderLinkId is required. If both are passed,
|
* Note: Either orderId or orderLinkId is required. If both are passed,
|
||||||
* make sure they're matched, otherwise returning empty result
|
* make sure they're matched, otherwise returning empty result
|
||||||
*/
|
*/
|
||||||
getEarnOrderHistory(params: GetEarnOrderHistoryParams): Promise<
|
getEarnOrderHistory(params: GetEarnOrderHistoryParamsV5): Promise<
|
||||||
APIResponseV3WithTime<{
|
APIResponseV3WithTime<{
|
||||||
list: EarnOrderHistory[];
|
list: EarnOrderHistoryV5[];
|
||||||
}>
|
}>
|
||||||
> {
|
> {
|
||||||
return this.getPrivate('/v5/earn/order', params);
|
return this.getPrivate('/v5/earn/order', params);
|
||||||
@@ -2635,9 +2635,9 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
*
|
*
|
||||||
* Note: Fully redeemed position is also returned in the response
|
* Note: Fully redeemed position is also returned in the response
|
||||||
*/
|
*/
|
||||||
getEarnPosition(params: GetEarnPositionParams): Promise<
|
getEarnPosition(params: GetEarnPositionParamsV5): Promise<
|
||||||
APIResponseV3WithTime<{
|
APIResponseV3WithTime<{
|
||||||
list: EarnPosition[];
|
list: EarnPositionV5[];
|
||||||
}>
|
}>
|
||||||
> {
|
> {
|
||||||
return this.getPrivate('/v5/earn/position', params);
|
return this.getPrivate('/v5/earn/position', params);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export interface SubmitStakeRedeemParams {
|
export interface SubmitStakeRedeemParamsV5 {
|
||||||
category: string;
|
category: string;
|
||||||
orderType: 'Stake' | 'Redeem';
|
orderType: 'Stake' | 'Redeem';
|
||||||
accountType: 'FUND' | 'UNIFIED';
|
accountType: 'FUND' | 'UNIFIED';
|
||||||
@@ -8,13 +8,13 @@ export interface SubmitStakeRedeemParams {
|
|||||||
orderLinkId: string;
|
orderLinkId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GetEarnOrderHistoryParams {
|
export interface GetEarnOrderHistoryParamsV5 {
|
||||||
category: string;
|
category: string;
|
||||||
orderId?: string;
|
orderId?: string;
|
||||||
orderLinkId?: string;
|
orderLinkId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GetEarnPositionParams {
|
export interface GetEarnPositionParamsV5 {
|
||||||
category: string;
|
category: string;
|
||||||
productId?: string;
|
productId?: string;
|
||||||
coin?: string;
|
coin?: string;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export interface EarnProduct {
|
export interface EarnProductV5 {
|
||||||
category: string;
|
category: string;
|
||||||
estimateApr: string;
|
estimateApr: string;
|
||||||
coin: string;
|
coin: string;
|
||||||
@@ -9,7 +9,7 @@ export interface EarnProduct {
|
|||||||
status: 'Available' | 'NotAvailable';
|
status: 'Available' | 'NotAvailable';
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EarnOrderHistory {
|
export interface EarnOrderHistoryV5 {
|
||||||
coin: string;
|
coin: string;
|
||||||
orderValue: string;
|
orderValue: string;
|
||||||
orderType: 'Redeem' | 'Stake';
|
orderType: 'Redeem' | 'Stake';
|
||||||
@@ -21,7 +21,7 @@ export interface EarnOrderHistory {
|
|||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EarnPosition {
|
export interface EarnPositionV5 {
|
||||||
coin: string;
|
coin: string;
|
||||||
productId: string;
|
productId: string;
|
||||||
amount: string;
|
amount: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user