-
-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1024 from c9s/fix/binance-my-trades-api
fix: binance my trades api
- Loading branch information
Showing
7 changed files
with
289 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package binanceapi | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/c9s/requestgen" | ||
|
||
"github.com/adshao/go-binance/v2" | ||
) | ||
|
||
type Trade = binance.TradeV3 | ||
|
||
//go:generate requestgen -method GET -url "/api/v3/myTrades" -type GetMyTradesRequest -responseType []Trade | ||
type GetMyTradesRequest struct { | ||
client requestgen.AuthenticatedAPIClient | ||
|
||
symbol string `param:"symbol"` | ||
orderID *uint64 `param:"orderId"` | ||
startTime *time.Time `param:"startTime,milliseconds"` | ||
endTime *time.Time `param:"endTime,milliseconds"` | ||
fromID *uint64 `param:"fromId"` | ||
limit *uint64 `param:"limit"` | ||
} | ||
|
||
func (c *RestClient) NewGetMyTradesRequest() *GetMyTradesRequest { | ||
return &GetMyTradesRequest{client: c} | ||
} |
218 changes: 218 additions & 0 deletions
218
pkg/exchange/binance/binanceapi/get_my_trades_request_requestgen.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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