Skip to main content

Module orders

Module orders 

Source
Expand description

Resource methods for the orders API group.

§Operations

MethodOpPath
GETlist_orders/accounts/{accid}/orders
POSTplace_order/accounts/{accid}/orders
PUTmodify_order/accounts/{accid}/orders/{order_id}
PUTactivate_order/accounts/{accid}/orders/{order_id}/activate
DELETEcancel_order/accounts/{accid}/orders/{order_id}

§204 No Content (list_orders)

GET /accounts/{accid}/orders is documented to return 204 with no body when there are no orders. The base Client::get surfaces an empty body as Error::Decode; Client::list_orders maps that specific case to an empty Vec, mirroring the Client::get_tradable_info precedent.

§Body-less PUT (activate_order)

activate_order has no documented request body — we use Client::put_empty so the wire request omits Content-Type and sends a zero-length payload (precedent: login::refresh_session).

§Multi-account / multi-order paths

The Nordnet API path slots accept comma-separated lists of IDs (e.g. /accounts/1,2,3/orders). The typed surface here stays single-id by default — Phase 4 (or callers) can build comma lists into a String and supply it via a future helper if needed.