-
Notifications
You must be signed in to change notification settings - Fork 63
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 api issue #6
Comments
Can you log or print |
That's exactly what i whent and did yesterday after further testing. The position reports as: Retrieve positions So basically we'r trying to return string but size in the dictionary is integer? That would be my frist guess. So then if i try and do:
i get the error: That is how far i got yesterday. |
I have fixed it. What i did was in the example of the exit position:
so basically get the size and open side with .get to get the value out of the dictionary. |
Glad you made it work ! I think you can write But this is still quite surprising because |
I'm using Python 3.10.4. It's weird it was not working for me but its okay as its fixed. |
I have been trying to work around this problem for a few days now. Basically at this point i think ther's an issue in the code?
When i try to send the following API alert:
{
"ticker" : "BTCUSD",
"exchange" : "BYBIT",
"time" : "2022-04-10T01:44:17Z",
"action" : "Buy",
"price" : 44153.23,
"message" : "entry",
"passphrase" : "123",
"subaccount": "MYBYBITACCOUNT"
}
i get the following response:
i have also tried removing everything but the message, passphrase, subaccount and ticker and exchange but i still had the same issue. Seems like then if i went in the code itself and edited the open_size = position['size'] to a fixed number it then worked? Anyway, it seems to me like ther's really an issue in orders = order(data) in app.py.
Did something change in the bybit's api that needs changing?
I'd appreciate if anyone could push me in the right direction.
The text was updated successfully, but these errors were encountered: