Skip to main content

Create order

POST /api/orders/create

Create a new trading order.
account_id
integer
required
Account to place the order for.
symbol
string
required
Trading symbol (e.g. BTC, ETH).
name
string
required
Human-readable order name.
side
string
required
Order side: buy or sell.
order_type
string
required
Order type: market or limit.
price
number
Limit price. Required for limit orders.
quantity
number
required
Order quantity in base asset units.
Example request
curl -X POST https://api.hyperoru.com/api/orders/create \
  -H "Content-Type: application/json" \
  -d '{"account_id": 1, "symbol": "BTC", "name": "Long BTC", "side": "buy", "order_type": "market", "quantity": 0.01}'
Example response
{
  "id": 42,
  "account_id": 1,
  "symbol": "BTC",
  "side": "buy",
  "order_type": "market",
  "quantity": 0.01,
  "status": "pending"
}

Pending orders

GET /api/orders/pending

List all orders with pending status. Example request
curl https://api.hyperoru.com/api/orders/pending
Example response
[
  { "id": 42, "symbol": "BTC", "side": "buy", "status": "pending", "quantity": 0.01 }
]

User orders

GET /api/orders/user/

List all orders for a specific user.
user_id
integer
required
User ID.
Example request
curl https://api.hyperoru.com/api/orders/user/1
Example response
[
  { "id": 42, "account_id": 1, "symbol": "BTC", "side": "buy", "status": "pending" }
]

Account orders

GET /api/orders/account/

List all orders for a specific account.
account_id
integer
required
Account ID.
Example request
curl https://api.hyperoru.com/api/orders/account/1
Example response
[
  { "id": 42, "symbol": "BTC", "side": "buy", "status": "executed" }
]

Execute order

POST /api/orders/execute/

Manually execute a pending order on the exchange.
order_id
integer
required
Order ID.
Example request
curl -X POST https://api.hyperoru.com/api/orders/execute/42
Example response
{
  "status": "ok",
  "order_id": 42,
  "execution_status": "filled"
}

Cancel order

POST /api/orders/cancel/

Cancel a pending order.
order_id
integer
required
Order ID.
Example request
curl -X POST https://api.hyperoru.com/api/orders/cancel/42
Example response
{
  "status": "ok",
  "order_id": 42
}

Process all

POST /api/orders/process-all

Execute all pending orders in queue. Example request
curl -X POST https://api.hyperoru.com/api/orders/process-all
Example response
{
  "processed": 5,
  "succeeded": 4,
  "failed": 1
}

Order details

GET /api/orders/order/

Get full details of a specific order.
order_id
integer
required
Order ID.
Example request
curl https://api.hyperoru.com/api/orders/order/42
Example response
{
  "id": 42,
  "account_id": 1,
  "symbol": "BTC",
  "name": "Long BTC",
  "side": "buy",
  "order_type": "market",
  "quantity": 0.01,
  "status": "filled",
  "filled_price": 68500.0,
  "created_at": "2026-04-09T10:00:00Z",
  "executed_at": "2026-04-09T10:00:05Z"
}

Orders health

GET /api/orders/health

Check the health of the order processing system. Example request
curl https://api.hyperoru.com/api/orders/health
Example response
{
  "status": "ok",
  "statistics": {
    "pending_orders": 3
  }
}