ezForex
Toggle sidebar
Log in
Usage

Return a thorough summary of the authenticated user’s API usage: daily quotas, today’s activity, week-over-week comparison, recent trends, and the latest calls.

GET
/api/usage
Bearer auth

Available on Starter and higher plans. This request counts against its plan-specific Usage quota. See Rate limits.

Successful response

HTTP 200

{
  "period": {
    "timezone": "UTC",
    "starts_at": "2026-07-11T00:00:00+00:00",
    "resets_at": "2026-07-12T00:00:00+00:00",
    "seconds_until_reset": 36000
  },
  "quotas": {
    "currencies": { "used": 2, "limit": 100, "remaining": 98 },
    "convert": { "used": 10, "limit": 1000, "remaining": 990 },
    "rates": { "used": 1, "limit": 100, "remaining": 99 },
    "usage": { "used": 1, "limit": 100, "remaining": 99 },
    "history": { "used": 2, "limit": 100, "remaining": 98 }
  },
  "today": {
    "total_calls": 14,
    "successful_calls": 13,
    "failed_calls": 1,
    "error_rate_percent": 7.1,
    "by_endpoint": {
      "currencies": 2,
      "convert": 10,
      "rates": 1,
      "usage": 1,
      "history": 2
    },
    "by_status_class": {
      "2xx": 13,
      "4xx": 1,
      "5xx": 0
    },
    "by_hour": [
      { "hour": "00:00", "count": 0 },
      { "hour": "14:00", "count": 5 }
    ]
  },
  "week": {
    "this_week": 45,
    "last_week": 30,
    "delta": 15
  },
  "last_14_days": {
    "by_endpoint": [
      { "date": "2026-07-11", "currencies": 2, "convert": 10, "rates": 1, "usage": 1, "history": 2 }
    ],
    "by_outcome": [
      { "date": "2026-07-11", "successes": 13, "errors": 1 }
    ]
  },
  "last_call_at": "2026-07-11T14:05:00+00:00",
  "recent": [
    {
      "endpoint": "usage",
      "method": "GET",
      "path": "/api/usage",
      "status_code": 200,
      "created_at": "2026-07-11T14:05:00+00:00"
    }
  ]
}
Response fields
  • period β€” Calendar-day window in the application timezone, including seconds until quota reset.
  • quotas β€” Used, limit, and remaining for each metered endpoint (including this usage endpoint).
  • today β€” Call counts, success/failure split, error rate, endpoint and status-class breakdowns, and hourly distribution.
  • week β€” This week vs last week totals and the delta.
  • last_14_days β€” Daily endpoint volume and success/error outcomes for the trailing two weeks.
  • last_call_at β€” Timestamp of the most recent API call, or null if none.
  • recent β€” Up to 10 most recent calls with endpoint, method, path, status, and time.
Example
curl https://ezforex.your-developer.co.za/api/usage \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
Errors
  • 401 β€” Missing or invalid Bearer token.
  • 429 β€” Daily usage quota exceeded.