ohenrik / bitfinex

A Python client for the Bitfinex API
MIT License
58 stars 32 forks source link

Make cid optional for new orders. #28

Closed michielz closed 5 years ago

michielz commented 5 years ago

Creating new orders fails because Bitfinex thinks the cid is incorrect. I don't know why, I can still ping using cid.

[0, 'n', [1546953056495, 'on-req', None, None, [None, None, 15469530564677380, 'tXRPUSD', None, None, -38, None, 'STOP', None, None, None, 1024, None, None, None, 0.3689, None, 0, 0, None, None, None, 0, 0, None, None, None, None, None, None, None], None, 'ERROR', 'cid: invalid']] For those who do not use cid I have made it optional. This also fixes the problem.

dantimofte commented 5 years ago

Can you please set the default value for set_cid to true for backwards compatibility and what most people want ?

michielz commented 5 years ago

Sure, the default for cid is now set to true.

I'm using websocket v2 to create new orders. Do you also get the same error?

dantimofte commented 5 years ago

Yes, i also got the same error, i'll also update the create_cid to lower the cid to 16 digits from 17 at the present and release a new version on pypi after that.

michielz commented 5 years ago

Thanks for the fast update. Really cool!

I'll test creating orders with cid as soon as the new code is on pypi.

dantimofte commented 5 years ago

fixed #27