pub fn time_in_force_to_proto(tif: TimeInForce) -> TimeInForceExpand description
Converts Nautilus TimeInForce to dYdX proto TimeInForce.
dYdX v4 protocol mappings:
IOC→ProtoTimeInForce::Ioc(Immediate or Cancel)FOK→ProtoTimeInForce::FillOrKill(Fill or Kill)GTC→ProtoTimeInForce::Unspecified(Good Till Cancel - protocol default)GTD→ProtoTimeInForce::Unspecified(Good Till Date - usesgood_til_block_timeorgood_til_block)- Others →
ProtoTimeInForce::Unspecified(protocol default)
Note: Unspecified (proto enum value 0) is the protocol default and represents GTC behavior.
GTD orders specify expiration separately via good_til_block or good_til_block_time fields.
For post-only orders, use time_in_force_to_proto_with_post_only() which returns ProtoTimeInForce::PostOnly.