Perpetual Order Types
Yamata’s perpetual trading supports a variety of order types to accommodate different trading strategies and risk management techniques. This page describes each order type and related options (reduce-only, triggers, etc.), so you can choose the appropriate order for your needs.
Market Orders
Market Order executes immediately against the best available prices in the order book:
Use Case: Use market orders when you need quick execution and are willing to accept the current market price. For example, if you need to exit a position rapidly or enter a position during fast market moves.
How it Works: You specify the quantity (size of the position to buy or sell). The order will fill at the best bid/ask prices available. If your order is larger than the top of the book, it will sweep multiple levels, potentially incurring slippage (the difference between expected price and average fill price).
Considerations: Market orders pay taker fees since they remove liquidity. In very volatile or illiquid markets, slippage can be significant – your execution price may be worse than the last traded price you saw. Always check the order book depth if possible before placing a large market order.
Limit Orders
Limit Order lets you specify a price at which you want to buy or sell:
Use Case: Use limit orders when you have a target entry or exit price and can wait for the market to come to you. For example, if BTC is $30,000 and you want to buy on a dip at $29,500, place a buy limit at $29,500.
How it Works: You set the price and quantity. The order will rest on the order book if it’s not immediately executable. A buy limit will only execute at your limit price or lower (good for getting a better price), and a sell limit executes at your price or higher.
Maker vs Taker: If your limit order immediately matches with existing orders (e.g., you place a buy limit above the current ask), it will execute as a taker order. If it rests, it becomes a maker order, earning maker fee rebates or lower fees. Yamata likely offers incentives for maker orders (as seen in the rewards program).
Time in Force Options: By default, limit orders remain open until filled or canceled (“Good-Till-Canceled”). Yamata may support additional options:
Immediate-Or-Cancel (IOC): fill what you can immediately, cancel the rest.
Fill-Or-Kill (FOK): either fill the entire order immediately or cancel it (no partial fills).
Post-Only: ensure the order only posts to the book (does not take liquidity immediately). If it would execute instantly, it will cancel instead. This guarantees you get maker fees.
Stop Orders (Stop-Limit and Stop-Market)
Stop Orders are conditional orders that activate only when the market reaches a specified trigger price. They are crucial for risk management (stop-loss) and for breakout entries.
Stop-Loss (Protective Stop): An order to close a position if the market moves against you beyond a threshold. For example, if you’re long ETH at $1,500, you might set a stop sell at $1,400 to limit your loss if price drops.
Take-Profit Order: Essentially the opposite of a stop-loss, it triggers to secure profit. E.g., if short BTC at $30k, you might place a buy stop at $27k to lock in profit if it falls to that level (this is sometimes called a take-profit stop).
Yamata supports two types of stop orders:
Stop-Market Order: When trigger price is hit, it sends a market order. This ensures the order will execute (assuming market is available) but the fill price may slip past the trigger if the market is moving fast.
Example: BTC is $30,000. You have a long position and set a stop-market at $29,000. If BTC drops to $29,000, a market sell is triggered for your position size, exiting at whatever price available around that level.
Stop-Limit Order: When triggered, it places a limit order at a predefined price (the limit price can be same as trigger or a bit worse to improve chances of fill).
Example: BTC is $30,000. Set a stop-limit with trigger $29,000 and limit price $28,900. When $29,000 is hit, a limit sell at $28,900 posts. This gives a price floor so you don’t sell too far below $29k, but carries risk it might not fill if price plunges quickly below $28,900.
Trigger Conditions: Yamata likely uses the Mark Price or Last Price to decide when a stop is triggered. Using Mark Price is safer to avoid triggering on a momentary wick. The documentation will clarify, but assume mark price triggers stop-loss to avoid unnecessary activations due to temporary spikes.
Using Stop Orders:
Set a Stop Price (trigger) and an Order Price (for stop-limit) along with the size and side (sell for long position stop-loss, buy for short cover).
Ensure the stop order is set in the correct direction. A common mistake is placing a stop order on the wrong side of the book. E.g., for a long, you want a sell stop below the entry; for a short, a buy stop above the entry.
When the condition is met, the system will automatically submit your order. You can view active stop orders in the Triggers or Stop Orders tab in the interface.
Reduce-Only Orders
Reduce-Only is a flag you can apply to an order (market or limit) to ensure it only decreases or closes your existing position, and never opens or adds to a position.
Use Case: This is especially useful for stop-loss or take-profit orders. For instance, if you have a long position of 5 ETH, you might place a sell limit at a higher price to take profit and a sell stop to cut loss. Marking them as reduce-only guarantees that if one of them executes (closing your position partially or fully), the other won’t accidentally open an opposite position if it later triggers. It will simply cancel if there’s no position left to reduce.
Behavior: A reduce-only order will be rejected or adjusted by the engine if it would increase your position in the given direction. It only executes up to the size that offsets your current position.
Example: You are short 2 BTC. You place a buy limit for 3 BTC as a take-profit, marked reduce-only. If only 2 BTC are needed to flatten your position, the order will only fill 2 BTC and then cancel the remainder.
Setting Reduce-Only: In the order panel or API, there’s an option to flag an order as reduce-only. Typically, you’d do this for exit orders that you set in advance. It’s good practice to mark stop-loss and take-profit orders reduce-only to avoid over-exposure due to multiple orders.
Order Execution Examples
Entering a Position: You want to long 1000 USDC worth of BTC-PERP at the current price quickly. You place a market buy for 1000 USDC (or equivalent BTC quantity). The order executes against current asks, you pay a taker fee, and you now have a long position. Alternatively, if you wanted to potentially get a better price, you could place a limit buy at a slightly lower price, which might or might not fill.
Exiting with Take-Profit and Stop-Loss: You long 5 ETH-PERP at $1,500. Immediately, you set:
A sell limit order at $1,650 for 5 ETH (take-profit) – maker order resting above current price.
A sell stop-market order at $1,400 for 5 ETH (stop-loss) – resting condition below.
Mark both as reduce-only. Whichever hits first will close your 5 ETH. Say the price rallies to $1,650: your limit hits, you sell 5 ETH, locking profit. The stop order at $1,400, being reduce-only, is automatically cancelled once your position is gone. If instead price had dropped to $1,400 first, the stop triggers a market sell, closing the position, and the $1,650 limit then cancels.
Partial Fills: If you place a large order, it might fill in pieces. For example, you place a limit buy for 10 BTC-PERP, but only 3 BTC are available at or below your limit price initially. You’ll get 3 BTC filled, and 7 BTC remain on the book until more sellers come down to your price. Your open order will show 7 BTC remaining. You can cancel it anytime. The filled 3 BTC start accruing P&L as an open position.
Cancelling Orders: You can cancel any resting order (limit or stop) that hasn’t fully executed. Once cancelled, the reserved margin for that order is freed up. Market orders usually either fill immediately or fail (there’s nothing to cancel since they’re instantaneous).
Remember that smart usage of order types can greatly enhance your trading strategy and risk management:
Use limit orders to control entry price and potentially earn maker rewards.
Use stop orders to cap your downside and secure profits when you’re away from the screen.
Always set reduce-only on opposing orders (like stops and targets) for safety.
Next, we’ll explore Yamata’s Risk Engine & Liquidation process, so you know how margin requirements are enforced and what happens if markets move against your leveraged positions.
Last updated