#Definition
Time in Force (TIF) is an order persistence policy: GTC = good-'til-cancel; IOC = immediate-or-cancel; FOK = fill-or-kill (if supported).
#What is Time in Force?
TIF specifies how long an order remains active:
- Duration: How long order stays in market
- Execution rules: When to cancel
- Flexibility: Control over timing
- Risk management: Prevent stale orders
#Common TIF Types
#GTC (Good 'Til Canceled)
- Duration: Until you cancel or market closes
- Use case: Patient limit orders
- Risk: Can execute much later
- Best for: Long-term positions, no urgency
Example:
You place a buy order at 0.50. The order sits in the book for 3 days until the price drops and your order fills.
#IOC (Immediate or Cancel)
- Duration: Execute immediately, cancel remainder
- Partial fills: Accepts what's available
- Use case: Large orders, avoid moving market
- Best for: Quick execution, don't want to wait
Example:
You want 1,000 shares. The book only has 600 available at your price. An IOC order fills the 600 shares and immediately cancels the remaining 400, ensuring you don't leave a lingering order.
#FOK (Fill or Kill)
- Duration: All or nothing, immediately
- Partial fills: Not allowed
- Use case: Must execute completely or not at all
- Best for: Precise position sizes
Example:
You need exactly 1,000 shares to hedge a position. If the book only has 999 shares, a FOK order will cancel the entire order rather than giving you a partial fill.
#DAY (Day Order)
- Duration: Until market close
- Auto-cancel: End of trading day
- Use case: Today only, no overnight risk
- Best for: Short-term opportunities
Note: Less common in prediction markets (24/7 trading)
#Comparison Table
| TIF Type | Stays in Book | Partial Fills | Cancel When |
|---|---|---|---|
| GTC | ✓ Yes | ✓ Allowed | Manual only |
| IOC | ✗ No | ✓ Allowed | Immediate |
| FOK | ✗ No | ✗ Not allowed | Immediate if not all |
| DAY | ✓ Yes (until close) | ✓ Allowed | End of day |
#Developer Guide: Setting TIF
When using an API to place orders, TIF is typically a parameter in your order object.
// Example: Placing a GTC Limit Order
const order = {
market_id: "0x123...",
side: "BUY",
price: 0.50,
size: 1000,
type: "LIMIT",
time_in_force: "GTC" // Good 'Til Canceled
};
// Example: Placing an IOC Market Order
const urgentOrder = {
market_id: "0x123...",
side: "SELL",
size: 5000,
type: "MARKET",
time_in_force: "IOC" // Immediate or Cancel
};
#Use Cases
#GTC Orders
Scenario 1: Value Hunting
- Market at $0.60
- You think fair value is $0.50
- Place GTC buy at $0.50
- Wait for price to come to you
Scenario 2: Profit Target
- Bought at $0.40
- Want to sell at $0.60
- Place GTC sell at $0.60
- Auto-exit when target hit
#IOC Orders
Scenario: Large Position
- Want 10,000 shares
- Don't want to chase price up
- IOC gets what's available now
- Can reassess for remainder
#FOK Orders
Scenario: Exact Size Needed
- Hedging another position
- Need exactly 5,000 shares
- FOK ensures precision
- All or nothing
#Platform Support
#Kalshi
- GTC: ✓ Supported
- IOC: ✓ Supported
- FOK: Check documentation
- DAY: Market close varies
#Polymarket
- Default: Typically GTC
- IOC: May be available
- FOK: Check platform
- 24/7: No daily close
#Other Platforms
- Varies by platform
- Check order interface
- May have different names
- Functionality similar
#Strategic Usage
#Conservative Approach
Use GTC for:
- Patient limit orders
- Accumulation over time
- No rush to execute
- Willing to wait for price
#Aggressive Approach
Use IOC/FOK for:
- Immediate execution needed
- Market orders essentially
- Don't want partial fills
- Quick in and out
#Risks and Considerations
#GTC Risks
- Forgotten orders: Execute when you forget
- Stale prices: Market moved, order still live
- Changed thesis: Your view changed but order didn't
Mitigation:
- Review open orders regularly
- Set price alerts
- Cancel when thesis changes
#IOC Risks
- Partial fills: May not get full position
- Worse than GTC: Pay ask instead of waiting
- Slippage: Large orders move price
Mitigation:
- Accept partial fills
- Use for portion of desired size
- Combine with limit price
#FOK Risks
- No fill: All-or-nothing may fail
- Missed opportunity: Partial would have been good
- Inflexible: Market may not accommodate
Mitigation:
- Use for critical sizes only
- Have backup plan if rejected
- Check liquidity first
#Combining TIF with Order Types
#Limit + GTC
- Most common: "Buy 1,000 at $0.50 GTC"
- Patient: Wait for your price
- Flexible: Cancel anytime
#Limit + IOC
- Immediate with limit: "Buy at $0.50 or better, now"
- Protects from bad fills: Won't pay $0.60
- Gets what's available: At acceptable price
#Market + IOC
- Default market order: Essentially same thing
- Execute now: At current best price
- Accept slippage: Within reason
#Best Practices
#Managing GTC Orders
- Set alerts: Know when they execute
- Review daily: Cancel stale orders
- Update prices: As market changes
- Limit quantity: Don't forget large orders
#Using IOC Effectively
- For urgency: When timing matters
- Large positions: Break into chunks
- With limits: Control maximum price
- Accept partials: Plan for incomplete
#When to Use Each
- GTC: Default for most limit orders
- IOC: Quick execution, large size
- FOK: Exact size required
- DAY: If platform offers, short-term only
#TIF Decision Tree
#Common Scenarios
#Scenario 1: Slow Accumulation
- Goal: Build 10,000 share position
- Method: GTC buy at $0.45
- Timeline: Days/weeks okay
- TIF: GTC
#Scenario 2: News Reaction
- Goal: Enter before price moves more
- Method: Market or IOC
- Timeline: Seconds
- TIF: IOC
#Scenario 3: Precise Hedge
- Goal: Offset exactly 5,000 shares
- Method: Limit order FOK
- Timeline: Now, but only if full
- TIF: FOK