API Reference / Proxy usage
Get proxy endpoint latency history
Returns the hourly health check latency of one proxy endpoint over a window of up to 31 days: for each hour, the number of successful and failed checks and the smallest, average and largest time for a test request through the endpoint, which is checked every minute. Hours with no checks are left out.
/ analytics. v1. Analytics/ GetProxyLatencyHistoryRequest body
application/jsonRequired
Request for the hourly health check latency of one proxy endpoint in the caller's workspace over a window of at most 31 days.
sessionIdstringOpaque 16-byte identifier of the proxy endpoint (the proxies service's session), base64-encoded in JSON.
Format"byte" base64
startedBefore?stringExclusive end of the window. Absent reads up to the time of the request, so the current hour may be partial.
Format"date-time"
startedFrom?stringInclusive start of the window, rounded down to the hour. Absent reads the 7 days before started_before. A window longer than 31 days is rejected with invalid_argument.
Format"date-time"
Response body
application/json
Success
buckets?array<SessionLatencyBucket>Hours with at least one check, ordered by started_at ascending, at most 744.
Show attributes
average?stringAverage round trip of the hour's successful checks. Absent when every check in the hour failed.
failureCount?integerNumber of failed checks in the hour. They carry no latency.
Format"int32"
maximum?stringLargest round trip of the hour's successful checks. Absent when every check in the hour failed.
minimum?stringSmallest round trip of the hour's successful checks. Absent when every check in the hour failed.
startedAt?stringInclusive UTC start of the hour.
Format"date-time"
successCount?integerNumber of successful checks in the hour, the samples the latency figures summarise.
Format"int32"
windowEnd?stringExclusive end of the window read.
Format"date-time"
windowStart?stringInclusive start of the window read, on an hour boundary.
Format"date-time"
application/json
The request was malformed, such as a missing required field or an unparseable cursor.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request lacks a valid API key in the Authorization header.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The API key is not allowed to perform this action on this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
An internal server error occurred.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
curl -X POST "https://api.goldmine.to/analytics.v1.Analytics/GetProxyLatencyHistory" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sessionId": "AZrEoUhh/X+4C3EJAhYjqg==",
"startedFrom": "2026-11-10T12:00:00Z",
"startedBefore": "2026-11-10T14:00:00Z"
}'const res = await fetch("https://api.goldmine.to/analytics.v1.Analytics/GetProxyLatencyHistory", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"sessionId": "AZrEoUhh/X+4C3EJAhYjqg==",
"startedFrom": "2026-11-10T12:00:00Z",
"startedBefore": "2026-11-10T14:00:00Z"
}),
});
const data = await res.json();body := strings.NewReader(`{
"sessionId": "AZrEoUhh/X+4C3EJAhYjqg==",
"startedFrom": "2026-11-10T12:00:00Z",
"startedBefore": "2026-11-10T14:00:00Z"
}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/analytics.v1.Analytics/GetProxyLatencyHistory", body)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CSTRADER_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)import os, requests
res = requests.post(
"https://api.goldmine.to/analytics.v1.Analytics/GetProxyLatencyHistory",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={
"sessionId": "AZrEoUhh/X+4C3EJAhYjqg==",
"startedFrom": "2026-11-10T12:00:00Z",
"startedBefore": "2026-11-10T14:00:00Z"
},
)
data = res.json(){
"windowStart": "2026-11-10T12:00:00Z",
"windowEnd": "2026-11-10T14:00:00Z",
"buckets": [
{
"startedAt": "2026-11-10T12:00:00Z",
"successCount": 60,
"minimum": "0.048s",
"average": "0.053s",
"maximum": "0.071s"
}
]
}{
"code": "invalid_argument",
"message": "The request was malformed, such as a missing required field or an unparseable cursor."
}{
"code": "unauthenticated",
"message": "The request lacks a valid API key in the Authorization header."
}{
"code": "permission_denied",
"message": "The API key is not allowed to perform this action on this workspace."
}{
"code": "internal",
"message": "An internal server error occurred."
}