Skip to content

API Reference / Proxy usage

Get a proxy connection's traffic

Returns one raw connection's byte counts as it reported them: every five minutes while it was open and once when it closed.

POST/analytics.v1.Analytics/GetProxyConnectionTraffic

Request body

application/jsonRequired

Request for one connection's byte counts as they were reported, every five minutes while it was open and once when it closed.

connectionIdstring

Opaque 16-byte identifier of the connection (ProxyConnectionDetail.connection_id), base64-encoded in JSON.

Format"byte" base64

openedAtstring

started_at of the connection's row in ListProxyRequests, which bounds the read. At most 7 days ago.

Format"date-time"

Response body

application/json

Success

intervals?array<ProxyConnectionInterval>

The intervals in time order. Empty for an unknown connection.

Show attributes
bytesIn?string

Bytes received in the interval.

Format"int64"

bytesOut?string

Bytes sent in the interval.

Format"int64"

closed?boolean

True on the interval that ended with the close.

length?string

How long the interval lasted, five minutes except the last.

startedAt?string

Start of the interval.

Format"date-time"

curl -X POST "https://api.goldmine.to/analytics.v1.Analytics/GetProxyConnectionTraffic" \
  -H "Authorization: Bearer $CSTRADER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectionId": "AZp9b3Hjd2yNSxkZmKqZ6Q==",
    "openedAt": "2026-11-12T17:45:38Z"
  }'
{
  "intervals": [
    {
      "startedAt": "2026-11-12T17:45:38Z",
      "length": "300s",
      "bytesOut": "3100",
      "bytesIn": "18200"
    },
    {
      "startedAt": "2026-11-12T17:50:38Z",
      "length": "41s",
      "bytesOut": "900",
      "bytesIn": "4000",
      "closed": true
    }
  ]
}