Skip to main content

handle_ws_place_order

Function handle_ws_place_order 

Source
async fn handle_ws_place_order(
    state: &WsState,
    order_sender: &Sender<UnifiedEngineRequest>,
    wallet_str: &str,
    symbol: &str,
    side_str: &str,
    size_str: &str,
    price_str: &str,
    tif_str: Option<&str>,
    client_id: Option<&str>,
    nonce: u64,
    signature: &str,
    mmp_enabled: bool,
    builder_code_address: Option<&str>,
) -> Result<WsOrderResult, String>
Expand description

Handle a PlaceOrder message received via WebSocket.

Replicates the core logic of the REST place_order / process_single_order handlers: signature recovery, agent authorization, validation, engine dispatch, and response mapping.