cryptofeed icon indicating copy to clipboard operation
cryptofeed copied to clipboard

Liquidations for OKEX

Open bmoscon opened this issue 4 years ago • 2 comments

Currently okex only supports liquidations for perpetual swaps, need to add support for futures and options

bmoscon avatar Aug 30 '21 00:08 bmoscon

@bmoscon actually at the moment liquidations are not working for perpetual swaps either. It used to be supported, but that got broken during API v5 migration: https://github.com/bmoscon/cryptofeed/commit/eaa49906a66cf9a3f84eb1503747578f2f7e8ee1#diff-0f1c8fea8c071c11fe101704ca24534b5388ac2090b6727a0959441690d986ffL97-L98

There's still a lot of code in _liquidation callback, but it is never called (no task created anymore): https://github.com/bmoscon/cryptofeed/blob/5ecbb6cfabe837581ca4233dfed8f91c9ec15da7/cryptofeed/exchanges/okex.py#L132-L133

Would be good to get it back working, at least for perpetual swaps.

Also, that code in callback is likely broken - e.g. there is id positional argument missing here, between price and status: https://github.com/bmoscon/cryptofeed/blob/5ecbb6cfabe837581ca4233dfed8f91c9ec15da7/cryptofeed/exchanges/okex.py#L118-L119

nirvana-msu avatar Oct 28 '21 12:10 nirvana-msu

Currently okex only supports liquidations for perpetual swaps, need to add support for futures and options

Unfortunately perp swaps liquidations return an error :

ERROR : OKEX: Error: {'event': 'error', 'msg': "channel:liquidations,instId:ETH-USDT-SWAP doesn't exist", 'code': '60018'}

Nootski avatar Mar 25 '22 12:03 Nootski