curl --request POST \
--url https://www.oceanx.trade/api/v1/price-alerts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"token": "<string>",
"thresholdUsd": "<string>",
"cooldownSeconds": 43230,
"expiresAtMs": 4503599627370495,
"enabled": false
}
'import requests
url = "https://www.oceanx.trade/api/v1/price-alerts"
payload = {
"token": "<string>",
"thresholdUsd": "<string>",
"cooldownSeconds": 43230,
"expiresAtMs": 4503599627370495,
"enabled": False
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
token: '<string>',
thresholdUsd: '<string>',
cooldownSeconds: 43230,
expiresAtMs: 4503599627370495,
enabled: false
})
};
fetch('https://www.oceanx.trade/api/v1/price-alerts', 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/price-alerts",
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([
'token' => '<string>',
'thresholdUsd' => '<string>',
'cooldownSeconds' => 43230,
'expiresAtMs' => 4503599627370495,
'enabled' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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/price-alerts"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"thresholdUsd\": \"<string>\",\n \"cooldownSeconds\": 43230,\n \"expiresAtMs\": 4503599627370495,\n \"enabled\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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/price-alerts")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\",\n \"thresholdUsd\": \"<string>\",\n \"cooldownSeconds\": 43230,\n \"expiresAtMs\": 4503599627370495,\n \"enabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.oceanx.trade/api/v1/price-alerts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"<string>\",\n \"thresholdUsd\": \"<string>\",\n \"cooldownSeconds\": 43230,\n \"expiresAtMs\": 4503599627370495,\n \"enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assetKey": {
"chain_id": "<string>",
"contract": "<string>"
},
"pool": "<string>",
"metric": "price",
"quote": "usd",
"quoteAsset": "<string>",
"threshold": "<string>",
"condition": {
"kind": "above"
},
"mode": "once",
"hysteresisPct": "<string>",
"cooldownMin": 720,
"expiresAtMs": 4503599627370495,
"deliveryChannels": [
"in_app"
],
"configVersion": 4503599627370496,
"status": "draft",
"createdAtMs": 4503599627370495,
"lastTriggeredAtMs": 4503599627370495,
"eligibilityReason": "<string>",
"deliveryStatus": "<string>",
"state": {
"baseline": "<string>",
"lastSampleTsMs": 4503599627370495,
"lastSampleSeq": 4503599627370495,
"awaitingRearm": true,
"cooldownUntilMs": 4503599627370495
}
},
"meta": {
"requestId": "<string>",
"source": "copy-trading-store",
"methodVersion": "<string>",
"observedAtMs": null,
"staleAfterMs": null,
"coverage": "<string>",
"completeHistory": true,
"snapshotExpiresAtMs": 4503599627370495,
"pagination": "service_keyset",
"cursorTtlMs": 300000,
"mode": {
"disabled": true,
"dryRun": true,
"liveExecutionAvailable": false
},
"limits": {
"maxPerTradeUsd": 123,
"dailyCapUsd": 123,
"slippageBps": 123,
"targets": 4503599627370495
}
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}Create own price alert draft
curl --request POST \
--url https://www.oceanx.trade/api/v1/price-alerts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"token": "<string>",
"thresholdUsd": "<string>",
"cooldownSeconds": 43230,
"expiresAtMs": 4503599627370495,
"enabled": false
}
'import requests
url = "https://www.oceanx.trade/api/v1/price-alerts"
payload = {
"token": "<string>",
"thresholdUsd": "<string>",
"cooldownSeconds": 43230,
"expiresAtMs": 4503599627370495,
"enabled": False
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
token: '<string>',
thresholdUsd: '<string>',
cooldownSeconds: 43230,
expiresAtMs: 4503599627370495,
enabled: false
})
};
fetch('https://www.oceanx.trade/api/v1/price-alerts', 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/price-alerts",
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([
'token' => '<string>',
'thresholdUsd' => '<string>',
'cooldownSeconds' => 43230,
'expiresAtMs' => 4503599627370495,
'enabled' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$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/price-alerts"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"thresholdUsd\": \"<string>\",\n \"cooldownSeconds\": 43230,\n \"expiresAtMs\": 4503599627370495,\n \"enabled\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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/price-alerts")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\",\n \"thresholdUsd\": \"<string>\",\n \"cooldownSeconds\": 43230,\n \"expiresAtMs\": 4503599627370495,\n \"enabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.oceanx.trade/api/v1/price-alerts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"<string>\",\n \"thresholdUsd\": \"<string>\",\n \"cooldownSeconds\": 43230,\n \"expiresAtMs\": 4503599627370495,\n \"enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assetKey": {
"chain_id": "<string>",
"contract": "<string>"
},
"pool": "<string>",
"metric": "price",
"quote": "usd",
"quoteAsset": "<string>",
"threshold": "<string>",
"condition": {
"kind": "above"
},
"mode": "once",
"hysteresisPct": "<string>",
"cooldownMin": 720,
"expiresAtMs": 4503599627370495,
"deliveryChannels": [
"in_app"
],
"configVersion": 4503599627370496,
"status": "draft",
"createdAtMs": 4503599627370495,
"lastTriggeredAtMs": 4503599627370495,
"eligibilityReason": "<string>",
"deliveryStatus": "<string>",
"state": {
"baseline": "<string>",
"lastSampleTsMs": 4503599627370495,
"lastSampleSeq": 4503599627370495,
"awaitingRearm": true,
"cooldownUntilMs": 4503599627370495
}
},
"meta": {
"requestId": "<string>",
"source": "copy-trading-store",
"methodVersion": "<string>",
"observedAtMs": null,
"staleAfterMs": null,
"coverage": "<string>",
"completeHistory": true,
"snapshotExpiresAtMs": 4503599627370495,
"pagination": "service_keyset",
"cursorTtlMs": 300000,
"mode": {
"disabled": true,
"dryRun": true,
"liveExecutionAvailable": false
},
"limits": {
"maxPerTradeUsd": 123,
"dailyCapUsd": 123,
"slippageBps": 123,
"targets": 4503599627370495
}
}
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"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, and alert operations use alerts.read or alerts.write. New scopes require explicit selection and grant no trading authority. Existing perps operations retain their documented scopes.
Headers
Per owner + public method/path + key. Same body replays the durable service result; changed body returns 409. Service retains records 180 days (at least 24 hours).
1 - 128^[!-~]+$Body
solana, ethereum, base, bnb, arbitrum, polygon, monad, hyperevm, robinhood Base58 Solana mint or 0x-prefixed 40-hex EVM address, according to chain. Fresh qualified service data is required.
128above, below Positive exact USD decimal. At most 20 whole digits/18 fractional digits; must also fit the service evaluator's decimal range.
128^\d+(\.\d{1,18})?$once, crossing Existing evaluator accepts whole minutes only.
60 <= x <= 86400Must be a multiple of 60Explicit expiry after now and at most 30 days away; enforced by service.
0 <= x <= 9007199254740991Optional false: creation saves an unarmed draft. PATCH action:arm separately.
