passabilities / crypto-exchange

Pulls together list of crypto exchanges to interact with their API's in a uniform fashion.
MIT License
261 stars 78 forks source link

Revise bitfinex order. #26

Closed michael-wang closed 6 years ago

michael-wang commented 6 years ago

My prev commit force user to use 'exchange limit' as type argument. This pull request add an optional 'type' argument with default value set to original value ('limit'). This also allows user to customize type value. PS: original 'type' argument is renamed to 'side' according to bitfinex API naming (https://bitfinex.readme.io/v1/reference#rest-auth-new-order).

passabilities commented 6 years ago

Actually according to the docs, any type starting with exchange (e.g. exchange limit) are for exchange orders whereas without (e.g. limit) is for margin trading orders.

I will revert this and leave it as default but still allow users to change.

https://docs.bitfinex.com/v1/reference#rest-auth-new-order

passabilities commented 6 years ago

@michael-wang see my latest changes. It will also default all orders to be limit orders unless the exchange supports otherwise.