Skip to content

Commit

Permalink
Merge pull request #73 from singlesly/feat_cancel_order
Browse files Browse the repository at this point in the history
fix: add symbol prop to cancel order
  • Loading branch information
singlesly authored Feb 15, 2024
2 parents aecf37c + f523797 commit 67f232d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/bingx-client/services/trade.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ export class TradeService {
);
}

public async cancelOrder(orderId: string, account: AccountInterface) {
public async cancelOrder(
orderId: string,
symbol: string,
account: AccountInterface,
) {
return this.requestExecutor.execute(
new BingxCancelOrderEndpoint(account, orderId),
new BingxCancelOrderEndpoint(account, orderId, symbol),
);
}

Expand Down
2 changes: 2 additions & 0 deletions src/bingx/endpoints/bingx-cancel-order-endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export class BingxCancelOrderEndpoint<R = unknown>
constructor(
account: AccountInterface,
private readonly orderId: string,
private readonly symbol: string,
) {
super(account);
}
Expand All @@ -21,6 +22,7 @@ export class BingxCancelOrderEndpoint<R = unknown>
parameters(): SignatureParametersInterface {
return new DefaultSignatureParameters({
orderId: this.orderId,
symbol: this.symbol,
});
}
path(): string {
Expand Down

0 comments on commit 67f232d

Please sign in to comment.