Skip to end of metadata
Go to start of metadata

Currency Service

The API Currency Service is available to clients solely to reconcile amounts paid or received by them resulting from their transactions through the AppNexus Platform and may not be used by clients for any other purpose.

This is a read-only service that shows you the list of currencies that you can set a line-item or insertion-order to use. For more details about when exchange rates are pulled and when they go into effect see Currency Support (customer login required).

REST API

View all available currencies:
GET https://api.appnexus.com/currency

View a specific currency:
GET https://api.appnexus.com/currency?code=CURRENCY_CODE

View a currency's exchange rate for today:
GET https://api.appnexus.com/currency?code=CURRENCY_CODE&show_rate=true

View a currency's exchange rate for a day in the past:
GET https://api.appnexus.com/currency?show_rate=true&code=CURRENCY_CODE&ymd=2012-03-01

We don't get updated exchange rates every day (e.g. not on weekends). If you ask for a rate on a specific day and rate_per_usd is null, you should use the next oldest exchange rate for your calculations. For example, 2012-03-03 and 2012-03-04 are weekend days so we do not have exchange rates for those days. If you make a call asking for the exchange rate on 2012-03-04, we will return null. Instead, you should use the rate from 2012-03-02 for calculations on 2012-03-03 and 2012-03-04.

JSON Fields

Fields

Type

Description

code

string

The code for the currency.

symbol

string

The symbol for the currency, e.g. "$" for USD

name

string

The full name of the currency.

description

string

A description of the currency.

position

enum

Whether the currency symbol appears before or after the amount. Possible values: "before" or "after".

last_modified

string

The date and time when the currency was last modified.

rate_per_usd

double

The exchange rate. This is returned only when you pass show_rate=true in the query string.

as_of

string

The date and time that Oanda last updated the exchange rate in UTC. We pull the rates from Oanda every day at 3:00 a.m. UTC. This is returned only when you pass show_rate=true in the query string.

is_exposed

boolean

If true, the currency is exposed.

Note: To show conversion rates, pass show_rate=true in the URL. You can also retrieve a past day's rate by passing in ymd=YYYYMMDD via the URL.

Examples

View all available currencies
View the EUR exchange rate on March 1, 2012