bmoscon / cryptofeed

Cryptocurrency Exchange Websocket Data Feed Handler
Other
2.19k stars 679 forks source link

Phemex inverse vs linear BTCUSD #872

Open mreijnders opened 2 years ago

mreijnders commented 2 years ago

Dear cryptofeed dev(s),

Thanks a lot for your work, it has been extremely useful so far. I only have one minor, inconvenient issue. I can circumvent this by querying the respective websocket directly without cryptofeed but obviously would prefer integration with cryptofeed.

Describe the bug BTC-USD-PERP gives the linear BTCUSD contract from Phemex (settled in USD ) instead of the inverse (settled in BTC). When querying the websocket from Phemex directly, BTCUSD aka BTC-USD-PERP gives the inverse, and uBTCUSD gives the linear. The inverse contract is a factor of 10 or more traded than the linear contract, whereas the linear one is quite illiquid (relative for a BTC perp contract).

I have seen an issue raised about this before but from what i gathered it has not been fixed / implemented yet.

To Reproduce See above. Inverse contract is i think unavailable through cryptofeed.

Expected behavior BTC-USD-PERP should give the inverse and not linear contract, given the naming convention of Phemex. And if only one can be chosen, people most likely expect the inverse due to volume difference.

Screenshots If applicable, add screenshots to help explain your problem. n/a Operating System:

Cryptofeed Version

Thank you