Skip to main content
POST
/
v1
/
complex-orders
Create Complex Order
curl --request POST \
  --url https://api.rivermarkets.com/v1/complex-orders \
  --header 'Content-Type: application/json' \
  --header 'X-River-Key-Id: <api-key>' \
  --header 'X-River-Signature: <api-key>' \
  --header 'X-River-Timestamp: <api-key>' \
  --data '
{
  "subaccount_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "river_id": 123,
  "generic_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "conditional_order_params": {
    "trigger_order": {
      "qty": 123,
      "buy_flag": true,
      "price": 0.5,
      "stop_order_price": 0.5
    },
    "stop_order_price": 0.5,
    "parent_river_order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "parent_complex_order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "iceberg_order_params": {
    "buy_flag": true,
    "total_qty": 123,
    "displayed_qty": 123,
    "limit_price": 123,
    "post_only": false,
    "reload_delay_s": 1800,
    "expiry_ts_utc": "2023-11-07T05:31:56Z"
  },
  "peg_order_params": {
    "buy_flag": true,
    "total_qty": 123,
    "limit_price": 123,
    "post_only": false,
    "expiry_ts_utc": "2023-11-07T05:31:56Z",
    "peg_min_stay_time_s": 1800
  }
}
'
{
  "complex_order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Documentation Index

Fetch the complete documentation index at: https://docs.rivermarkets.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-River-Key-Id
string
header
required

UUID of your API key (from Settings → API Keys).

X-River-Timestamp
string
header
required

Current unix seconds. Must be within 30s of server time.

X-River-Signature
string
header
required

Base64 Ed25519 signature over the canonical request: METHOD\nPATH\nSORTED_QUERY\nTIMESTAMP\nSHA256(body) hex. See /api-reference/authentication for the full recipe.

Body

application/json

Request body for creating a complex order.

Provide exactly one of conditional_order_params (TP/SL/STOP) or iceberg_order_params (iceberg). The active param block determines the complex_order_type.

subaccount_id
string<uuid>
required

Subaccount to create the order under

river_id
integer | null

Instrument ID. Mutually exclusive with generic_asset_id.

generic_asset_id
string<uuid> | null

Generic asset basket ID. Mutually exclusive with river_id.

conditional_order_params
ConditionalOrderCreate · object

Conditional order parameters (TP/SL/STOP)

iceberg_order_params
IcebergOrderParams · object

Iceberg order parameters

peg_order_params
PegOrderParams · object

Peg order parameters

Response

Successful Response

Schema for a complex order response (unified across all complex order types).

complex_order_id
string<uuid>
required

Unique complex order identifier