curl --request PATCH \
--url https://www.oceanx.trade/api/v1/price-alerts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'If-Match: <if-match>' \
--data '
{
"token": "<string>",
"thresholdUsd": "<string>",
"cooldownSeconds": 43230,
"expiresAtMs": 4503599627370495
}
'import requests
url = "https://www.oceanx.trade/api/v1/price-alerts/{id}"
payload = {
"token": "<string>",
"thresholdUsd": "<string>",
"cooldownSeconds": 43230,
"expiresAtMs": 4503599627370495
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
token: '<string>',
thresholdUsd: '<string>',
cooldownSeconds: 43230,
expiresAtMs: 4503599627370495
})
};
fetch('https://www.oceanx.trade/api/v1/price-alerts/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'token' => '<string>',
'thresholdUsd' => '<string>',
'cooldownSeconds' => 43230,
'expiresAtMs' => 4503599627370495
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"If-Match: <if-match>"
],
]);
$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/{id}"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"thresholdUsd\": \"<string>\",\n \"cooldownSeconds\": 43230,\n \"expiresAtMs\": 4503599627370495\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("If-Match", "<if-match>")
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.patch("https://www.oceanx.trade/api/v1/price-alerts/{id}")
.header("Idempotency-Key", "<idempotency-key>")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\",\n \"thresholdUsd\": \"<string>\",\n \"cooldownSeconds\": 43230,\n \"expiresAtMs\": 4503599627370495\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.oceanx.trade/api/v1/price-alerts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"<string>\",\n \"thresholdUsd\": \"<string>\",\n \"cooldownSeconds\": 43230,\n \"expiresAtMs\": 4503599627370495\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>"
}Update or pause own price alert
curl --request PATCH \
--url https://www.oceanx.trade/api/v1/price-alerts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'If-Match: <if-match>' \
--data '
{
"token": "<string>",
"thresholdUsd": "<string>",
"cooldownSeconds": 43230,
"expiresAtMs": 4503599627370495
}
'import requests
url = "https://www.oceanx.trade/api/v1/price-alerts/{id}"
payload = {
"token": "<string>",
"thresholdUsd": "<string>",
"cooldownSeconds": 43230,
"expiresAtMs": 4503599627370495
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Idempotency-Key': '<idempotency-key>',
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
token: '<string>',
thresholdUsd: '<string>',
cooldownSeconds: 43230,
expiresAtMs: 4503599627370495
})
};
fetch('https://www.oceanx.trade/api/v1/price-alerts/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'token' => '<string>',
'thresholdUsd' => '<string>',
'cooldownSeconds' => 43230,
'expiresAtMs' => 4503599627370495
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"If-Match: <if-match>"
],
]);
$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/{id}"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"thresholdUsd\": \"<string>\",\n \"cooldownSeconds\": 43230,\n \"expiresAtMs\": 4503599627370495\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("If-Match", "<if-match>")
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.patch("https://www.oceanx.trade/api/v1/price-alerts/{id}")
.header("Idempotency-Key", "<idempotency-key>")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\",\n \"thresholdUsd\": \"<string>\",\n \"cooldownSeconds\": 43230,\n \"expiresAtMs\": 4503599627370495\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.oceanx.trade/api/v1/price-alerts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"<string>\",\n \"thresholdUsd\": \"<string>\",\n \"cooldownSeconds\": 43230,\n \"expiresAtMs\": 4503599627370495\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^[!-~]+$Positive configVersion or quoted ETag. Guards config edits; service state transitions do not increment configVersion.
Path Parameters
Body
- Option 1
- Option 2
- Option 3
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 <= 9007199254740991