Skip to main content
POST
/
v1
/
orders
Create Order
curl --request POST \
  --url https://api.rivermarkets.com/v1/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 '
{
  "qty": 123,
  "buy_flag": true,
  "subaccount_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "price": 0.5,
  "post_only": false,
  "river_id": 123,
  "generic_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "expiry_ts_utc": "2023-11-07T05:31:56Z",
  "conditional_orders_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"
    }
  ]
}
'
{
  "river_order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "complex_orders": {}
}

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

Schema for creating a new order.

order_type
enum<string>
required

Order type: 'LIMIT' or 'MARKET'

Available options:
LIMIT,
MARKET
time_in_force
enum<string>
required

Time in force: 'FOK', 'GTC', 'GTD', or 'IOC'

Available options:
FOK,
GTC,
GTD,
IOC
qty
number
required

Order quantity (number of contracts)

buy_flag
boolean
required

Order direction: true=buy, false=sell

subaccount_id
string<uuid>
required

Subaccount to place the order under

price
number | null

Limit price between 0 and 1. Required for LIMIT orders.

Required range: 0 < x < 1
post_only
boolean
default:false

If true, the order is rejected instead of taking liquidity. Only valid for LIMIT orders with a resting time in force (GTC or GTD).

river_id
integer | null

Instrument ID. Mutually exclusive with generic_asset_id.

generic_asset_id
string<uuid> | null

Generic asset basket UUID. Mutually exclusive with river_id.

expiry_ts_utc
string<date-time> | null

Expiry timestamp in UTC(ISO 8601). Required for GTD orders. i.e '2023-11-07T05:31:56Z'

conditional_orders_params
ConditionalOrderCreate · object[] | null

Optional list of conditional orders (TP/SL) to attach to this order.

Response

Successful Response

Schema for order create response.

river_order_id
string<uuid>
required

Unique order identifier

complex_orders
Complex Orders · object
required

List of complex river orders id