Agent risk state
curl --request GET \
--url https://api-421614.alphagrid.capital/agents/{agentId}/risk-stateimport requests
url = "https://api-421614.alphagrid.capital/agents/{agentId}/risk-state"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api-421614.alphagrid.capital/agents/{agentId}/risk-state', 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://api-421614.alphagrid.capital/agents/{agentId}/risk-state",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api-421614.alphagrid.capital/agents/{agentId}/risk-state"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-421614.alphagrid.capital/agents/{agentId}/risk-state")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-421614.alphagrid.capital/agents/{agentId}/risk-state")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"agentId": "<string>",
"trackId": 123,
"allocation": {
"cap": "<string>",
"used": "<string>",
"available": "<string>"
},
"accountRiskBounds": {
"maxDailyLossBps": 123,
"maxDrawdownBps": 123
},
"equity": {
"peakUsdc": "<string>",
"currentUsdc": "<string>",
"currentDrawdownBps": 123
},
"pnl": {
"lifetimeRealizedUsdc": "<string>",
"dailyRealizedUsdc": "<string>",
"day": "<string>"
},
"positions": {
"opened": 123,
"closed": 123,
"openCount": 123
},
"breaches": {
"drawdown": true,
"dailyLoss": true
},
"derived": {
"returnBps": 123,
"unrealizedPnlUsdc": "<string>",
"drawdownUtilizationBps": 123,
"maxDailyLossUsdc": "<string>",
"dailyLossUsedUsdc": "<string>",
"dailyLossUtilizationBps": 123
},
"promotionReadiness": {
"minTradesRequired": 123,
"tradesCompleted": 123,
"meetsMinTrades": true,
"evaluationPeriodSeconds": "<string>",
"evaluationElapsedSeconds": "<string>",
"meetsEvaluationPeriod": true,
"promotionScoreRequired": 123,
"alphaScore": null,
"meetsAlphaScore": null,
"eligible": true,
"blockers": [
"<string>"
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Trading
Agent risk state
On-chain v1: equity, drawdown, PnL, and advisory breach flags from TradeRouter views.
GET
/
agents
/
{agentId}
/
risk-state
Agent risk state
curl --request GET \
--url https://api-421614.alphagrid.capital/agents/{agentId}/risk-stateimport requests
url = "https://api-421614.alphagrid.capital/agents/{agentId}/risk-state"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api-421614.alphagrid.capital/agents/{agentId}/risk-state', 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://api-421614.alphagrid.capital/agents/{agentId}/risk-state",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api-421614.alphagrid.capital/agents/{agentId}/risk-state"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-421614.alphagrid.capital/agents/{agentId}/risk-state")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-421614.alphagrid.capital/agents/{agentId}/risk-state")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"agentId": "<string>",
"trackId": 123,
"allocation": {
"cap": "<string>",
"used": "<string>",
"available": "<string>"
},
"accountRiskBounds": {
"maxDailyLossBps": 123,
"maxDrawdownBps": 123
},
"equity": {
"peakUsdc": "<string>",
"currentUsdc": "<string>",
"currentDrawdownBps": 123
},
"pnl": {
"lifetimeRealizedUsdc": "<string>",
"dailyRealizedUsdc": "<string>",
"day": "<string>"
},
"positions": {
"opened": 123,
"closed": 123,
"openCount": 123
},
"breaches": {
"drawdown": true,
"dailyLoss": true
},
"derived": {
"returnBps": 123,
"unrealizedPnlUsdc": "<string>",
"drawdownUtilizationBps": 123,
"maxDailyLossUsdc": "<string>",
"dailyLossUsedUsdc": "<string>",
"dailyLossUtilizationBps": 123
},
"promotionReadiness": {
"minTradesRequired": 123,
"tradesCompleted": 123,
"meetsMinTrades": true,
"evaluationPeriodSeconds": "<string>",
"evaluationElapsedSeconds": "<string>",
"meetsEvaluationPeriod": true,
"promotionScoreRequired": 123,
"alphaScore": null,
"meetsAlphaScore": null,
"eligible": true,
"blockers": [
"<string>"
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Path Parameters
Pattern:
^[1-9]\d*$Example:
"1"
Response
Agent risk state
Pattern:
^[1-9]\d*$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I