My App

Create a group of orders

Creates a group of related orders on the exchange. Currently supports BRACKET orders (main order with linked take-profit and stop-loss orders). All orders in the group must trade the same product and be cryptographically signed.

Requires authentication.

POST
/orders/group
OBSIDIAN-KEY<token>

In: header

OBSIDIAN-SECRET<token>

In: header

group_type?string

Type of order group. Currently only BRACKET is supported.

Default"ORDER_GROUP_TYPE_BRACKET"
Value in"ORDER_GROUP_TYPE_BRACKET"
orders?

List of orders to be created as a group. For BRACKET orders, typically includes main order, take-profit, and stop-loss orders.

wait?boolean

Response Body

application/json

application/json

curl -X POST "https://api.dev.obsidian.exchange/orders/group" \  -H "Content-Type: application/json" \  -d '{}'
{
  "orders": [
    {
      "id": "string",
      "product_id": "string",
      "side": "BUY",
      "type": "LIMIT",
      "size": "string",
      "price": "string",
      "sender": "string",
      "nonce": "string",
      "stp": "CANCEL_TAKER",
      "post_only": true,
      "time_in_force": "GTC",
      "reduce_only": true,
      "status": "PENDING",
      "done_reason": "string",
      "stop_price": "string",
      "stop_price_option": "NONE",
      "order_stop_type": "STOP_NONE",
      "is_liquidation": true,
      "liquidation_fee_rate": "string",
      "maker_fee_rate": "string",
      "taker_fee_rate": "string",
      "filled_size": "string",
      "avg_price": "string",
      "total_fees_usd": "string",
      "created_at": "string",
      "updated_at": "string",
      "cancel_requested_at": "string",
      "expired_at": "string",
      "scheduled_at": "string",
      "client_order_id": "string",
      "cancel_requested": true,
      "initial_margin": "string",
      "last_trades": [
        {
          "id": "string",
          "price": "string",
          "size": "string",
          "liquidity_indicator": "MAKER",
          "time": "string",
          "funding_payment": "string",
          "trading_fee": "string",
          "sequencer_fee": "string"
        }
      ],
      "sender_name": "string"
    }
  ]
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string",
      "property1": null,
      "property2": null
    }
  ]
}