curl --request GET \
--url http://localhost:8000/performance/latest \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://localhost:8000/performance/latest"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('http://localhost:8000/performance/latest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/performance/latest",
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: Basic <encoded-value>"
],
]);
$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 := "http://localhost:8000/performance/latest"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8000/performance/latest")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/performance/latest")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": [
{
"timestamp": "<string>",
"subject": "<string>",
"scope_id": "<string>",
"status": "<string>",
"realized_pnl_quote": 123,
"unrealized_pnl_quote": 123,
"global_pnl_quote": 123,
"global_pnl_pct": 123,
"volume_quote": 123,
"is_terminal": false,
"cum_fees_quote": 123,
"bot_name": "<string>",
"controller_id": "<string>",
"executor_id": "<string>",
"executor_type": "<string>",
"account_name": "<string>",
"connector_name": "<string>",
"trading_pair": "<string>",
"close_type": "<string>",
"performance": {},
"custom_info": {}
}
],
"status": "success"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Get Latest Performance
The most recent snapshot of every scope in one subject, newest first.
One row per scope — per (bot, controller), or per executor — in the same normalized
shape /history returns, so a dashboard’s live tiles and its charts read the same
fields off the same client.
limit caps how many scopes come back, it is not a page boundary: there is no cursor
here because this is not a series. Newest-first ordering means the scopes that are
still reporting come first, which matters far more for executors than for controllers
— every executor that ever ran leaves a terminal row behind, so the executor
population grows without bound while the controller one does not.
This reads the stored series, not live memory. An executor younger than one snapshot
interval has no row yet and does not appear, and a live one’s figures are up to one
interval stale — by design, so that this row and the last row of /history are the
same row. Live in-memory figures are what /executors/ serves.
A closed executor’s latest row is its terminal row, carrying is_terminal: true and
its close_type, so “the final value” needs no separate call. That holds for every
way an executor can close, including the startup reap of one a crash left behind
(close_type: SYSTEM_CLEANUP): this row and GET /executors/{executor_id} are written
in the same transaction, so the two surfaces cannot disagree about whether an executor
is done.
curl --request GET \
--url http://localhost:8000/performance/latest \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://localhost:8000/performance/latest"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('http://localhost:8000/performance/latest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8000",
CURLOPT_URL => "http://localhost:8000/performance/latest",
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: Basic <encoded-value>"
],
]);
$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 := "http://localhost:8000/performance/latest"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:8000/performance/latest")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/performance/latest")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": [
{
"timestamp": "<string>",
"subject": "<string>",
"scope_id": "<string>",
"status": "<string>",
"realized_pnl_quote": 123,
"unrealized_pnl_quote": 123,
"global_pnl_quote": 123,
"global_pnl_pct": 123,
"volume_quote": 123,
"is_terminal": false,
"cum_fees_quote": 123,
"bot_name": "<string>",
"controller_id": "<string>",
"executor_id": "<string>",
"executor_type": "<string>",
"account_name": "<string>",
"connector_name": "<string>",
"trading_pair": "<string>",
"close_type": "<string>",
"performance": {},
"custom_info": {}
}
],
"status": "success"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Query Parameters
Which population to read: "controller" or "executor"
^(controller|executor)$Filter by bot name (controller subject only)
Filter by controller ID (either subject)
Filter by executor ID (executor subject only)
Filter by executor type (executor subject only)
Filter by account name (executor subject only)
Filter by connector (executor subject only)
Filter by trading pair (executor subject only)
Cap on how many scopes come back, newest first
x <= 1000Response
Successful Response
Envelope of GET /performance/latest.
No pagination block: this is one row per scope, not a series, so there is no cursor
to walk and no interval to sample. limit is a cap on how many scopes come back,
newest-first, not a page boundary.
Was this page helpful?

