POST
/
v1
/
algo
/
order
curl --request POST \
  --url https://api-evm.orderly.org/v1/algo/order \
  --header 'Content-Type: application/json' \
  --header 'orderly-account-id: <orderly-account-id>' \
  --header 'orderly-key: <orderly-key>' \
  --header 'orderly-signature: <orderly-signature>' \
  --header 'orderly-timestamp: <orderly-timestamp>' \
  --data '[
  {
    "symbol": "PERP_ETH_USDC",
    "algo_type": "BRACKET",
    "quantity": 0.0032,
    "side": "BUY",
    "type": "LIMIT",
    "price": 3415.9,
    "child_orders": [
      {
        "symbol": "PERP_ETH_USDC",
        "algo_type": "POSITIONAL_TP_SL",
        "child_orders": [
          {
            "symbol": "PERP_ETH_USDC",
            "algo_type": "TAKE_PROFIT",
            "side": "SELL",
            "type": "CLOSE_POSITION",
            "trigger_price": 3518.4,
            "reduce_only": true
          },
          {
            "symbol": "PERP_ETH_USDC",
            "algo_type": "STOP_LOSS",
            "side": "SELL",
            "type": "CLOSE_POSITION",
            "trigger_price": 3313.4,
            "reduce_only": true
          }
        ]
      }
    ]
  },
  {
    "symbol": "PERP_NEAR_USDC",
    "algo_type": "TP_SL",
    "quantity": 5.5,
    "trigger_price_type": "MARK_PRICE",
    "child_orders": [
      {
        "symbol": "PERP_NEAR_USDC",
        "algo_type": "TAKE_PROFIT",
        "side": "SELL",
        "type": "MARKET",
        "trigger_price": 3.365,
        "reduce_only": true
      },
      {
        "symbol": "PERP_NEAR_USDC",
        "algo_type": "STOP_LOSS",
        "side": "SELL",
        "type": "MARKET",
        "trigger_price": 3.36,
        "reduce_only": true
      }
    ]
  },
  {
    "symbol": "PERP_NEAR_USDC",
    "algo_type": "POSITIONAL_TP_SL",
    "trigger_price_type": "MARK_PRICE",
    "child_orders": [
      {
        "symbol": "PERP_NEAR_USDC",
        "algo_type": "TAKE_PROFIT",
        "side": "SELL",
        "type": "CLOSE_POSITION",
        "trigger_price_type": "MARK_PRICE",
        "trigger_price": 4.05,
        "reduce_only": true
      },
      {
        "symbol": "PERP_NEAR_USDC",
        "algo_type": "STOP_LOSS",
        "side": "SELL",
        "type": "CLOSE_POSITION",
        "trigger_price_type": "MARK_PRICE",
        "trigger_price": 3.95,
        "reduce_only": true
      }
    ]
  }
]'
{
  "success": true,
  "timestamp": 1702989203989,
  "data": {
    "order_id": 13,
    "client_order_id": "testclientid",
    "algo_type": "STOP",
    "quantity": 100.12
  }
}

Headers

orderly-timestamp
string
required
orderly-account-id
string
required
orderly-key
string
required
orderly-signature
string
required
x-recv-window
number

Use this parameter to control the timeout threshold for placing order, unit in miliseconds

Body

application/json
symbol
string
required
algo_type
string
required

STOP/TP_SL/POSITIONAL_TP_SL

type
string
required

LIMIT / MARKET, required if algo_type = STOP

quantity
number
required

For MARKET/ASK/BID order, if order_amount is given, it is not required. Not required if type is POSITIONAL_TP_SL.

side
string
required

SELL/BUY, required if STOP type

child_orders
object[]
required
client_order_id
string

36 length, accepts hyphen but cannot be the first character, default: null

price
number

Optional for TP_SL and POSTIONAL_TP_SL

trigger_price_type
string

Only MARK_PRICE is available for now.

trigger_price
number
reduce_only
boolean
visible_quantity
boolean

Default false

order_tag
string

Response

200 - application/json
OK
success
boolean
required
data
object
required
timestamp
integer