-
Notifications
You must be signed in to change notification settings - Fork 517
More typings #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More typings #55
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,10 @@ declare module 'binance-api-node' { | |
| prices(): Promise<{ [index: string]: string }>; | ||
| time(): Promise<number>; | ||
| ws: WebSocket; | ||
| myTrades(options: { symbol: string, limit?: number, fromId?: number }): Promise<MyTrade[]>; | ||
| getOrder(options: { symbol: string; orderId: number }): Promise<QueryOrderResult>; | ||
| cancelOrder(options: { symbol: string; orderId: number }): Promise<CancelOrderResult>; | ||
| openOrders(options: { symbol: string }): Promise<QueryOrderResult[]>; | ||
| } | ||
|
|
||
| export interface WebSocket { | ||
|
|
@@ -339,4 +343,41 @@ declare module 'binance-api-node' { | |
| isOrderWorking: boolean; | ||
| isBuyerMaker: boolean; | ||
| } | ||
|
|
||
| interface MyTrade { | ||
| id: number; | ||
| orderId: number; | ||
| price: string; | ||
| qty: string; | ||
| commission: string; | ||
| commissionAsset: string; | ||
| time: number; | ||
| isBuyer: boolean; | ||
| isMaker: boolean; | ||
| isBestMatch: boolean; | ||
| } | ||
|
|
||
| interface QueryOrderResult { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. Order uses |
||
| symbol: string; | ||
| orderId: number; | ||
| clientOrderId: string; | ||
| price: string; | ||
| origQty: string; | ||
| executedQty: string; | ||
| status: OrderStatus; | ||
| timeInForce: string; | ||
| type: string; | ||
| side: string; | ||
| stopPrice: string; | ||
| icebergQty: string; | ||
| time: number; | ||
| isWorking: boolean; | ||
| } | ||
|
|
||
| interface CancelOrderResult { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is that a The Java API also names it
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it is a |
||
| symbol: string; | ||
| origClientOrderId: string; | ||
| orderId: number; | ||
| clientOrderId: string; | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename it to
Tradeto match the naming schema of: https://github.com/binance-exchange/binance-java-api/blob/master/src/main/java/com/binance/api/client/domain/account/Trade.javaThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name
Tradeis already used for websocket trade events.