Skip to content
New issue

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

gateio perpetual contract setleverage #1704

Open
dazi005 opened this issue Nov 7, 2024 · 1 comment
Open

gateio perpetual contract setleverage #1704

dazi005 opened this issue Nov 7, 2024 · 1 comment
Assignees
Labels

Comments

@dazi005
Copy link

dazi005 commented Nov 7, 2024

New Issue

I tested the perpetual contract of gateio, and the setleverage method was not implemented

@shazbert
Copy link
Collaborator

shazbert commented Nov 7, 2024

In the meantime you can hook directly into package level method if needed.

example:

e, ok := exch.(*gateio.Gateio)
if !ok {
    panic("sad")
}

pair := currency.NewPair(currency.BTC, currency.USDT)
pair.Delimiter = "_" // Required formatting

leverage := 100 // lfg
settlement := currency.USDT.Lower().String()

_, err := e.UpdateFuturesPositionLeverage(context.Background(), settlement, pair, leverage, 0 /*this bad boy here is cross leverage limit*/)
if err != nil {
	panic(err.Error())
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: To Do
Development

No branches or pull requests

3 participants