I have a coin with 100 tokens. ADA for the sake of discussion.
Now the current price of the market is 0.4 USDT/token.
I want to place a SELL order to have the following condition.
QTY = 100 tokens.
PRICE TO SELL (LIMIT) 0.43
if the price drops under 0.35 I want to execute the 100 tokens on Market Price.
What kind of order should be placed?
I dont find any to work with.
At the above link, you can find the endpoint to do a test order.
We have GitHub - binance/binance-api-postman: Postman collection for Binance Public API, including spot, margin, futures, etc. available for beginners to understand how our exchange API works, might be useful for you.
Based on the conditions you’ve provided, it’s not possible to have ONE order with limit price and market price at the same time. Maybe what you want is to have an order that get’s triggered at certain price and then executes at market price?
This New Order endpoint information section will likely help you understand all of this better.
That is exactly what I want.
An order to be triggered UP as an order SELL LIMIT.
And the same order to be triggered at a specific lower (than current) price and be a SELL MARKET ORDER.
I study NewOrder endpoint but I cannot put any order to trigger on a price lower than current price and to be SELL MARKET ORDER.
There is an OCO order pair, with the following parameters:
It should give you the behavior you want: it places a LIMIT order at 0.43 paired with a STOP LOSS at 0.35. If the price reaches 0.43 you’d be selling at that price or better, the stop loss will be canceled. If the price drops to 0.35 then you immediately sell at the market price.
I was study the OCO and it is kind of what I need.
One question remain.
The cancel of the “stop price order” is executed on the first condition of the Limit Sell Price (high price), or when the entire sell order is executed?
Why do I ask.
I put the order exactly as you mentioned.
But the sell limit order can be filled only 10% and after that the price goes down. if the stop price order is canceled, and the price continue to drop “i lost the stop price”.
Unfortunately, the stop order is canceled immediately if the limit price is reached. At the moment it’s not possible to place an algorithmic order like that, keeping the stop loss around as a precaution until the order is fully filled.