Skip to content

API Reference / Proxy usage

Get proxy usage totals

Returns the total proxy traffic of your workspace over an inclusive range of up to 366 UTC days: requests, failed requests and bytes in each direction, one entry for each day, and breakdowns by pool and by exit country. It can be narrowed to one pool or one country.

POST/proxies.v1.Proxies/GetProxyUsageTotals

Request body

application/jsonRequired

Request for the total proxy usage of the caller's workspace over a range of UTC days, with a series for each day and breakdowns by pool and by country, optionally narrowed to one pool or one country.

country?string

Upper-case ISO 3166-1 alpha-2 exit country to sum only traffic through endpoints in it. Absent includes every country.

endDatestring

Last UTC day of the range, inclusive, as YYYY-MM-DD. Required, not before start_date, and at most 366 days after it.

Format"date-time"

poolId?string

Opaque 16-byte identifier of a pool, base64-encoded in JSON, to sum only its traffic. Absent includes every pool.

Format"byte" base64

startDatestring

First UTC day of the range, inclusive, as YYYY-MM-DD. Required.

Format"date-time"

Response body

application/json

Success

countries?array<ProxyUsageCountry>

One entry for each exit country with traffic in the range, ordered by bytes in and out descending, then country.

Show attributes
country?string

Exit country as an upper-case ISO 3166-1 alpha-2 code. Empty for traffic through endpoints whose country is not known.

totals?ProxyUsageTotals

The country's traffic over the range.

Show attributes
bytesIn?string

Bytes received through the proxy.

Format"int64"

bytesOut?string

Bytes sent through the proxy.

Format"int64"

errorCount?string

Number of those requests that failed. Part of request_count.

Format"int64"

requestCount?string

Number of requests and raw connections made.

Format"int64"

daily?array<ProxyUsageDay>

One entry for every UTC day of the range, in date order, including days with no traffic.

Show attributes
totals?ProxyUsageTotals

The day's traffic. Zero on a day with none.

Show attributes
bytesIn?string

Bytes received through the proxy.

Format"int64"

bytesOut?string

Bytes sent through the proxy.

Format"int64"

errorCount?string

Number of those requests that failed. Part of request_count.

Format"int64"

requestCount?string

Number of requests and raw connections made.

Format"int64"

usageDate?string

The UTC day, as YYYY-MM-DD.

Format"date-time"

pools?array<ProxyUsagePool>

One entry for each pool with traffic in the range, ordered by bytes in and out descending, then pool id.

Show attributes
poolId?string

Opaque 16-byte identifier of the pool, base64-encoded in JSON.

Format"byte" base64

totals?ProxyUsageTotals

The pool's traffic over the range.

Show attributes
bytesIn?string

Bytes received through the proxy.

Format"int64"

bytesOut?string

Bytes sent through the proxy.

Format"int64"

errorCount?string

Number of those requests that failed. Part of request_count.

Format"int64"

requestCount?string

Number of requests and raw connections made.

Format"int64"

totals?ProxyUsageTotals

Traffic over the whole range.

Show attributes
bytesIn?string

Bytes received through the proxy.

Format"int64"

bytesOut?string

Bytes sent through the proxy.

Format"int64"

errorCount?string

Number of those requests that failed. Part of request_count.

Format"int64"

requestCount?string

Number of requests and raw connections made.

Format"int64"

curl -X POST "https://api.goldmine.to/proxies.v1.Proxies/GetProxyUsageTotals" \
  -H "Authorization: Bearer $CSTRADER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "startDate": "2026-11-10",
    "endDate": "2026-11-11"
  }'
{
  "totals": {
    "requestCount": "1500",
    "errorCount": "12",
    "bytesOut": "5242880",
    "bytesIn": "104857600"
  },
  "daily": [
    {
      "usageDate": "2026-11-10",
      "totals": {
        "requestCount": "1500",
        "errorCount": "12",
        "bytesOut": "5242880",
        "bytesIn": "104857600"
      }
    },
    {
      "usageDate": "2026-11-11",
      "totals": {}
    }
  ],
  "pools": [
    {
      "poolId": "AY+MISIifMyN3T09PT09PQ==",
      "totals": {
        "requestCount": "1500",
        "errorCount": "12",
        "bytesOut": "5242880",
        "bytesIn": "104857600"
      }
    }
  ],
  "countries": [
    {
      "country": "US",
      "totals": {
        "requestCount": "1500",
        "errorCount": "12",
        "bytesOut": "5242880",
        "bytesIn": "104857600"
      }
    }
  ]
}