Closed gaorufeng closed 6 years ago
This is a good point, at the moment we are making it impossible to place complex orders over the websocket api.
I have now added support for advanced order types.
We still need to get documentation up and running, but for now look at the updated new_order
method:
https://github.com/ohenrik/bitfinex/blob/master/bitfinex/websockets/client.py#L292
new_order("LIMIT", "tEOSUSD", "5", "4") is OK!, I don't know how to support stop limit for new_order().
update:
I edit client.py
copy new_order_op to new_order_op_stop_limit
copy new_order to new_order_stop_limit()
if price $5.0
exch_order = self.mywss.new_order_stop_limit("STOP LIMIT", "tEOSUSD", "4", "6","6.2")
exch_order = self.mywss.new_order_stop_limit("STOP LIMIT", "tEOSUSD", "-6", "4","3.9")
That's OK. Sorry, my English is not good