Read own copy PnL summary
curl --request GET \
--url https://www.oceanx.trade/api/v1/copy-trading/pnl \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.oceanx.trade/api/v1/copy-trading/pnl"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.oceanx.trade/api/v1/copy-trading/pnl', 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/copy-trading/pnl",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/copy-trading/pnl"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://www.oceanx.trade/api/v1/copy-trading/pnl")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.oceanx.trade/api/v1/copy-trading/pnl")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"realizedUsd": 123,
"knownSells": 4503599627370495,
"unknownSells": 4503599627370495,
"status": "known",
"unrealizedUsd": null,
"coverage": "executed_sells_of_current_follows",
"methodVersion": "copy-store-realized-v1"
},
"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>"
}Copy Trading
Read own copy PnL summary
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. Aggregates store full-history executed-sell PnL for current follows only; removed follows are excluded. No sells, missing basis/aggregate or any unknown sells leaves realizedUsd null. Unrealized PnL is unavailable, never zero. Existing numeric USD type is preserved; no exact-decimal or tax-accounting claim.
GET
/
api
/
v1
/
copy-trading
/
pnl
Read own copy PnL summary
curl --request GET \
--url https://www.oceanx.trade/api/v1/copy-trading/pnl \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.oceanx.trade/api/v1/copy-trading/pnl"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.oceanx.trade/api/v1/copy-trading/pnl', 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/copy-trading/pnl",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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/copy-trading/pnl"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://www.oceanx.trade/api/v1/copy-trading/pnl")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.oceanx.trade/api/v1/copy-trading/pnl")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"realizedUsd": 123,
"knownSells": 4503599627370495,
"unknownSells": 4503599627370495,
"status": "known",
"unrealizedUsd": null,
"coverage": "executed_sells_of_current_follows",
"methodVersion": "copy-store-realized-v1"
},
"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>"
}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.
