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
Hi All,
First off, amazing work here! It's amazing what the open source community can come up with :)
I'm wondering if anyone figured out how to extend this API to add the option to adjust leverage on positions?
It would be awesome if someone already figured this out as I'm still learning the codebase and am having trouble adjusting this parameter.
For now, I am adding these functions to the gateways. I call them right before adding the request from send_order:
send_order
def change_leverage(self, symbol: str, leverage: int): """ Change leverage for a specific symbol. """ data = { "security": Security.SIGNED } params = { "symbol": symbol, "leverage": leverage } self.add_request( method="POST", path="/fapi/v1/leverage", callback=self.on_change_leverage, data=data, params=params ) def on_change_leverage(self, data, request): """ Callback for leverage change. """ self.gateway.write_log(request.params)
Unfortunately I see my orders are created without leverage. Does anyone have any ideas how to implement this?
The text was updated successfully, but these errors were encountered:
Some logs from my debugger:
Attempting to change leverage with params: {symbol: "NOTUSDT", leverage: 10}
these are the params I'm passing to add_request.
add_request
Sorry, something went wrong.
No branches or pull requests
Hi All,
First off, amazing work here! It's amazing what the open source community can come up with :)
I'm wondering if anyone figured out how to extend this API to add the option to adjust leverage on positions?
It would be awesome if someone already figured this out as I'm still learning the codebase and am having trouble adjusting this parameter.
For now, I am adding these functions to the gateways. I call them right before adding the request from
send_order
:Unfortunately I see my orders are created without leverage. Does anyone have any ideas how to implement this?
The text was updated successfully, but these errors were encountered: