/usage.json

Get basic plan information and usage statistics for an Open Exchange Rates App ID

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
📘

Requests to usage.info do not count towards your usage volume.

If the App ID you provided is valid, you will receive a JSON response with a status value (containing the HTTP code of the response) and a data object, containing the following attributes:

  • app_id: The app ID you provided.
  • status: The current status of this app ID (either 'active' or 'access_restricted')
  • plan: Plan information for this app ID
  • name: The name of the current plan
  • quota: The monthly request allowance (formatted string for display)
  • update_frequency: The rate at which data refreshes on this plan
  • features: The supported features of this plan (base, symbols, experimental, time-series, convert)
  • usage: Usage information for this app ID
  • requests: Number of requests made since month start
  • requests_quota: Number of requests allowed each month with this plan
  • requests_remaining: Number of requests remaining this month
  • days_elapsed: Number of days since start of month
  • days_remaining: Number of days remaining until next month's start
  • daily_average: Average requests per day

NB: If the App ID belongs to an account with unlimited requests, the usage.requests_quota and usage.requests_remaining values will be -1.

📘

Public Endpoint

Because this API endpoint is accessible to anybody with any App ID, no personal or sensitive account data is ever returned.

Basic Code Samples

$.get('https://openexchangerates.org/api/usage.json', {app_id: 'YOUR_APP_ID'}, function(response) {
    console.log("This Open Exchange Rates app ID has made " + response.data.usage.requests + "hits this month.");
});
<?php
$app_id = '[[app:app_id]]';
$oxr_url = "https://openexchangerates.org/api/latest.json?app_id=" . $app_id;

// Open CURL session:
$ch = curl_init($api_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Get the data:
$json = curl_exec($ch);
curl_close($ch);

// Decode JSON response:
$oxr_latest = json_decode($json);

// You can now access the rates inside the parsed object, like so:
printf(
    "1 %s equals %s GBP at %s",
    $oxr_latest->base,
    $oxr_latest->rates->GBP,
    date('H:i jS F, Y', $oxr_latest->timestamp)
);
// -> eg. "1 USD equals: 0.656741 GBP at 11:11, 11th December 2015"
?>
More code samples are on their way! Please get in touch if you'd like to submit a new/improved code sample in your languague or framework.
Query Params
string
Defaults to Required

Your unique App ID (required)

boolean
Defaults to true

Set 'false' to minify response

Responses

Language
Credentials
Query
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json