-
-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/exchange: add margin transfer request
- Loading branch information
1 parent
f77d03d
commit c73fc65
Showing
4 changed files
with
305 additions
and
19 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
26 changes: 26 additions & 0 deletions
26
pkg/exchange/binance/binanceapi/place_margin_order_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,26 @@ | ||
package binanceapi | ||
|
||
import ( | ||
"github.com/c9s/requestgen" | ||
) | ||
|
||
//go:generate requestgen -method POST -url "/sapi/v1/margin/borrow-repay" -type PlaceMarginOrderRequest -responseType .TransferResponse | ||
type PlaceMarginOrderRequest struct { | ||
client requestgen.AuthenticatedAPIClient | ||
|
||
asset string `param:"asset"` | ||
|
||
// TRUE for Isolated Margin, FALSE for Cross Margin, Default FALSE | ||
isIsolated bool `param:"isIsolated"` | ||
|
||
// Only for Isolated margin | ||
symbol *string `param:"symbol"` | ||
|
||
amount string `param:"amount"` | ||
|
||
BorrowRepayType BorrowRepayType `param:"type"` | ||
} | ||
|
||
func (c *RestClient) NewPlaceMarginOrderRequest() *PlaceMarginOrderRequest { | ||
return &PlaceMarginOrderRequest{client: c} | ||
} |
219 changes: 219 additions & 0 deletions
219
pkg/exchange/binance/binanceapi/place_margin_order_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