qbtrade/pkg/exchange/binance/binanceapi/place_margin_order_request.go

29 lines
746 B
Go
Raw Normal View History

2024-06-27 14:42:38 +00:00
package binanceapi
import (
"github.com/c9s/requestgen"
"git.qtrade.icu/lychiyu/qbtrade/pkg/fixedpoint"
)
//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 fixedpoint.Value `param:"amount"`
BorrowRepayType BorrowRepayType `param:"type"`
}
func (c *RestClient) NewPlaceMarginOrderRequest() *PlaceMarginOrderRequest {
return &PlaceMarginOrderRequest{client: c}
}