Strategy · 6 min read

GTC vs FOK on Polymarket -- when to use each order type

Decision tree for choosing Good-Till-Cancelled vs Fill-Or-Kill on the Polymarket CLOB, with fee math and practical entry patterns.

The two order types

The Polymarket CLOB supports two time-in-force values for orders:

  • GTC (Good-Till-Cancelled): the order rests on the book until it fills, you cancel it, or the market resolves.
  • FOK (Fill-Or-Kill): the order must fill in its entirety immediately, or it is rejected outright. There is no partial fill.

Polymarket also has GTD (Good-Till-Date), but GTC and FOK cover most bot use cases.

Fee difference

GTC orders that rest on the book are treated as maker orders. Maker fee is 0% with possible rebates. GTC orders that cross the spread immediately are treated as taker orders and pay the full fee.

FOK orders are always taker orders -- they must hit existing resting liquidity to fill, so they always pay taker fees.

For a 5-minute BTC binary at p=0.50, the taker fee peaks at ~1.56% per side. If you enter and exit both as taker, you are already down 3.12% before the market moves. That is a steep hole to climb out of.

function estimateTakerFee(shares: number, price: number, feeRate = 0.25, exponent = 2): number {
  return shares * feeRate * price * Math.pow(price * (1 - price), exponent)
}

// At p=0.50: ~1.56% fee
console.log(estimateTakerFee(100, 0.50)) // ~3.906 on a $50 outlay

Decision tree

Is the orderbook thin (best ask - best bid > $0.04)? YES → use GTC at your target price, wait for a fill NO → Do you have a strong directional signal (momentum, imbalance)? YES → FOK at best ask, accept taker fee, move fast NO → GTC at mid-price, wait or skip

The key insight: FOK makes sense only when speed matters more than fee. If you have a signal that goes stale in seconds (e.g. a sharp Binance move), a GTC at mid-price that rests for 30 seconds is worse than a FOK at best ask that fills now.

GTC for contrarian positions

The contrarian bot builds a resting GTC bid below the current mid-price, waiting for an over-reaction to push the market down to its limit. This is the classic maker strategy: provide liquidity, collect rebates, let price come to you.

import { ClobClient, Side, TimeInForce } from '@polymarket/clob-client'

async function placeMakerBid(
  client: ClobClient,
  tokenId: string,
  price: number,
  shares: number,
) {
  return client.createOrder({
    tokenID: tokenId,
    price,
    side: Side.BUY,
    size: shares,
    timeInForce: TimeInForce.GTC,
    feeRateBps: 0,
    nonce: 0,
    expiration: 0,
  })
}

FOK for directional entries

When poly5m-v4 detects a momentum signal (multi-exchange median moving strongly in one direction, volume imbalance above threshold), it fires a FOK at the best ask. If the best ask has moved and there is not enough liquidity, the order rejects and the bot simply skips the trade rather than chasing the price.

async function placeDirectionalEntry(
  client: ClobClient,
  tokenId: string,
  bestAsk: number,
  shares: number,
) {
  const order = await client.createOrder({
    tokenID: tokenId,
    price: bestAsk,
    side: Side.BUY,
    size: shares,
    timeInForce: TimeInForce.FOK,
    feeRateBps: 0,
    nonce: 0,
    expiration: 0,
  })
  // FOK rejects silently if unfillable -- check the response
  if (!order || !order.orderID) {
    console.log('FOK rejected, skipping trade')
    return null
  }
  return order
}

Avoiding GTC accumulation

A common mistake is firing GTC orders and forgetting them. If your signal flips, you can end up with resting bids you no longer want. Always cancel open GTC orders on strategy exit or on heartbeat timeout.

async function cancelAllOpen(client: ClobClient) {
  const openOrders = await client.getOpenOrders()
  if (openOrders.length === 0) return
  await client.cancelOrders(openOrders.map((o) => o.orderID))
}

Summary

| Situation | Order type | Why | |---|---|---| | Thin book, no urgency | GTC at limit | Maker rebate, no fee drag | | Strong signal, tight book | FOK at best ask | Speed over cost | | Over-reaction, contrarian entry | GTC below mid | Let price come to you | | Unknown signal quality | Skip or GTC at mid | Avoid bleeding fees |

Related bots