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

26 lines
818 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"
)
type FuturesChangeInitialLeverageResponse struct {
Leverage int `json:"leverage"`
MaxNotionalValue fixedpoint.Value `json:"maxNotionalValue"`
Symbol string `json:"symbol"`
}
//go:generate requestgen -method POST -url "/fapi/v1/leverage" -type FuturesChangeInitialLeverageRequest -responseType FuturesChangeInitialLeverageResponse
type FuturesChangeInitialLeverageRequest struct {
client requestgen.AuthenticatedAPIClient
symbol string `param:"symbol"`
leverage int `param:"leverage"`
}
func (c *FuturesRestClient) NewFuturesChangeInitialLeverageRequest() *FuturesChangeInitialLeverageRequest {
return &FuturesChangeInitialLeverageRequest{client: c}
}