curl --request POST \
--url https://api.orderly.org/v1/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",
"order_type": "<string>",
"side": "<string>",
"client_order_id": "<string>",
"order_price": 123,
"order_quantity": 123,
"order_amount": 123,
"visible_quantity": 123,
"reduce_only": true,
"slippage": 123,
"order_tag": "enum:broker_b:GRID_PRO",
"level": 123,
"post_only_adjust": true
}
'import requests
url = "https://api.orderly.org/v1/order"
payload = {
"symbol": "PERP_ETH_USDC",
"order_type": "<string>",
"side": "<string>",
"client_order_id": "<string>",
"order_price": 123,
"order_quantity": 123,
"order_amount": 123,
"visible_quantity": 123,
"reduce_only": True,
"slippage": 123,
"order_tag": "enum:broker_b:GRID_PRO",
"level": 123,
"post_only_adjust": True
}
headers = {
"orderly-timestamp": "<orderly-timestamp>",
"orderly-account-id": "<orderly-account-id>",
"orderly-key": "<orderly-key>",
"orderly-signature": "<orderly-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'orderly-timestamp': '<orderly-timestamp>',
'orderly-account-id': '<orderly-account-id>',
'orderly-key': '<orderly-key>',
'orderly-signature': '<orderly-signature>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
symbol: 'PERP_ETH_USDC',
order_type: '<string>',
side: '<string>',
client_order_id: '<string>',
order_price: 123,
order_quantity: 123,
order_amount: 123,
visible_quantity: 123,
reduce_only: true,
slippage: 123,
order_tag: 'enum:broker_b:GRID_PRO',
level: 123,
post_only_adjust: true
})
};
fetch('https://api.orderly.org/v1/order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.orderly.org/v1/order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'symbol' => 'PERP_ETH_USDC',
'order_type' => '<string>',
'side' => '<string>',
'client_order_id' => '<string>',
'order_price' => 123,
'order_quantity' => 123,
'order_amount' => 123,
'visible_quantity' => 123,
'reduce_only' => true,
'slippage' => 123,
'order_tag' => 'enum:broker_b:GRID_PRO',
'level' => 123,
'post_only_adjust' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"orderly-account-id: <orderly-account-id>",
"orderly-key: <orderly-key>",
"orderly-signature: <orderly-signature>",
"orderly-timestamp: <orderly-timestamp>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.orderly.org/v1/order"
payload := strings.NewReader("{\n \"symbol\": \"PERP_ETH_USDC\",\n \"order_type\": \"<string>\",\n \"side\": \"<string>\",\n \"client_order_id\": \"<string>\",\n \"order_price\": 123,\n \"order_quantity\": 123,\n \"order_amount\": 123,\n \"visible_quantity\": 123,\n \"reduce_only\": true,\n \"slippage\": 123,\n \"order_tag\": \"enum:broker_b:GRID_PRO\",\n \"level\": 123,\n \"post_only_adjust\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("orderly-timestamp", "<orderly-timestamp>")
req.Header.Add("orderly-account-id", "<orderly-account-id>")
req.Header.Add("orderly-key", "<orderly-key>")
req.Header.Add("orderly-signature", "<orderly-signature>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.orderly.org/v1/order")
.header("orderly-timestamp", "<orderly-timestamp>")
.header("orderly-account-id", "<orderly-account-id>")
.header("orderly-key", "<orderly-key>")
.header("orderly-signature", "<orderly-signature>")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"PERP_ETH_USDC\",\n \"order_type\": \"<string>\",\n \"side\": \"<string>\",\n \"client_order_id\": \"<string>\",\n \"order_price\": 123,\n \"order_quantity\": 123,\n \"order_amount\": 123,\n \"visible_quantity\": 123,\n \"reduce_only\": true,\n \"slippage\": 123,\n \"order_tag\": \"enum:broker_b:GRID_PRO\",\n \"level\": 123,\n \"post_only_adjust\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orderly.org/v1/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["orderly-timestamp"] = '<orderly-timestamp>'
request["orderly-account-id"] = '<orderly-account-id>'
request["orderly-key"] = '<orderly-key>'
request["orderly-signature"] = '<orderly-signature>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"PERP_ETH_USDC\",\n \"order_type\": \"<string>\",\n \"side\": \"<string>\",\n \"client_order_id\": \"<string>\",\n \"order_price\": 123,\n \"order_quantity\": 123,\n \"order_amount\": 123,\n \"visible_quantity\": 123,\n \"reduce_only\": true,\n \"slippage\": 123,\n \"order_tag\": \"enum:broker_b:GRID_PRO\",\n \"level\": 123,\n \"post_only_adjust\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"order_id": 13,
"client_order_id": "testclientid",
"order_type": "LIMIT",
"order_price": 100.12,
"order_quantity": 0.987654,
"error_message": "none"
},
"timestamp": 1702989203989
}Create order
Limit: 10 requests per 1 second
POST /v1/order
Place order maker/taker, the order executed information will be update from websocket stream. will response immediately with an order created message.
MARKET type order behavior: it matches until the full size is executed. If the size is too large (larger than whole book) or the matching price exceeds the price limit (refer to price_range), then the remaining quantity will be cancelled.
IOC type order behavior: it matches as much as possible at the order_price. If not fully executed, then remaining quantity will be cancelled.
FOK type order behavior: if the order can be fully executed at the order_price then the order gets fully executed otherwise would be cancelled without any execution.
POST_ONLY type order behavior: if the order will be executed with any maker trades at the time of placement, then it will be cancelled without any execution. If a POST_ONLY order would match only with hidden quantity at the price level, the incoming POST_ONLY order is treated as the maker side for that execution and the resting hidden order is treated as the taker side.
ASK type order behavior: the order price is guranteed to be the best ask price of the orderbook at the time it gets accepted.
BID type order behavior: the order price is guranteed to be the best bid price of the orderbook at the time it gets accepted.
visible_quantity behavior: it sets the maximum quantity to be shown on orderbook. By default, it is equal to order_quantity, negative number and number larger than order_quantity is not allowed. If it sets to 0, the order would be hidden from the orderbook. It doesn’t work for MARKET/IOC/FOK orders since orders with these types would be executed and cancelled immediately and not be shown on orderbook. For LIMIT order, as long as it’s not complete, visible_quantity is the maximum quantity that shown on orderbook. When hidden quantity is matched by a new incoming order, the hidden side is marked as taker and charged the taker fee. If an order has both hidden and visible quantity, the hidden quantity is matched before the visible quantity.
order_quantity are provided. The precision of the number should be within 8 digits.
client_order_id behavior: customized order_id, a unique id among open orders. Orders with the same client_order_id can be accepted only when the previous one if completed, otherwise the order will be rejected.
For a Predict symbol: margin_mode must be sent as ISOLATED, or the order is rejected with BINARY_MARGIN_MODE_NOT_SUPPORTED. Only LIMIT, POST_ONLY, and IOC with an explicit protection price are accepted; any other order_type (including MARKET, ASK, BID, FOK) is rejected with BINARY_ORDER_TYPE_NOT_SUPPORTED. order_price and order_quantity must satisfy the round’s quote_min/quote_max/quote_tick and base_min/base_max/base_tick without any automatic rounding; out-of-range or off-tick values are rejected outright. min_notional is always validated against the UP-book order_price x order_quantity, for both BUY and SELL. Once the platform’s receive time for the request reaches the round’s order cutoff before expire_at, the order is rejected with ROUND_CLOSED; clients must not auto-resubmit to the next round.
Note: This endpoint requires trading scope in orderly key.
curl --request POST \
--url https://api.orderly.org/v1/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",
"order_type": "<string>",
"side": "<string>",
"client_order_id": "<string>",
"order_price": 123,
"order_quantity": 123,
"order_amount": 123,
"visible_quantity": 123,
"reduce_only": true,
"slippage": 123,
"order_tag": "enum:broker_b:GRID_PRO",
"level": 123,
"post_only_adjust": true
}
'import requests
url = "https://api.orderly.org/v1/order"
payload = {
"symbol": "PERP_ETH_USDC",
"order_type": "<string>",
"side": "<string>",
"client_order_id": "<string>",
"order_price": 123,
"order_quantity": 123,
"order_amount": 123,
"visible_quantity": 123,
"reduce_only": True,
"slippage": 123,
"order_tag": "enum:broker_b:GRID_PRO",
"level": 123,
"post_only_adjust": True
}
headers = {
"orderly-timestamp": "<orderly-timestamp>",
"orderly-account-id": "<orderly-account-id>",
"orderly-key": "<orderly-key>",
"orderly-signature": "<orderly-signature>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'orderly-timestamp': '<orderly-timestamp>',
'orderly-account-id': '<orderly-account-id>',
'orderly-key': '<orderly-key>',
'orderly-signature': '<orderly-signature>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
symbol: 'PERP_ETH_USDC',
order_type: '<string>',
side: '<string>',
client_order_id: '<string>',
order_price: 123,
order_quantity: 123,
order_amount: 123,
visible_quantity: 123,
reduce_only: true,
slippage: 123,
order_tag: 'enum:broker_b:GRID_PRO',
level: 123,
post_only_adjust: true
})
};
fetch('https://api.orderly.org/v1/order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.orderly.org/v1/order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'symbol' => 'PERP_ETH_USDC',
'order_type' => '<string>',
'side' => '<string>',
'client_order_id' => '<string>',
'order_price' => 123,
'order_quantity' => 123,
'order_amount' => 123,
'visible_quantity' => 123,
'reduce_only' => true,
'slippage' => 123,
'order_tag' => 'enum:broker_b:GRID_PRO',
'level' => 123,
'post_only_adjust' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"orderly-account-id: <orderly-account-id>",
"orderly-key: <orderly-key>",
"orderly-signature: <orderly-signature>",
"orderly-timestamp: <orderly-timestamp>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.orderly.org/v1/order"
payload := strings.NewReader("{\n \"symbol\": \"PERP_ETH_USDC\",\n \"order_type\": \"<string>\",\n \"side\": \"<string>\",\n \"client_order_id\": \"<string>\",\n \"order_price\": 123,\n \"order_quantity\": 123,\n \"order_amount\": 123,\n \"visible_quantity\": 123,\n \"reduce_only\": true,\n \"slippage\": 123,\n \"order_tag\": \"enum:broker_b:GRID_PRO\",\n \"level\": 123,\n \"post_only_adjust\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("orderly-timestamp", "<orderly-timestamp>")
req.Header.Add("orderly-account-id", "<orderly-account-id>")
req.Header.Add("orderly-key", "<orderly-key>")
req.Header.Add("orderly-signature", "<orderly-signature>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.orderly.org/v1/order")
.header("orderly-timestamp", "<orderly-timestamp>")
.header("orderly-account-id", "<orderly-account-id>")
.header("orderly-key", "<orderly-key>")
.header("orderly-signature", "<orderly-signature>")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"PERP_ETH_USDC\",\n \"order_type\": \"<string>\",\n \"side\": \"<string>\",\n \"client_order_id\": \"<string>\",\n \"order_price\": 123,\n \"order_quantity\": 123,\n \"order_amount\": 123,\n \"visible_quantity\": 123,\n \"reduce_only\": true,\n \"slippage\": 123,\n \"order_tag\": \"enum:broker_b:GRID_PRO\",\n \"level\": 123,\n \"post_only_adjust\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orderly.org/v1/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["orderly-timestamp"] = '<orderly-timestamp>'
request["orderly-account-id"] = '<orderly-account-id>'
request["orderly-key"] = '<orderly-key>'
request["orderly-signature"] = '<orderly-signature>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"PERP_ETH_USDC\",\n \"order_type\": \"<string>\",\n \"side\": \"<string>\",\n \"client_order_id\": \"<string>\",\n \"order_price\": 123,\n \"order_quantity\": 123,\n \"order_amount\": 123,\n \"visible_quantity\": 123,\n \"reduce_only\": true,\n \"slippage\": 123,\n \"order_tag\": \"enum:broker_b:GRID_PRO\",\n \"level\": 123,\n \"post_only_adjust\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"order_id": 13,
"client_order_id": "testclientid",
"order_type": "LIMIT",
"order_price": 100.12,
"order_quantity": 0.987654,
"error_message": "none"
},
"timestamp": 1702989203989
}Headers
Body
Optional tag for the order. Supports two formats:
- Referral code: plain string (e.g.,
REFERRAL2026) - overrides referral relationship - Custom trading fee:
enum:<owning_broker_id>:<enum_id>(e.g.,enum:broker_b:GRID_PRO) - adds the custom fee and preserves the existing referral relationship New custom-fee-tagged orders must use the current three-segment format. Legacyenum:<enum_id>tags are supported only on orders accepted before cutover. Maximum length: 128 characters. Cannot be modified after order placement.
128"enum:broker_b:GRID_PRO"