{
  "$schema": "https://degreesofsatoshi.com/encyclopedia/schemas/article-v1.json",
  "schemaVersion": "1.0.0",
  "id": "order-time-in-force",
  "canonical": "https://degreesofsatoshi.com/encyclopedia/order-time-in-force/",
  "collection": "defi",
  "title": "Order time in force: GTC, IOC and fill-or-kill",
  "description": "Compare persistent orders, immediate partial execution and all-or-nothing immediate execution without assuming every venue supports every policy.",
  "aliases": [
    "IOC FOK GTC crypto orders",
    "IOC versus FOK order"
  ],
  "dates": {
    "published": "2026-10-02",
    "modified": "2026-10-02",
    "verified": "2026-10-02T19:18:00.092Z",
    "dataAsOf": "2026-10-02"
  },
  "authorship": {
    "publisher": "Degrees of Satoshi editorial project",
    "process": "AI-assisted research and drafting with a separate automated source-verification pass; no external expert or named human review is implied."
  },
  "quickAnswer": {
    "text": "Time in force describes how long an order remains eligible and what happens to unfilled quantity. GTC means good until cancelled, subject to venue rules; IOC immediately fills what it can and cancels the rest; FOK requires the entire order to fill immediately or cancels it. Supported policies and expiry limits vary by venue.",
    "claimId": "order-time-in-force-quick-answer",
    "sourceIds": [
      "x425-defi-coinbase-orders",
      "x425-defi-dydx-orders"
    ]
  },
  "keyFacts": [
    {
      "label": "IOC",
      "value": "Partial execution is permitted; the unfilled remainder is cancelled.",
      "sourceIds": [
        "x425-defi-dydx-orders"
      ],
      "id": "ioc",
      "claimId": "order-time-in-force-fact-ioc"
    },
    {
      "label": "GTD",
      "value": "dYdX documents orders that expire at a specified date.",
      "sourceIds": [
        "x425-defi-dydx-orders"
      ],
      "id": "gtd",
      "claimId": "order-time-in-force-fact-gtd"
    },
    {
      "label": "FOK",
      "value": "Fill-or-kill requires complete immediate execution.",
      "sourceIds": [
        "x425-defi-coinbase-orders"
      ],
      "id": "fok",
      "claimId": "order-time-in-force-fact-fok"
    }
  ],
  "prerequisites": [
    "limit-orders-onchain"
  ],
  "sections": [
    {
      "id": "example",
      "heading": "Keep the same limit and change the policy",
      "sourceIds": [
        "x425-defi-coinbase-orders",
        "x425-defi-dydx-orders"
      ],
      "paragraphs": [
        "Suppose a buy order requests 10 A at no more than 100 B each, but only 6 A are immediately available within that price. An IOC can buy six and cancel four. An FOK would cancel rather than accept the incomplete fill. A persistent limit order can retain the remaining four if its rules allow.",
        "These differences come from the order policy, not a different limit price."
      ]
    },
    {
      "id": "expiry",
      "heading": "Persistent does not mean permanent",
      "sourceIds": [
        "x425-defi-coinbase-orders",
        "x425-defi-dydx-orders"
      ],
      "paragraphs": [
        "A venue can impose maximum lifetimes, maintenance rules or explicit expiry dates. The retrieved dYdX guide describes good-til-date behavior; do not assume a GTC label on another venue maps to the same implementation."
      ]
    },
    {
      "id": "state",
      "heading": "Read filled and remaining quantities",
      "sourceIds": [
        "x425-defi-dydx-screen",
        "x425-defi-dydx-orders"
      ],
      "paragraphs": [
        "A cancelled status can coexist with earlier partial fills. Reconcile the executed amount and remaining amount before resubmitting, otherwise a replacement order can exceed the intended total. FOK, IOC and post-only are separate constraints and may not be offered in every combination."
      ]
    }
  ],
  "faq": [
    {
      "question": "Does IOC mean the whole order must fill?",
      "answer": "No. IOC permits an immediate partial fill. FOK is the all-or-nothing immediate policy where supported.",
      "sourceIds": [
        "x425-defi-coinbase-orders",
        "x425-defi-dydx-orders"
      ]
    }
  ],
  "claims": [
    {
      "id": "order-time-in-force-quick-answer",
      "articleSlug": "order-time-in-force",
      "statement": "Time in force describes how long an order remains eligible and what happens to unfilled quantity. GTC means good until cancelled, subject to venue rules; IOC immediately fills what it can and cancels the rest; FOK requires the entire order to fill immediately or cancels it. Supported policies and expiry limits vary by venue.",
      "sourceIds": [
        "source-a450844a7ee115f1",
        "source-a2545baf2d42e7b4"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-a450844a7ee115f1",
          "locator": "Time in force; post only; fill or kill"
        },
        {
          "sourceId": "source-a2545baf2d42e7b4",
          "locator": "Market; Limit; Stop; Take Profit; execution policies"
        }
      ],
      "scope": {
        "collection": "defi",
        "dataAsOf": "2026-10-02",
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T19:18:00.092Z",
        "reviewer": "Independent automated verification — Codex root, separate from the DeFi drafting agent",
        "notes": [
          "Checked Coinbase API GTC/IOC/FOK and current dYdX GTD distinction; IOC6 of10 versus FOK0 if only6 executable."
        ]
      }
    },
    {
      "id": "order-time-in-force-fact-ioc",
      "articleSlug": "order-time-in-force",
      "statement": "IOC: Partial execution is permitted; the unfilled remainder is cancelled.",
      "sourceIds": [
        "source-a2545baf2d42e7b4"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-a2545baf2d42e7b4",
          "locator": "Market; Limit; Stop; Take Profit; execution policies"
        }
      ],
      "scope": {
        "collection": "defi",
        "dataAsOf": "2026-10-02",
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T19:18:00.092Z",
        "reviewer": "Independent automated verification — Codex root, separate from the DeFi drafting agent",
        "notes": [
          "Checked Coinbase API GTC/IOC/FOK and current dYdX GTD distinction; IOC6 of10 versus FOK0 if only6 executable."
        ]
      }
    },
    {
      "id": "order-time-in-force-fact-gtd",
      "articleSlug": "order-time-in-force",
      "statement": "GTD: dYdX documents orders that expire at a specified date.",
      "sourceIds": [
        "source-a2545baf2d42e7b4"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-a2545baf2d42e7b4",
          "locator": "Market; Limit; Stop; Take Profit; execution policies"
        }
      ],
      "scope": {
        "collection": "defi",
        "dataAsOf": "2026-10-02",
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T19:18:00.092Z",
        "reviewer": "Independent automated verification — Codex root, separate from the DeFi drafting agent",
        "notes": [
          "Checked Coinbase API GTC/IOC/FOK and current dYdX GTD distinction; IOC6 of10 versus FOK0 if only6 executable."
        ]
      }
    },
    {
      "id": "order-time-in-force-fact-fok",
      "articleSlug": "order-time-in-force",
      "statement": "FOK: Fill-or-kill requires complete immediate execution.",
      "sourceIds": [
        "source-a450844a7ee115f1"
      ],
      "sourceLocators": [
        {
          "sourceId": "source-a450844a7ee115f1",
          "locator": "Time in force; post only; fill or kill"
        }
      ],
      "scope": {
        "collection": "defi",
        "dataAsOf": "2026-10-02",
        "blockHeight": null
      },
      "qualification": "",
      "evidenceStatus": "documented",
      "verification": {
        "status": "verified",
        "method": "independent automated source review",
        "checkedAt": "2026-10-02T19:18:00.092Z",
        "reviewer": "Independent automated verification — Codex root, separate from the DeFi drafting agent",
        "notes": [
          "Checked Coinbase API GTC/IOC/FOK and current dYdX GTD distinction; IOC6 of10 versus FOK0 if only6 executable."
        ]
      }
    }
  ],
  "sources": [
    {
      "id": "x425-defi-coinbase-orders",
      "label": "Create a new order",
      "publisher": "Coinbase Exchange",
      "url": "https://docs.cdp.coinbase.com/api-reference/exchange-api/rest-api/orders/create-new-order",
      "locator": "Time in force; post only; fill or kill",
      "note": "General order policy example; not a claim these policies exist on every DEX.",
      "version": "Documentation retrieved 2026-10-02; hash recorded",
      "checkedAt": "2026-10-02T19:02:00.071Z",
      "contentSha256": "02d626e24b912f2793248d016e236553ba45f54c7e0d81575a6eb4161b4e304f",
      "recordId": "source-a450844a7ee115f1"
    },
    {
      "id": "x425-defi-dydx-orders",
      "label": "Perpetual order types on dYdX Chain",
      "publisher": "dYdX Operations Services",
      "url": "https://help.dydx.trade/en/articles/166981-perpetual-order-types-on-dydx-chain",
      "locator": "Market; Limit; Stop; Take Profit; execution policies",
      "note": "Order-type semantics and dYdX-specific constraints.",
      "version": "Documentation retrieved for the 2026-10-02 editorial scope; content hash recorded",
      "checkedAt": "2026-10-02T18:53:20.714Z",
      "contentSha256": "d1438931924b074c70b146b951a4f3257795a24a3f764d4e31993b9325aa91a9",
      "recordId": "source-a2545baf2d42e7b4"
    },
    {
      "id": "x425-defi-dydx-screen",
      "label": "Interface of the Trade tab",
      "publisher": "dYdX Operations Services",
      "url": "https://help.dydx.trade/en/articles/166979-interface-of-the-trade-tab",
      "locator": "Orderbook; Position information; Stats",
      "note": "Definition and presentation of trading market metrics.",
      "version": "Documentation retrieved for the 2026-10-02 editorial scope; content hash recorded",
      "checkedAt": "2026-10-02T18:53:20.712Z",
      "contentSha256": "2548899a309c289e661f6f554a87ca26b9889d83ae3ac3cb9035ef8af84c7063",
      "recordId": "source-08e71d7fe0f46d5d"
    }
  ],
  "related": {
    "articles": [
      "order-book-depth-spread",
      "post-only-orders",
      "reduce-only-orders"
    ],
    "dossiers": [],
    "wallets": []
  },
  "revisionHistory": [
    {
      "date": "2026-10-02",
      "kind": "published",
      "summary": "First publication after primary-source research and separate automated verification."
    }
  ],
  "citation": "Degrees of Satoshi editorial project. “Order time in force: GTC, IOC and fill-or-kill.” Published 2026-10-02; updated 2026-10-02. https://degreesofsatoshi.com/encyclopedia/order-time-in-force/"
}
