Hi, I’ve got The counterparty's best price does not meet the PERCENT_PRICE filter limit
on MARKET order in Production.
Looking at docs, there is PERCENT_PRICE descripted here.
I have 3 questions:
- Is this the PERCENT_PRICE which error mentioned? (I mean I place market order, never heard this filter affects market order)
- If 1 is true, which price should I use for this fomular?
- How is multiplierDecimal being used?
- Is this the PERCENT_PRICE which error mentioned? (I mean I place market order, never heard this filter affects market order)
Yes, this is the same filter mentioned in the error.
- If 1 is true, which price should I use for this fomular?
It’s slightly more complicated when dealing with MARKET orders. The price
used depends on the lowest/highest price the MARKET order trades at. A large BUY MARKET order may encounter slippage which surpasses the markPrice * multiplierUp
due to low liquidity in the order book, causing the PERCENT_PRICE
filter error.
- How is multiplierDecimal being used?
multiplierDecimal
refers to the precision of multiplierUp
and multiplierDown
. It is not used when performing the FILTER check.
1 Like
Thanks for your detailed answer. I just want to clearify some more:
-
So in that fomular, I will get the worst price that market order will be matched to, not the median price?
For example, user place long 1 BTC, there are 2 sell limit orders: 0.2 at 40k, 0.8 at 41k. So price should be what:
a) price = worst price = 41k,
b) price = (0.2*40) + (0.8*41) = 40.8k
-
This filter will be applied on both when user open position, and when user close position (reduce only order) right? (I want to clearify that if user close position, is there any chance they meet this error).
- So in that fomular, I will get the worst price that market order will be matched to, not the median price?
For example, user place long 1 BTC, there are 2 sell limit orders: 0.2 at 40k, 0.8 at 41k. So price should be what:
a) price = worst price = 41k,
b) price = (0.2*40) + (0.8*41) = 40.8k
Price used in the limit check would be 41k
- This filter will be applied on both when user open position, and when user close position (reduce only order) right? (I want to clearify that if user close position, is there any chance they meet this error).
Filter is applied to any order request, even if the order would reduce a position.
2 Likes
What if I use limit order can someone explain please my money is stock in the trade refusing to close
In this case what should be the solution?
I think avoid to use market order, may be we would use limit order and set the price to mark price * multiplierUp?