fix(client): update return type for futuresCancelMultipleOrders and f…#943
Merged
carlosmiei merged 1 commit intomasterfrom May 26, 2025
Merged
fix(client): update return type for futuresCancelMultipleOrders and f…#943carlosmiei merged 1 commit intomasterfrom
carlosmiei merged 1 commit intomasterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the return types for the futuresCancelMultipleOrders and futuresCancelAll functions to better reflect the Binance API responses.
- Added a new Response interface in src/types.ts.
- Updated the return type for futuresCancelMultipleOrders to a union of FuturesOrder and Response.
- Changed the return type for futuresCancelAll to Response.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/types.ts | Added a generic Response interface for API responses. |
| src/node-binance-api.ts | Updated return types for futures cancel functions. |
Comments suppressed due to low confidence (3)
src/types.ts:47
- [nitpick] The name 'Response' is very generic and may conflict with built-in types or other usage. Consider renaming it to a more descriptive name like 'ApiResponse' to enhance clarity and avoid ambiguity.
export interface Response {
src/node-binance-api.ts:4346
- Ensure that the union type (FuturesOrder|Response) accurately reflects all possible outcomes of this API call. If error responses follow the Response structure, consider updating the associated documentation to clarify these conditions.
async futuresCancelMultipleOrders(symbol: string, params: Dict = {}): Promise<(FuturesOrder|Response)[]> {
src/node-binance-api.ts:4382
- Double-check that the Response type sufficiently captures the expected outcomes for canceling all orders. If the underlying API returns detailed order cancellation information, a more specific type might be warranted.
async futuresCancelAll(symbol: string, params: Dict = {}): Promise<Response> {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…uturesCancelAll