๐Ÿ”Œ API & Developers

Hyperliquid API Limit Order TIF: Gtc, Ioc, and Alo in the Order Action (2026)

โš ๏ธ Disclosure: Some links on this page are affiliate links. If you sign up through them, I may earn a commission โ€” at no extra cost to you. I only review tools I actually use.
For limit orders submitted to the Hyperliquid exchange endpoint, the tif field controls what happens when the order first reaches the order book. As of 2026-11-13, the documented encoded values are Gtc, Ioc, and Alo.

What each TIF value does

Encoded valueMeaningBehavior when the limit order first hits the book
GtcGood til canceledNo special TIF behavior
IocImmediate or cancelThe unfilled part is canceled instead of resting
AloAdd liquidity only, also described as post onlyThe order is canceled instead of immediately matching
Use Gtc when you do not want the order to be canceled by TIF at first hit. Use Ioc when you want any available liquidity to fill immediately and the remainder to be canceled. Use Alo when you want to add liquidity only and avoid immediate matching.

Source: Hyperliquid exchange endpoint documentation.

How tif is encoded in the order action

Orders are sent to POST https://api.hyperliquid.xyz/exchange with a JSON body. In the action.orders array, the order type is encoded in the t field. For a limit order, use:

"t": {
  "limit": {
    "tif": "Gtc"
  }
}

Replace "Gtc" with "Ioc" or "Alo" as needed. The case matters: the documented encoded strings are Gtc, Ioc, and Alo.

A reference limit-order action body is:

{
  "type": "order",
  "orders": [
    {
      "a": 0,
      "b": false,
      "p": "1890.0",
      "s": "0.02",
      "r": false,
      "t": {
        "limit": {
          "tif": "Alo"
        }
      },
      "c": "0x1234567890abcdef1234567890abcdef"
    }
  ]
}

๐Ÿ’ก Hyperliquid

Like what you're reading? Try it yourself โ€” this link supports ChartedTrader at no cost to you.

Join Hyperliquid and get a 4% fee discount on the first $25M of volume; Vaults and sub-accounts are excluded. โ†’
๐ŸŽ You receive: 4% fee discount on first $25M volume ยท per account, lifetime

Key meanings from the documentation:

The full signed request also includes nonce and signature. The Hyperliquid Python SDK can be used to generate signatures for exchange-endpoint requests. The examples above are reference request structures, not live test output.

Python-style action object

If you are building the request in Python, the order action can be represented as a dictionary before signing:

order_action = {
    "type": "order",
    "orders": [
        {
            "a": 0,
            "b": False,
            "p": "1890.0",
            "s": "0.02",
            "r": False,
            "t": {
                "limit": {
                    "tif": "Gtc"
                }
            },
            "c": "0x1234567890abcdef1234567890abcdef"
        }
    ]
}

This structure shows where tif belongs. The signed request body must still include the required nonce and signature fields.

Source

Affiliate disclosure

The Hyperliquid link below is a referral link. If you sign up, I may receive a trading-fee commission. The linked referral page lists a 4% fee discount for the first $25M of volume per account; Vaults and sub-accounts are excluded.

Join Hyperliquid

Continue with Hyperliquid

Browse the Hyperliquid guide hub for the complete user journey.

๐Ÿงฎ Free Hyperliquid calculators

Fee Calculator โ†’
Hyperliquid vs centralized exchange fee comparison
PnL & Liquidation โ†’
Perp PnL + liquidation price
Position Size โ†’
Risk-aware position sizing for HL perps
Hyperliquid

Ready to get started? Use the link below โ€” it helps support ChartedTrader at no cost to you.

Join Hyperliquid and get a 4% fee discount on the first $25M of volume; Vaults and sub-accounts are excluded. โ†’
๐ŸŽ You receive: 4% fee discount on first $25M volume ยท per account, lifetime
๐Ÿ“ˆ

About the author

I'm a systematic trader running live strategies on IB (USDJPY momentum) and Hyperliquid (crypto perps). Every tool reviewed here is something I've used with real capital. Questions? Reach out.

๐Ÿ“š Related Articles

๐Ÿ“–
Guides

Hyperliquid Order Types Explained (2026)

How Hyperliquid market, limit, Post Only and IOC orders execute, with a corrected spread example and the limits of stop-loss protection.

July 17, 2026 โฑ 6 min read
๐Ÿ”Œ
API & Developers

Hyperliquid Python SDK Tutorial: Build a Bot (2026)

Build a production-ready trading bot on Hyperliquid using the official Python SDK. Covers API wallet security, order execution, WebSocket feeds, and common pitfalls to avoid.

May 6, 2026 โฑ 12 min read
๐Ÿ”Œ
API & Developers

Hyperliquid API Error Responses: Troubleshooting Guide (2026)

Hyperliquid exchange responses can return HTTP 200 with per-order errors in the JSON envelope. This guide explains batched statuses, pre-validation errors, and signature debugging.

July 14, 2026 โฑ 12 min read