Closed pycoder2014 closed 2 years ago
Hello @pycoder2014, I am pretty sure it is possible to send market orders using REST and WS APIs.
from bfxapi.models.order import OrderType
response = await bfx.rest.submit_order("tBTCUSD", 10, market_type=OrderType.MARKET)
Hi Dario, If you take a closer look at the signature of that submit_order function, you'll see that it takes price as a positional argument therefore its required.
Oh, I am sorry. You are right. I am opening a PR to fix it. Of course, you can just pass price=None to use it with the already published version of this library.
from bfxapi.models.order import OrderType
response = await bfx.rest.submit_order(symbol="tBTCUSD", amount=0.1, price=None, market_type=OrderType.MARKET)
hi @itsdeka @pycoder2014 merged example usage for market order (https://github.com/bitfinexcom/bitfinex-api-py/pull/175), closing the issue
Issue type
Brief description
Neither the Rest nor Websocket api supports Market orders. That's not very nice. Is there a technical reason for this?
Steps to reproduce
-
Additional Notes:
-