Orders

Create bulk orders

Changed on

Creates multiple orders in a single request, up to 1000. Note that a successful call to this endpoint does not necessarily mean your orders have been accepted, e.g. a downstream venue might reject your order. You should therefore utilize our WebSocket APIs to listen for changes in order lifecycle events.

The response will contain an array of objects, indicating whether your order was submitted. If the order was submitted, the order_id field will be populated with the order ID assigned to this order. If the order was rejected, the reason field will be populated with the reason for rejection. The data array returned in the response object is guaranteed to be ordered in the same order as the orders you provided in the request. Again, note that even if your order was submitted, that doesn't mean it was accepted, and may still be rejected by downstream venues.

post/accounts/{account_id}/bulk-orders

Request

  • Base URL
    https://api.clearstreet.io/studio/v2
  • Auth
    HTTP bearer

Path parameters

account_idstring required

Account ID for the account.

Example:100000

Request body

Example request

{
  "orders": [
    {
      "reference_id": "my-order-id-123",
      "quantity": "100",
      "price": "123.99",
      "stop_price": "123.99",
      "symbol": "AAPL",
      "strategy": {
        "min_percent": 1,
        "max_percent": 35
      }
    }
  ]
}

Response

Orders received. Indicates the orders were received and are pending further processing.

submittedinteger required

Total number of orders submitted

rejectedinteger required

Total number of orders rejected

Example response

{
  "data": [
    {
      "order_id": "12390213"
    }
  ]
}

Changes

    • breaking

      request property // was restricted to a list of enum values

    • breaking

      the // request property type changed from no type to string

    • info

      added the new close enum value to the request property //

    • info

      added the new open enum value to the request property //

    • breaking

      removed the enum value close of the request property //

    • breaking

      removed the enum value open of the request property //

    • breaking

      the // request property type changed from string to no type