Skip to main content

map_time_in_force

Function map_time_in_force 

Source
pub fn map_time_in_force(
    order_type: BybitOrderType,
    time_in_force: Option<TimeInForce>,
    post_only: Option<bool>,
) -> Result<Option<BybitTimeInForce>, TimeInForce>
Expand description

Maps Nautilus time-in-force to Bybit’s TIF.

GTD maps to GTC. Market orders omit TIF; post-only limit orders use PostOnly.

§Errors

Returns an error if the time in force is unsupported, including for market and post-only orders. The error contains the unsupported value.