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

Limited to 4 calls per day. This request counts against its own 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": 6, "remaining": 4 },
    "convert": { "used": 10, "limit": 24, "remaining": 14 },
    "usage": { "used": 1, "limit": 4, "remaining": 3 }
  },
  "today": {
    "total_calls": 13,
    "successful_calls": 12,
    "failed_calls": 1,
    "error_rate_percent": 7.7,
    "by_endpoint": {
      "currencies": 2,
      "convert": 10,
      "usage": 1
    },
    "by_status_class": {
      "2xx": 12,
      "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, "usage": 1 }
    ],
    "by_outcome": [
      { "date": "2026-07-11", "successes": 12, "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.