Order Types
Complete guide to order types supported by Realm
Basic Order Types
Limit Order
A limit order specifies the maximum price you're willing to pay (buy) or minimum price you're willing to accept (sell). The order will only execute at your limit price or better.
limit-order.tstypescript
await client.placeOrder({market: 'RLM-PERP',side: 'buy',type: 'limit',price: 100.50,size: 10,timeInForce: 'GTC', // Good-til-cancelled});
Market Order
A market order executes immediately at the best available price. Use for fast execution when price is less important than speed.
market-order.tstypescript
await client.placeOrder({market: 'RLM-PERP',side: 'buy',type: 'market',size: 10,});
Time in Force
- GTC - Good-til-cancelled (default)
- IOC - Immediate-or-cancel
- FOK - Fill-or-kill
- GTD - Good-til-date
Advanced Order Types
Stop-Loss
Triggers a market order when price reaches your stop price.
Take-Profit
Closes your position when price reaches your target.
Reduce-Only
Can only reduce an existing position, never increase it.