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

Perpetual connectors - Getting order failed or error when using leverage beyond exchange limit #6954

Open
rapcmia opened this issue Apr 5, 2024 · 0 comments

Comments

@rapcmia
Copy link
Contributor

rapcmia commented Apr 5, 2024

Describe the bug

When running tests on funding rate arb script on development, observed that when using two exchanges with same market sometimes exceeds the leverage resulting order failure and errors. Therefore we run the same test on the following perpetual connectors:

  • For Binance and Kucoin, when leverage is beyond the exchange’s limit it will return an error that ..is not valid or ..cannot exceed causing failure to order creation
  • For Okx, Gateio and Hyperliquid, Returns error ..exceeds maximum limit and ..leverage to high then creates order with leverage set to either 1 or 10
  • For Vega, it automatically adjust the leverage and use it when placing orders ✅

Suggestion: We think that it should copy what Vega do when exceeding leverage, uses the maximum possible value then place order.

Steps to reproduce

  1. Setup v1 strategy (perp-mm) and use any perpetual connector
  2. Select any market and check the leverage, then set a value higher that the exchange can support
    • for sample on Kucoin perpetual, GAS-USDT can only be set up to 5x but other exchanges has 50x
  3. Start the strategy and observe behavior when exceed leverage and order creation on logs

Release version

dev-1.27.0, v1.26.0

Type of installation

Source

Attach required files

n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant