RTB API

Using merchenta.io for real-time bidding

Currency metadata 

Our platform provides support for multiple currencies. In numerous places we have to convert currencies and below we present endpoints which returns the foreign exchange rates used for conversions.

Currencies list 

Gets the list of supported currencies.

/v3/metadata/currencies
  • Curl
  • Copy
    curl -i \ -X GET \ -H 'Authorization: Bearer {YOUR_TOKEN_HERE}' \ https://sandbox.rtbapi.io/v3/metadata/currencies
  • Response  200
  • Headers
    Content-Type: application/json
    Schema
    {
        "type": "array",
        "items": {
            "type": "object",
            "properties": {
                "code": {
                    "type": "string"
                },
                "name": {
                    "type": "string"
                }
            }
        }
    }
    
    Example body
    {
        "status": "success",
        "data": {
            "currencies": [
                {
                    "code": "AUD",
                    "name": "Australia Dollars"
                },
                {
                    "code": "GBP",
                    "name": "United Kingdom Pounds"
                }
            ]
        }
    }

Latest fx rate 

Gets the latest (today’s) given currency to USD conversion factor.

/v3/metadata/fx/{currencyCode}
  • Parameters
  • currencyCode
    string (required) Example: GBP

    The currency code

  • Curl
  • Copy
    curl -i \ -X GET \ -H 'Authorization: Bearer {YOUR_TOKEN_HERE}' \ https://sandbox.rtbapi.io/v3/metadata/fx/GBP
  • Response  200
  • Headers
    Content-Type: application/json
    Schema
    {
        "type": "object",
        "properties": {
            "currencyCode": {
                "type": "string"
            },
            "currencyName": {
                "type": "string"
            },
            "fxRateToUSD": {
                "type": "number"
            },
            "rateDate": {
                "format": "local-date-time",
                "type": "string"
            }
        }
    }
    
    Example body
    {
        "status": "success",
        "data": {
            "fxRate": {
                "currencyCode": "GBP",
                "currencyName": "United Kingdom Pounds",
                "fxRateToUSD": 1.572592875348,
                "rateDate": "2014-10-01T01:00:00.000"
            }
        }
    }
  • Response  404

Historical fx rate 

Gets the historical (for given date) given currency to USD conversion factor.

Note

Only historical dates are supported in this endpoint, for latest rates use latest fx rate endpoint

/v3/metadata/fx/{currencyCode}/{date}
  • Parameters
  • currencyCode
    string (required) Example: GBP

    The currency code

    date
    string (required) Example: 2014-08-27

    The currency rate date

  • Curl
  • Copy
    curl -i \ -X GET \ -H 'Authorization: Bearer {YOUR_TOKEN_HERE}' \ https://sandbox.rtbapi.io/v3/metadata/fx/GBP/2014-08-27
  • Response  200
  • Headers
    Content-Type: application/json
    Schema
    {
        "type": "object",
        "properties": {
            "currencyCode": {
                "type": "string"
            },
            "currencyName": {
                "type": "string"
            },
            "fxRateToUSD": {
                "type": "number"
            },
            "rateDate": {
                "format": "local-date-time",
                "type": "string"
            }
        }
    }
    
    Example body
    {
        "status": "success",
        "data": {
            "fxRate": {
                "currencyCode": "GBP",
                "currencyName": "United Kingdom Pounds",
                "fxRateToUSD": 1.605030889885,
                "rateDate": "2014-08-27T01:00:00.000"
            }
        }
    }
  • Response  400
  • Response  404
Next page  Previous page