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

bybit: "retCode":10001,"retMsg":"order link id is longer than 45" #436

Open
kkoouu opened this issue Feb 1, 2024 · 1 comment
Open

bybit: "retCode":10001,"retMsg":"order link id is longer than 45" #436

kkoouu opened this issue Feb 1, 2024 · 1 comment

Comments

@kkoouu
Copy link

kkoouu commented Feb 1, 2024

In last hour I started receiving above mentioned error during order create. I have checked the length of orderIdLink and it looks like this:

orderLinkId: long_nclose31214610-0b3f-44e1-8c51-683af44d81bc

I have changed line 192 in exchanges/bybit.py
from:
"orderLinkId": order["custom_id"] + str(uuid4()),

to:
"orderLinkId": str(uuid4()),

and it works now.

No idea what has changed ... maybe Bybit changed the max allowed field length ?

@kkoouu
Copy link
Author

kkoouu commented Feb 1, 2024

According to https://bybit-exchange.github.io/docs/v5/order/create-order:

orderLinkId: User customised order ID. A max of 36 characters.

str(uuid4()) returns exactly 36 chars long ID

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

No branches or pull requests

1 participant