sandybradley / BybitMarketMaker

Simplified Bybit market maker for personal customisation
MIT License
20 stars 2 forks source link

Not working anymore, old ? #3

Open babyrig opened 3 years ago

babyrig commented 3 years ago

Hello sir,

I don't know if the api's endpoint have changed since the last update, could you check or update with the pybit below instead of the oficial with bravado (so many errors in the past).

https://github.com/verata-veritatis/pybit

Thank you

sandybradley commented 3 years ago

Are you using a USDT market? If so you need to change the connection from: "wss://stream.bybit.com/realtime" to "wss://stream.bybit.com/realtime_private"

babyrig commented 3 years ago

Are you using a USDT market? No, still the same inverse perpetual BTCUSD tried with (realtime_private) and nothing. Look I am been using this for a while now, I put the order there then the order be executed but the script don't open a new order to close it, tried to put debug info but still don't see anything why not work here anymore. For you keep working just fine ? I remember on lines 52 and 56 needed to remove V2 from there I don't know if have changed the endpoint to send the orders. About pybit can you look into it to use or will be very complicated ? Any other suggestions ?

sandybradley commented 3 years ago

Looks like you are correct. Bybit new order schema has been updated. Try removing V2 as you suggest. USD markets can use realtime endpoint.

babyrig commented 3 years ago

Any idea how to debug/identify why the script don't open new orders ? Already been working without V2 but now I don't know just stopped working... I am suggest to check pybit because looks more stable without bravado/connections issues, if you look there already have a market maker script from the same dev but I don't know how to merge this code there to work with manual orders.

babyrig commented 3 years ago

Hello @sandybradley could you make a fork to using with the USDT contracts like DOGEUSDT ? It's because they are in hedge mode so can't close with buy and sell limit they will just open hedge positions.