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

Invalid Symbol Error with ByBit v5 API Integration #4822

Closed
marcelv3612 opened this issue Feb 8, 2024 · 5 comments · Fixed by #4833
Closed

Invalid Symbol Error with ByBit v5 API Integration #4822

marcelv3612 opened this issue Feb 8, 2024 · 5 comments · Fixed by #4833

Comments

@marcelv3612
Copy link

Description:
The recent integration of ByBit v5 API support, as introduced in Pull Request #4771, appears to have a critical bug affecting symbol validation. Despite following the symbol format guidelines provided in ByBit's official API documentation, requests to create orders are failing with a "params error: symbol invalid" message. This issue has been identified and corroborated by multiple users, including @damiano1996.

Steps to Reproduce:

Implement a call to ByBit's v5 API for creating an order using the XChange library post-integration of PR #4771.
Ensure the symbol format adheres to the specifications in ByBit's official documentation.
Execute the call.
Expected Result:
The order is successfully created without errors, recognizing the symbol as valid.

Actual Result:
The call fails with the following error message: "params error: symbol invalid". This error persists even when using symbols that are clearly valid according to ByBit's official documentation.

Screenshots:

Screenshot demonstrating the error message:

image

Screenshot showing the attempted API call with the recommended symbol format:

image

Thanks!

This was referenced Feb 8, 2024
@rizer1980
Copy link
Contributor

Hello again.

First of all, please post full code simple example for rerpoduce this error.
Java, not kotlin of course.

@marcelv3612
Copy link
Author

Hello, and thank you for your response.

To clarify, the issue with the bybitAuthenticated.placeLimitOrder() method in the ByBitTradeServiceRaw.java file persists regardless of the specific parameters provided in the call. This has been thoroughly tested across all possible combinations of user-input parameters, including category, symbol, side, type, qty, limitPrice, and orderIdLink, without success. The error occurs consistently, indicating that the problem might not be tied to the way parameters are being passed but potentially to the underlying implementation or integration of the API.

I appreciate your assistance in investigating this matter further.

@pozheg
Copy link

pozheg commented Mar 9, 2024

I have the same issue, but I don't use XChange, so it looks like something is wrong on the ByBit side. I try to call V5 API directly for the linear category and constantly have this error message. But if I use the same call but try to create a spot order (use category "spot") - it works fine.

image

@pozheg
Copy link

pozheg commented Mar 11, 2024

Finally, I've resolved this issue. The root cause is that V5 API POST requests require JSON as params. The issue is not related to the symbol format.

@rizer1980
Copy link
Contributor

please check and close.

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

Successfully merging a pull request may close this issue.

3 participants