limit - Place Limit Orders at Specific Prices
Buy or sell a specified quantity at your limit price or better. An order can fill immediately if it crosses the market; otherwise it can remain pending.
Syntax
// Basic syntax
limit long|short <amount> off|at|@ <value>
// With optional parameters
limit long|short <amount> off <value> [post|taker] [reduce] [#tag]
// With inline SL/TP (see market command for details)
limit long|short <amount> off <value> sl off <sl_value> tp off <tp_value>The command finishes as soon as the order is placed on the exchange. It does not wait for the order to be filled.
Inline ts is not supported on limit entries yet. Use market ... ts ... on a supported futures market, or place a standalone trailing-stop after a position exists.
Parameters
long | shortRequiredType: direction keyword | Values: long, short (buy, sell as aliases)
Specifies whether to go long (buy) or short (sell). Use an explicit side for every limit order.
amountRequiredType: number or string
The quantity to trade. Can be specified in several ways:
| Format | Description | Example |
|---|---|---|
0.01 | Direct quantity | 0.01 BTC |
50% | Percentage of total balance | Half your balance |
50%% | Percentage of available balance | Half your free balance |
50%p | Percentage of position | Half your position size |
Required together with the order side. Position targets use a separate market command.
off / at / @RequiredType: number or string | Default: 1%
Use an absolute price with at/@, or an offset with off. Unsigned offsets choose direction automatically:
- Long orders:
off= BELOW current price (better entry) - Short orders:
off= ABOVE current price (better exit)
| Format | Description |
|---|---|
off 50 | 50 quote-currency units from current price (auto-direction) |
off 1% | 1% from current price (auto-direction) |
off e50 | 50 quote-currency units from average entry price |
off e1% | 1% from average entry price |
@ 50000 | Absolute price of 50000 quote-currency units (with space) |
@50000 | Absolute price of 50000 quote-currency units (no space) |
pos sets a target at market. A limit order instead requires a side, quantity and price; it does not calculate a final position target.
post | maker | takerOptionalType: keyword | Default: none (exchange default)
Controls whether the order can take liquidity or must provide it:
| Keyword | Behavior |
|---|---|
post or maker | Post-only: order must add liquidity. If it would match immediately, it's rejected. |
taker | Allow immediate matching (can take liquidity) |
| (omitted) | Post-only is off: immediate matching is allowed |
Post-only requests maker execution where supported. It does not guarantee acceptance, a fill or that the order will remain open.
reduceOptionalType: keyword | Default: omitted
Requests an order that only reduces your position, without increasing it. Exchange and position-mode rules apply; spot markets do not use futures reduce-only.
#tagOptionalType: string
Applies a tag to the order for later cancellation. Multiple orders can share the same tag.
See cancel #tag for details. Tags label supported orders; comments use // on a separate line.
Examples
Example 1: Buy 0.01 BTC at $10 Below Current Price
BTCUSDT on My_API_Key
limit long 0.01 off 10Places a buy limit for 0.01 BTC at 10 USDT below the current reference price. It fills only at that price or better; placement does not guarantee a fill.
Example 2: Sell a Fixed Quantity of ETH at a Limit Price
ETHUSDT on My_API_Key
limit short 0.01 at 4000Places a sell limit for 0.01 ETH at 4000 USDT or better. This is an order quantity, not a target short position. It may fill immediately if the market can meet that price.
Example 3: Take Profit 3% Above Entry
BTCUSDT on My_API_Key
limit short 100%p off e3% reduceSells 100% of your position at 3% above your average entry price. The reduce flag ensures it only closes your position.
Example 4: Ladder Multiple Orders with Tags
ETHUSDT on My_API_Key
// Place 3 take profit orders
limit short 33%p off e5% #tp
limit short 33%p off e8% #tp
limit short 34%p off e12% #tpCreates a ladder of 3 take profit orders at different levels. All tagged "tp" so they can be cancelled together with rem #tp.
Key Concepts
Limit vs Market Orders
- Limit orders can fill immediately when they cross the market
- Their limit constrains the fill price, but does not guarantee execution
- Use when you want to buy lower or sell higher than current price
- Perfect for scaling in/out of positions at specific levels
Offset Direction Logic
Flipr.Cloud uses intelligent offset logic:
- Unsigned offsets choose direction from the order side
- Buy orders: off 1% = 1% below the current price
- Sell orders: off 1% = 1% above the current price
- An explicit + or - sets direction directly, regardless of side
Post-Only Orders
Use post or maker to request post-only execution. Where supported, an order that would immediately take liquidity is rejected or cancelled. Acceptance and later execution still depend on the exchange and market.
Exchange-Specific Behavior
Limit order support and inline TP/SL behavior varies by exchange:
| Exchange | Inline TP/SL | Notes |
|---|---|---|
| Bitget | Native | Full support, TP/SL attached to position |
| ByBit | Native | Native bracket orders |
| Binance | Native | Batch orders API |
| HTX | Deferred | TP/SL applied when limit fills (requires position) |
| Toobit | Deferred | TP/SL applied after limit fills |
| Bitunix | Deferred | TP/SL applied after limit fills |
| KuCoin | Not supported | Use separate stoploss/takeprofit commands |
Deferred TP/SL: Some exchanges require a position before TP/SL can be set. Flipr.Cloud monitors the limit order and applies TP/SL when it fills.
Related Commands
market() - Execute trades immediately at current price
stopOrder() - Trigger orders when price reaches a level
cancel() - Cancel pending limit orders