We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to change leverage for Binance margin asset ?
I see that the setLeverage function is only available for futures :
setLeverage
// SetLeverage sets the account's initial leverage for the asset type and pair func (b *Binance) SetLeverage(ctx context.Context, item asset.Item, pair currency.Pair, _ margin.Type, amount float64, _ order.Side) error { switch item { case asset.USDTMarginedFutures: _, err := b.UChangeInitialLeverageRequest(ctx, pair, amount) return err case asset.CoinMarginedFutures: _, err := b.FuturesChangeInitialLeverage(ctx, pair, amount) return err default: return fmt.Errorf("%w %v", asset.ErrNotSupported, item) } }
And that submitting an order with a leverage different than 0 or 1 is not supported :
// SubmitOrder submits a new order func (b *Binance) SubmitOrder(ctx context.Context, s *order.Submit) (*order.SubmitResponse, error) { if err := s.Validate(); err != nil { return nil, err } var orderID string status := order.New var trades []order.TradeHistory if s.Leverage != 0 && s.Leverage != 1 { return nil, fmt.Errorf("%w received '%v'", order.ErrSubmitLeverageNotSupported, s.Leverage) } ... }
Then how to change the leverage for Binance margin ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
How to change leverage for Binance margin asset ?
I see that the
setLeverage
function is only available for futures :And that submitting an order with a leverage different than 0 or 1 is not supported :
Then how to change the leverage for Binance margin ?
The text was updated successfully, but these errors were encountered: