pub fn trigger_order_to_derive_payload(
order: &OrderAny,
instrument: &DeriveInstrument,
subaccount_id: u64,
wallet: Address,
signer: &PrivateKeySigner,
nonce: u64,
signature_expiry_sec: i64,
module_address: Address,
domain_separator: B256,
action_typehash: B256,
max_fee: Decimal,
explicit_price: Option<Decimal>,
conn_id: impl Into<String>,
order_id: impl Into<String>,
) -> Result<DeriveTriggerOrderParams>Expand description
Builds typed params for a signed private/trigger_order request.
Derive stores trigger orders off-book until the venue trigger worker
submits the signed child order. conn_id and order_id are client-supplied
fields required by the WebSocket-only endpoint.
ยงErrors
Returns an error when the order is not one of StopMarket, StopLimit, MarketIfTouched, or LimitIfTouched, when the trigger source is not MarkPrice, when required prices are absent, or when EIP-712 signing fails.