curl --request POST \
--url https://www.oceanx.trade/api/v1/perps/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"venueSymbol": "<string>",
"size": 123,
"limitPx": 123,
"triggerPx": 123,
"trailPct": 99,
"leverage": 500,
"tif": "<string>",
"reduceOnly": true,
"postOnly": true,
"clientOrderId": "<string>",
"notionalCapUsd": 123,
"holdHintHours": 4380,
"slippageBps": 5000,
"perpLeg": {}
}
'import requests
url = "https://www.oceanx.trade/api/v1/perps/orders"
payload = {
"venueSymbol": "<string>",
"size": 123,
"limitPx": 123,
"triggerPx": 123,
"trailPct": 99,
"leverage": 500,
"tif": "<string>",
"reduceOnly": True,
"postOnly": True,
"clientOrderId": "<string>",
"notionalCapUsd": 123,
"holdHintHours": 4380,
"slippageBps": 5000,
"perpLeg": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
venueSymbol: '<string>',
size: 123,
limitPx: 123,
triggerPx: 123,
trailPct: 99,
leverage: 500,
tif: '<string>',
reduceOnly: true,
postOnly: true,
clientOrderId: '<string>',
notionalCapUsd: 123,
holdHintHours: 4380,
slippageBps: 5000,
perpLeg: {}
})
};
fetch('https://www.oceanx.trade/api/v1/perps/orders', 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://www.oceanx.trade/api/v1/perps/orders",
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([
'venueSymbol' => '<string>',
'size' => 123,
'limitPx' => 123,
'triggerPx' => 123,
'trailPct' => 99,
'leverage' => 500,
'tif' => '<string>',
'reduceOnly' => true,
'postOnly' => true,
'clientOrderId' => '<string>',
'notionalCapUsd' => 123,
'holdHintHours' => 4380,
'slippageBps' => 5000,
'perpLeg' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://www.oceanx.trade/api/v1/perps/orders"
payload := strings.NewReader("{\n \"venueSymbol\": \"<string>\",\n \"size\": 123,\n \"limitPx\": 123,\n \"triggerPx\": 123,\n \"trailPct\": 99,\n \"leverage\": 500,\n \"tif\": \"<string>\",\n \"reduceOnly\": true,\n \"postOnly\": true,\n \"clientOrderId\": \"<string>\",\n \"notionalCapUsd\": 123,\n \"holdHintHours\": 4380,\n \"slippageBps\": 5000,\n \"perpLeg\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://www.oceanx.trade/api/v1/perps/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"venueSymbol\": \"<string>\",\n \"size\": 123,\n \"limitPx\": 123,\n \"triggerPx\": 123,\n \"trailPct\": 99,\n \"leverage\": 500,\n \"tif\": \"<string>\",\n \"reduceOnly\": true,\n \"postOnly\": true,\n \"clientOrderId\": \"<string>\",\n \"notionalCapUsd\": 123,\n \"holdHintHours\": 4380,\n \"slippageBps\": 5000,\n \"perpLeg\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.oceanx.trade/api/v1/perps/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"venueSymbol\": \"<string>\",\n \"size\": 123,\n \"limitPx\": 123,\n \"triggerPx\": 123,\n \"trailPct\": 99,\n \"leverage\": 500,\n \"tif\": \"<string>\",\n \"reduceOnly\": true,\n \"postOnly\": true,\n \"clientOrderId\": \"<string>\",\n \"notionalCapUsd\": 123,\n \"holdHintHours\": 4380,\n \"slippageBps\": 5000,\n \"perpLeg\": {}\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "no_route",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "no_route",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "no_route",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "no_route",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "no_route",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "no_route",
"message": "<string>"
},
"requestId": "<string>"
}Validate a perp order (execution unavailable)
Validates scope, request, IP/venue policy, geo restrictions, execution bounds/notional caps and account throttle. Then returns 503 signer_unavailable. No request reaches a venue; this is not a dry-run fill. Capped keys require supported bounded buy-limit variants.
curl --request POST \
--url https://www.oceanx.trade/api/v1/perps/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"venueSymbol": "<string>",
"size": 123,
"limitPx": 123,
"triggerPx": 123,
"trailPct": 99,
"leverage": 500,
"tif": "<string>",
"reduceOnly": true,
"postOnly": true,
"clientOrderId": "<string>",
"notionalCapUsd": 123,
"holdHintHours": 4380,
"slippageBps": 5000,
"perpLeg": {}
}
'import requests
url = "https://www.oceanx.trade/api/v1/perps/orders"
payload = {
"venueSymbol": "<string>",
"size": 123,
"limitPx": 123,
"triggerPx": 123,
"trailPct": 99,
"leverage": 500,
"tif": "<string>",
"reduceOnly": True,
"postOnly": True,
"clientOrderId": "<string>",
"notionalCapUsd": 123,
"holdHintHours": 4380,
"slippageBps": 5000,
"perpLeg": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
venueSymbol: '<string>',
size: 123,
limitPx: 123,
triggerPx: 123,
trailPct: 99,
leverage: 500,
tif: '<string>',
reduceOnly: true,
postOnly: true,
clientOrderId: '<string>',
notionalCapUsd: 123,
holdHintHours: 4380,
slippageBps: 5000,
perpLeg: {}
})
};
fetch('https://www.oceanx.trade/api/v1/perps/orders', 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://www.oceanx.trade/api/v1/perps/orders",
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([
'venueSymbol' => '<string>',
'size' => 123,
'limitPx' => 123,
'triggerPx' => 123,
'trailPct' => 99,
'leverage' => 500,
'tif' => '<string>',
'reduceOnly' => true,
'postOnly' => true,
'clientOrderId' => '<string>',
'notionalCapUsd' => 123,
'holdHintHours' => 4380,
'slippageBps' => 5000,
'perpLeg' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://www.oceanx.trade/api/v1/perps/orders"
payload := strings.NewReader("{\n \"venueSymbol\": \"<string>\",\n \"size\": 123,\n \"limitPx\": 123,\n \"triggerPx\": 123,\n \"trailPct\": 99,\n \"leverage\": 500,\n \"tif\": \"<string>\",\n \"reduceOnly\": true,\n \"postOnly\": true,\n \"clientOrderId\": \"<string>\",\n \"notionalCapUsd\": 123,\n \"holdHintHours\": 4380,\n \"slippageBps\": 5000,\n \"perpLeg\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://www.oceanx.trade/api/v1/perps/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"venueSymbol\": \"<string>\",\n \"size\": 123,\n \"limitPx\": 123,\n \"triggerPx\": 123,\n \"trailPct\": 99,\n \"leverage\": 500,\n \"tif\": \"<string>\",\n \"reduceOnly\": true,\n \"postOnly\": true,\n \"clientOrderId\": \"<string>\",\n \"notionalCapUsd\": 123,\n \"holdHintHours\": 4380,\n \"slippageBps\": 5000,\n \"perpLeg\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.oceanx.trade/api/v1/perps/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"venueSymbol\": \"<string>\",\n \"size\": 123,\n \"limitPx\": 123,\n \"triggerPx\": 123,\n \"trailPct\": 99,\n \"leverage\": 500,\n \"tif\": \"<string>\",\n \"reduceOnly\": true,\n \"postOnly\": true,\n \"clientOrderId\": \"<string>\",\n \"notionalCapUsd\": 123,\n \"holdHintHours\": 4380,\n \"slippageBps\": 5000,\n \"perpLeg\": {}\n}"
response = http.request(request)
puts response.read_body{
"error": {
"code": "no_route",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "no_route",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "no_route",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "no_route",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "no_route",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "no_route",
"message": "<string>"
},
"requestId": "<string>"
}Authorizations
An OceanX API key, created in the app under Settings → Developer API. Send it as Authorization: Bearer ox_live_…. Required scopes are operation-specific: market reads use md.read, tracker uses tracker.read, copy reads use copy.read, alert operations use alerts.read or alerts.write, and owned wallet/funding reads require explicit account.read. New scopes require explicit selection and grant no trading authority. Existing perps operations retain their documented scopes.
Body
hl, pacifica, lighter, aster, dydx, gmx, ostium 1 - 64buy, sell market, limit, stop_market, stop_limit, take_market, take_limit, trailing_stop x <= 1000000000000x <= 1000000000000x <= 1000000000000x <= 1000 < x <= 1000cross, isolated 1 - 161 - 128x <= 10000000000000 <= x <= 87601 <= x <= 10000Only an empty object is accepted; execution overrides are rejected.
