Delete own price alert
curl --request DELETE \
--url https://www.oceanx.trade/api/v1/price-alerts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'If-Match: <if-match>'import requests
url = "https://www.oceanx.trade/api/v1/price-alerts/{id}"
headers = {
"Idempotency-Key": "<idempotency-key>",
"If-Match": "<if-match>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'Idempotency-Key': '<idempotency-key>',
'If-Match': '<if-match>',
Authorization: 'Bearer <token>'
}
};
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 => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://www.oceanx.trade/api/v1/price-alerts/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("If-Match", "<if-match>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://www.oceanx.trade/api/v1/price-alerts/{id}")
.header("Idempotency-Key", "<idempotency-key>")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.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::Delete.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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>"
}Price Alerts
Delete own price alert
Owner comes exclusively from the bearer key. Caller owner fields are rejected. Scopes are opt-in and independent of md.read and trading authority. Every request consumes the existing REST key limiter. URLs <=8 KiB and bodies <=32 KiB; no-store and credential-free CORS including PATCH/Idempotency-Key/If-Match. Uses the existing alert-eval service owner guard and durable journal. This adapter preserves its draft/arm/reviewed-replacement lifecycle and configVersion semantics. New configs are USD price crossing alerts with in-app delivery and zero hysteresis; reads also project existing app-native configurations. No webhook association/delivery. Bodyless conditional deletion maps to the service's durable cancellation. Returns 204; canceled history remains visible. Replaying the same key/revision returns 204; a new key on an already canceled alert can return 409.
DELETE
/
api
/
v1
/
price-alerts
/
{id}
Delete own price alert
curl --request DELETE \
--url https://www.oceanx.trade/api/v1/price-alerts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'If-Match: <if-match>'import requests
url = "https://www.oceanx.trade/api/v1/price-alerts/{id}"
headers = {
"Idempotency-Key": "<idempotency-key>",
"If-Match": "<if-match>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {
'Idempotency-Key': '<idempotency-key>',
'If-Match': '<if-match>',
Authorization: 'Bearer <token>'
}
};
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 => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://www.oceanx.trade/api/v1/price-alerts/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("If-Match", "<if-match>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://www.oceanx.trade/api/v1/price-alerts/{id}")
.header("Idempotency-Key", "<idempotency-key>")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.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::Delete.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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).
Required string length:
1 - 128Pattern:
^[!-~]+$Positive configVersion or quoted ETag. Guards config edits; service state transitions do not increment configVersion.
Path Parameters
Response
Owned alert canceled. No response body.
