nautechsystems/nautilus_trader · error · anyhow::Error
AT_THE_OPEN time in force is not supported by Hyperliquid
Error message
AT_THE_OPEN time in force is not supported by Hyperliquid
What it means
nautilus_time_in_force_to_hyperliquid cannot map an AtTheOpen time-in-force; Hyperliquid has no auction/Opening TIF concept, so this Nautilus TIF variant has no equivalent and the conversion is rejected.
Source
Thrown at crates/adapters/hyperliquid/src/common/converters.rs:259
///
/// Returns an error if the time in force is not supported (e.g. FOK).
pub fn nautilus_time_in_force_to_hyperliquid(
tif: TimeInForce,
) -> anyhow::Result<HyperliquidTimeInForce> {
match tif {
TimeInForce::Gtc => Ok(HyperliquidTimeInForce::Gtc),
TimeInForce::Ioc => Ok(HyperliquidTimeInForce::Ioc),
TimeInForce::Fok => {
anyhow::bail!("FOK time in force is not supported by Hyperliquid")
}
TimeInForce::Gtd => {
anyhow::bail!("GTD time in force is not supported by Hyperliquid")
}
TimeInForce::Day => {
anyhow::bail!("DAY time in force is not supported by Hyperliquid")
}
TimeInForce::AtTheOpen => {
anyhow::bail!("AT_THE_OPEN time in force is not supported by Hyperliquid")
}
TimeInForce::AtTheClose => {
anyhow::bail!("AT_THE_CLOSE time in force is not supported by Hyperliquid")
}
}
}
/// Converts a Hyperliquid time in force to a Nautilus `TimeInForce`.
pub fn hyperliquid_time_in_force_to_nautilus(hl_tif: HyperliquidTimeInForce) -> TimeInForce {
match hl_tif {
HyperliquidTimeInForce::Gtc => TimeInForce::Gtc,
HyperliquidTimeInForce::Ioc
| HyperliquidTimeInForce::FrontendMarket
| HyperliquidTimeInForce::LiquidationMarket => TimeInForce::Ioc,
HyperliquidTimeInForce::Alo => TimeInForce::Gtc,
}
}
View on GitHub (pinned to 18893faf8b)
Solutions
- Use a market or limit order with IOC/GTC timed by your own logic instead of AT_THE_OPEN.
- Schedule submission for the desired open time and use GTC/IOC.
- Reject AT_THE_OPEN orders at order construction for crypto venues.
Example fix
// before let tif = TimeInForce::AtTheOpen; // after let tif = TimeInForce::Ioc; // submit at your intended time instead
Defensive patterns
Strategy: validation
Validate before calling
fn hyperliquid_tif_ok(tif: TimeInForce) -> bool {
matches!(tif, TimeInForce::Gtc | TimeInForce::Ioc)
}
assert!(hyperliquid_tif_ok(order.time_in_force())); Try / catch
let hl_tif = nautilus_time_in_force_to_hyperliquid(tif)
.unwrap_or(HyperliquidTimeInForce::Gtc); // schedule submission timing yourself Prevention
- Implement open/close timing in strategy logic, not via TIF.
- Block AtTheOpen/AtTheClose in crypto venue order builders.
- Audit ported equity strategies for equity-only TIF values.
When it happens
Trigger: Converting TimeInForce::AtTheOpen via nautilus_time_in_force_to_hyperliquid when submitting an order to Hyperliquid.
Common situations: Porting equity strategies (opening auctions) to crypto; copy-pasted TimeInForce values from other adapters.
Related errors
- FOK time in force is not supported by Hyperliquid
- GTD time in force is not supported by Hyperliquid
- DAY time in force is not supported by Hyperliquid
- AT_THE_CLOSE time in force is not supported by Hyperliquid
- FOK time in force is not supported by Hyperliquid
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/b1b35f491f8c46b7.
Report an issue: GitHub.