Order Types
Market Orders
Market orders will be opened and closed at the price the Keeper retrieves from the oracles. Since it takes time for the order to be confirmed on the blockchain, the position will be opened usually within 1-5 seconds.
The executed price is calaulated based on Market Price and Price Impact.
Limit Orders
Limit orders are trigger orders on YFX. Traders can set a specified price for a limit order. If the set price crosses the current index price, the limit order will be executed as a market order.
Note: Limit orders are not guaranteed to be triggered due to delays on the blockchain.
Each limit order will collect the initial margin when the order is placed. When the limit order is executed, if the position size increases, the initial margin of the limit order will be added to the position margin; if the position size is reduced, the profit and loss will be settled, and the initial margin of the limit order will be refunded.
Take-profit and stop-loss Orders
Take-profit and stop-loss orders(TP&SL) are for the entire position, and when the index price reaches the set trigger price, the entire position will be closed. If the direction of the overall position changes, for example, a long position becomes a short position, the original take-profit and stop-loss orders will become invalid.
After a trader successfully opens a position, he can set up take-profit and stop-loss orders by setting up two prices to take profit and stop loss. After setting the prices, they can edit them under the "Position Panel."
Note: The take-profit and stop-loss orders are not guaranteed to be triggered due to delays on the blockchain.
For example:
1. Bob holds a long position in BTC. The current price is 40,000. Bob can set a take-profit order priced at 40,010 and a stop-loss order priced at 39,990.
2. Alice holds a short position in ETH, and the current price is 4,000. Alice can set a take-profit order priced at 3,990 and a stop-loss order priced at 4,010.
Last updated