-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when placing a simple MARKET order #200
Comments
I've been having the same issue with the node SDK 🙃 It's honestly hard to understand why a small market order sometimes fails to be filled, especially when there is obviously liquidity in the order books. It's also weird to have to pass a price when creating a market order. Would love an explanation or to know how to stop this from happening. |
Have you guys tried placing these market orders with the best bid or best ask price from the orderbook? I have no experience doing it with oracle price - however I do my market orders with orderbook data and they normally go through. If they don't however bribing with a slightly better price (resubmitting with a price that is slightly worse for you) helps. Edit: |
Just tried with different prices from the orderbook but the error remains. The example order in the docs you provided uses a LIMIT order type, not a MARKET one. I have no issue when placing a LIMIT order, but I still have with a MARKET order. |
I am in the same boat, I cant figure this "MARKET" order out.
|
This does work though: (But still I would like some more explanation on the logic)
|
For other users to use if of any good: ( This is my take ):
|
any progress on this? i dunno why it needs to worry about price for a market order and I cant figure out why it will create an order and then not create it another time |
As it is a DEX you need Price variable to Control slippage. (DYDX matching will though always ensure you get the best price possible on the order book). Here is some of my code, hope it helps. loss]
|
Using this code:
I get this error:
dydx3.errors.DydxApiError: DydxApiError(status_code=400, response={'errors': [{'msg': 'Order with timeInForce: GTT, triggerPrice: undefined or trailingPercent: undefined will not be treated as MARKET'}]})
When I try with
time_in_force
= 'FOK' or 'IOC', the order is placed but cancelled immediately.Thanks
The text was updated successfully, but these errors were encountered: