I'm using the Python SDK to place orders, and I frequently encounter this error — it happens sometimes but not always, which is quite frustrating:
{'error': "order couldn't be fully filled. FOK orders are fully filled or killed.", 'orderID': '0x4c0da50613082102fdc0024c2634efa9d12cdd567c31b86bd4b62bef7b96ea24'}
What I need is something similar to a market order. For example, when I want to place a $1 buy order, regardless of the price, it should get filled as long as there is liquidity above. Logically, it should always be filled.
Every time I get this error, I go to the web interface to check the order book for sell orders, and I find that there are indeed enough sell orders available.
Is there any way to avoid this error when placing orders?
I'm using the Python SDK to place orders, and I frequently encounter this error — it happens sometimes but not always, which is quite frustrating:
{'error': "order couldn't be fully filled. FOK orders are fully filled or killed.", 'orderID': '0x4c0da50613082102fdc0024c2634efa9d12cdd567c31b86bd4b62bef7b96ea24'}
What I need is something similar to a market order. For example, when I want to place a $1 buy order, regardless of the price, it should get filled as long as there is liquidity above. Logically, it should always be filled.
Every time I get this error, I go to the web interface to check the order book for sell orders, and I find that there are indeed enough sell orders available.
Is there any way to avoid this error when placing orders?
you need to place a GTC . FOK is either fully filled or fully killed immediately. If nothing there matching exactly your order at the time of your order, it is killed.
you need to place a GTC . FOK is either fully filled or fully killed immediately. If nothing there matching exactly your order at the time of your order, it is killed.
Are there any parameters for placing an order that come closest to the effect of a market order?
Are there any parameters for placing an order that come closest to the effect of a market order?
dont use FOK, use FAK order
dont use FOK, use FAK order
and use slippage
and use slippage
if you do that, you will get insta-filled at whatever the price is
if you do that, you will get insta-filled at whatever the price is
if you place limit orders (GTC) the minimum is always 5 contracts
if you place limit orders (GTC) the minimum is always 5 contracts
for FAK it is 1$
for FAK it is 1$
What is the slippage parameter? I didn't see this parameter in the documentation.
What is the slippage parameter? I didn't see this parameter in the documentation.
price
price
what?
what?
order_args=MarketOrderArgs(
token_id=token_id,
amount=1,
side=Side.BUY,
order_type=OrderType.FAK, # FOK
price=0.99,
),
I tried setting price = 0.99, and it seems like it doesn't throw an error anymore. This should be able to simulate the effect of a market order.
order_args=MarketOrderArgs(
token_id=token_id,
amount=1,
side=Side.BUY,
order_type=OrderType.FAK, # FOK
price=0.99,
),
I tried setting price = 0.99, and it seems like it doesn't throw an error anymore. This should be able to simulate the effect of a market order.