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-api-key: <api-key>' \
  --data '
{
  "order_type": "LIMIT",
  "time_in_force": "FOK",
  "qty": 123,
  "buy_flag": true,
  "subaccount_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "price": 0.5,
  "river_id": 123,
  "custom_asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "expiry_ts_utc": "2023-11-07T05:31:56Z",
  "conditional_orders_params": [
    {
      "conditional_order_type": "TP",
      "trigger_order": {
        "order_type": "LIMIT",
        "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": {}
}

Authorizations

x-api-key
string
header
required

API key for programmatic access. Generate one at app.rivermarkets.com under Settings → API Keys.

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
river_id
integer | null

Instrument ID. Mutually exclusive with custom_asset_id.

custom_asset_id
string<uuid> | null

Custom 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