Order TypesIntermediate

Time-in-Force: IOC, FOK and GTCIOC

Time-in-force tells the venue how long an order stays active. Immediate-or-cancel (IOC) fills what it can at once and cancels the rest; fill-or-kill (FOK) must fill completely at once or not at all; good-till-cancelled (GTC) stays open until filled or cancelled, although many brokers limit how long.

Every order has a lifespan, whether you choose it or not. Time-in-force is that setting: should the order work for the rest of the day, stay open for weeks, or fill right now or not at all? Choosing the wrong one leads to orders that vanish when you expected them to wait — or old orders that fill when you have forgotten them. This entry explains the common time-in-force options and when to use each.

Category
Order Types
Reading time
4 min
Also called
Immediate-or-cancel order, Fill-or-kill order, Good-till-canceled order
Updated

Time-in-force in plain words

Unless you choose otherwise, most stock orders are day orders: they are good only for that trading day and expire if not filled.1 They do not automatically carry over into after-hours trading. See Market Hours.

A good-til-cancelled (GTC) order lasts until it is filled or you cancel it — though brokers usually limit how long it can stay open.2 See Order.

How to choose a time-in-force, step by step

  1. Intraday idea?

    Use a day order so it cannot fill tomorrow unexpectedly.

  2. Waiting for a level over days?

    Use GTC — and note your broker’s maximum duration.

  3. Need it now, partial fill acceptable?

    Immediate-or-cancel: whatever cannot fill immediately is cancelled.3

  4. Need it all now or nothing?

    Fill-or-kill: the whole order fills immediately or it is cancelled — no partial fills.4 See Partial Fill.

  5. Need a specific end date?

    Some brokers offer good-till-date (GTD).

  6. Review open orders

    Cancel GTC orders when the plan changes.

Worked examples

Example 1 — The forgotten GTC

Forgotten

A trader places a GTC buy limit at $40 on a stock at $45, then changes their mind but forgets the order. Weeks later bad news sends the price to $38.

Example 1 — The forgotten GTC — calculation
Order fills at$40
Price after the news$38

Old GTC orders can fill in exactly the conditions you no longer want. Review them regularly.

Example 2 — IOC vs. FOK

Comparison

You want 1,000 shares at $20.00 or better; only 600 are available there.

Example 2 — IOC vs. FOK — calculation
IOCBuys 600, cancels 400
FOKBuys nothing — cancelled

IOC accepts partial fills; FOK does not.

Example 3 — The day order that expired

Expired

A day limit order to sell at $55 is not reached by the close. After hours the stock trades at $56.

Example 3 — The day order that expired — calculation
Your orderExpired at the close

Day orders do not automatically work in extended hours. Choose the session explicitly if your broker allows it.

Common time-in-force settings

AspectLastsPartial fills
DayUntil the end of the trading dayAllowed
GTCUntil filled or cancelled (broker limits apply)Allowed
IOCAn instantAllowed; the rest is cancelled
FOKAn instantNot allowed

When each setting helps

  • Day orders

    Intraday trading without overnight surprises. See Day Trading.

  • GTC orders

    Swing entries and exits at planned levels. See Swing Trading.

  • IOC

    Taking available liquidity without leaving a resting order. See Liquidity.

  • FOK

    All-or-nothing executions for block-sized needs.

Advantages and disadvantages

Advantages

  • Gives precise control over how long an order works.
  • Prevents unwanted fills at the wrong time.
  • Lets traders choose between partial and complete fills.

Disadvantages

  • Defaults differ between brokers and platforms.
  • Forgotten GTC orders can fill unexpectedly.
  • IOC and FOK may not fill at all in thin markets.

Going deeper

Read as far as you need. Each level builds on the one before it.

Know your default

Beginner

Check what your platform uses when you do not choose. Many default to day orders.

Stops and time-in-force

Intermediate

A protective stop placed as a day order disappears at the close. For multi-day trades, make sure the stop is GTC. See Stop Loss.

Crypto and futures conventions

Advanced

Many crypto exchanges and futures platforms use GTC as the default and offer IOC, FOK and post-only options for liquidity control. See Maker and Taker Fees.

Common mistakes

  1. Day-order stops on swing trades

    The stop expires overnight.

  2. Forgetting GTC orders

    Review open orders weekly.

  3. Using FOK in thin markets

    It may never fill.

  4. Assuming orders work after hours

    Check session settings.

Check your understanding

Test yourself before moving on. Each answer comes with an explanation.

Q1You need exactly 500 shares immediately, or none at all. Which setting?
Q2A day limit order is not filled by the close. What happens?

Key points to remember

  1. Time-in-force sets how long an order stays active.
  2. Day orders expire at the close; GTC orders stay open (within broker limits).
  3. IOC fills what it can now and cancels the rest.
  4. FOK fills completely now or not at all.
  5. Review open GTC orders regularly.

Frequently asked questions

How long does a GTC order last?

Until it fills or you cancel it, but brokers usually set a maximum, often measured in days or months. Check your broker’s rule.

What is the default time-in-force?

For most stock orders it is a day order, unless you choose otherwise.

When should I use IOC?

When you want to take what is available now without leaving an order sitting in the book.

Further learning

Sources

This article is written in our own words. The sources below support the specific facts, rules and figures marked with a number in the text. Links open the original publisher’s page.

  1. Investor.gov (SEC). Day Order (glossary) (opens in a new tab) Checked .
  2. Investor.gov (SEC). Good-Til-Cancelled Order (glossary) (opens in a new tab) Checked .
  3. Investor.gov (SEC). Immediate-Or-Cancel Order (glossary) (opens in a new tab) Checked .
  4. Investor.gov (SEC). Fill-Or-Kill Order (glossary) (opens in a new tab) Checked .

Educational content, not financial advice. Examples use hypothetical prices and simplified costs; actual fees, margin rules and regulations vary by broker, market and country. We are not affiliated with any publisher linked above. Last reviewed . Report an error or request a source credit.