Get Positions Summary
curl --request GET \
--url http://localhost:8000/executors/positions/summary \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://localhost:8000/executors/positions/summary"
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/executors/positions/summary', 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/executors/positions/summary",
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/executors/positions/summary"
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/executors/positions/summary")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/executors/positions/summary")
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{
"total_positions": 123,
"total_realized_pnl": 123,
"positions": [
{
"trading_pair": "<string>",
"connector_name": "<string>",
"account_name": "<string>",
"buy_amount_base": 123,
"buy_amount_quote": 123,
"sell_amount_base": 123,
"sell_amount_quote": 123,
"net_amount_base": 123,
"buy_breakeven_price": 123,
"sell_breakeven_price": 123,
"matched_amount_base": 123,
"unmatched_amount_base": 123,
"position_side": "<string>",
"realized_pnl_quote": 123,
"executor_count": 123,
"executor_ids": [
"<string>"
],
"last_updated": "<string>",
"controller_id": "main",
"cum_fees_quote": 0,
"unrealized_pnl_quote": 123
}
],
"total_unrealized_pnl": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Executors
Get Positions Summary
Get summary of all held positions from executors stopped with keep_position=True.
Returns aggregate information including:
- Total number of active position holds
- Total realized PnL across all positions
- Total unrealized PnL (when market rates are available)
- List of all positions with breakeven prices and PnL
Query parameters:
- controller_id: Filter positions by controller ID
GET
/
executors
/
positions
/
summary
Get Positions Summary
curl --request GET \
--url http://localhost:8000/executors/positions/summary \
--header 'Authorization: Basic <encoded-value>'import requests
url = "http://localhost:8000/executors/positions/summary"
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/executors/positions/summary', 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/executors/positions/summary",
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/executors/positions/summary"
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/executors/positions/summary")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8000/executors/positions/summary")
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{
"total_positions": 123,
"total_realized_pnl": 123,
"positions": [
{
"trading_pair": "<string>",
"connector_name": "<string>",
"account_name": "<string>",
"buy_amount_base": 123,
"buy_amount_quote": 123,
"sell_amount_base": 123,
"sell_amount_quote": 123,
"net_amount_base": 123,
"buy_breakeven_price": 123,
"sell_breakeven_price": 123,
"matched_amount_base": 123,
"unmatched_amount_base": 123,
"position_side": "<string>",
"realized_pnl_quote": 123,
"executor_count": 123,
"executor_ids": [
"<string>"
],
"last_updated": "<string>",
"controller_id": "main",
"cum_fees_quote": 0,
"unrealized_pnl_quote": 123
}
],
"total_unrealized_pnl": 123
}{
"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
Response
Successful Response
Summary of all held positions.
Number of active position holds
Total realized PnL across all positions
List of position holds
Show child attributes
Show child attributes
Total unrealized PnL (None if no rates available)
Was this page helpful?

