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