Skip to content

Commit

Permalink
correct params on simple earn redeem flexible products
Browse files Browse the repository at this point in the history
  • Loading branch information
vidam committed Nov 17, 2024
1 parent 9cbd38b commit 05102f3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "binance",
"version": "2.13.14",
"version": "2.13.15",
"description": "Node.js & JavaScript SDK for Binance REST APIs & WebSockets, with TypeScript & end-to-end tests.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
5 changes: 2 additions & 3 deletions src/main-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ import {
GetBnsolRateHistoryReq,
PortfolioMarginProSpanAccountInfo,
PortfolioMarginProAccountBalance,
SimpleEarnRedeemFlexibleProductParams,
} from './types/spot';

import {
Expand Down Expand Up @@ -2894,9 +2895,7 @@ export class MainClient extends BaseRestClient {
return this.postPrivate(`sapi/v1/simple-earn/locked/subscribe`, params);
}

redeemFlexibleProduct(params: {
positionId: string;
}): Promise<SimpleEarnRedeemResponse> {
redeemFlexibleProduct(params: SimpleEarnRedeemFlexibleProductParams): Promise<SimpleEarnRedeemResponse> {
return this.postPrivate(`sapi/v1/simple-earn/flexible/redeem`, params);
}

Expand Down
8 changes: 8 additions & 0 deletions src/types/spot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4888,6 +4888,14 @@ export interface SimpleEarnSubscribeLockedProductResponse {
positionId: string;
success: boolean;
}

export interface SimpleEarnRedeemFlexibleProductParams {
productId: string;
redeemAll?: boolean;
amount?: number;
destAccount?: 'SPOT' | 'FUND' ;
}

export interface SimpleEarnRedeemResponse {
success: boolean;
redeemId: string;
Expand Down

0 comments on commit 05102f3

Please sign in to comment.