-
-
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 #1643 from c9s/fix/fix-binance-margin-order-query
FIX: [binance] implement query trade for binance margin trading
- Loading branch information
Showing
4 changed files
with
311 additions
and
10 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
pkg/exchange/binance/binanceapi/get_margin_trades_request.go
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,24 @@ | ||
package binanceapi | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/c9s/requestgen" | ||
) | ||
|
||
//go:generate requestgen -method GET -url "/sapi/v1/margin/myTrades" -type GetMarginTradesRequest -responseType []Trade | ||
type GetMarginTradesRequest struct { | ||
client requestgen.AuthenticatedAPIClient | ||
|
||
isIsolated bool `param:"isIsolated"` | ||
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) NewGetMarginTradesRequest() *GetMarginTradesRequest { | ||
return &GetMarginTradesRequest{client: c} | ||
} |
260 changes: 260 additions & 0 deletions
260
pkg/exchange/binance/binanceapi/get_margin_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 was deleted.
Oops, something went wrong.