Moonbase Docs

Get all orders from database

Get complete order history from database including both active and historical orders. Database query.

Returns all orders regardless of status (open, pending, partially filled, completed, canceled, rejected).

Requires authentication.

GET
/api/v1/orders/archived
NOVA-KEY<token>

In: header

NOVA-SECRET<token>

In: header

Query Parameters

product_ids?array<string>

Filter results by product_ids. If not provided (or empty), orders are returned across all products (no product filter).

start_time?string

Filter by minimum posted UNIX timestamp.

Formatuint64
end_time?string

Filter by maximum posted UNIX timestamp.

Formatuint64
limit?integer

Limit on number of results. Max limit is 1000

Formatint64
statuses?array<string>

Filter results by order status.

  • SUBMITTED: Order has been submitted and is being processed
  • ACTIVE: Order is active on the book
  • DONE: Order is completed (filled or canceled)
  • SCHEDULED: Order is scheduled/waiting for trigger (for stop/scheduled orders)
sorted_by?string

Sort the results using the given field. Supported values :created_at (sort by created_at asc), -created_at (sort by created_at desc), updated_at (sort by updated_at asc), -updated_at (sort by updated_at desc).

client_order_ids?array<string>

Filter by client_order_id (case-insensitive).

Response Body

application/json

application/json

curl -X GET "https://api.moonbase.vn/api/v1/orders/archived"
{
  "orders": [
    {
      "order_id": "string",
      "client_order_id": "string",
      "user_id": "string",
      "status": "SUBMITTED",
      "done_reason": "string",
      "product_id": "string",
      "side": "BUY",
      "type": "LIMIT",
      "time_in_force": "GTC",
      "post_only": "false",
      "stp": "CANCEL_TAKER",
      "limit_price": "string",
      "base_size": "string",
      "quote_size": "string",
      "exact_quote_size": "string",
      "average_fill_price": "string",
      "filled_base_size": "string",
      "filled_quote_size": "string",
      "maker_fee_rate": "string",
      "taker_fee_rate": "string",
      "fee_asset_id": "string",
      "created_at": "string",
      "updated_at": "string",
      "cancel_requested_at": "string",
      "expired_at": "string",
      "scheduled_at": "string",
      "trades": [
        {
          "id": "string",
          "price": "string",
          "size": "string",
          "liquidity_indicator": "MAKER",
          "time": "string",
          "fee_asset": "string",
          "fee_amount": "string"
        }
      ]
    }
  ]
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string",
      "property1": null,
      "property2": null
    }
  ]
}