{"__v":1,"_id":"566b63213d25d00d0066b00a","category":{"__v":5,"_id":"566b59110506f40d0034f148","pages":["566b5afcec4a320d00a8ca76","566b63213d25d00d0066b00a","56a47942e5e9190d00ad6200","56a480315fb2530d00421b75","56a489ae9093960d00f9ab31"],"project":"55312174c68f493900aebb3f","version":"55312174c68f493900aebb42","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-12-11T23:15:29.864Z","from_sync":false,"order":2,"slug":"extra-parameters","title":"Extra Parameters"},"editedParams":true,"editedParams2":true,"project":"55312174c68f493900aebb3f","user":"5531215e29603d2300011341","version":{"__v":10,"_id":"55312174c68f493900aebb42","project":"55312174c68f493900aebb3f","createdAt":"2015-04-17T15:06:28.598Z","releaseDate":"2015-04-17T15:06:28.598Z","categories":["55312175c68f493900aebb43","566b431d03b4b20d00d02c3a","566b58f212bc0517005d3068","566b59110506f40d0034f148","566b7cc94d1a4d0d00801c00","566b82d130cdb417008d217d","566b855b4d1a4d0d00801c04","566b856f03870a0d008ee7a7","566c42d2f0a5dc0d009acbab","566c443d85dc790d0062c134"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"0.7.0","version":"0.7"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-11T23:58:25.406Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[{"_id":"566b5afcec4a320d00a8ca78","ref":"","in":"path","required":false,"desc":"","default":"latest.json","type":"string","name":"route"},{"_id":"566b5afcec4a320d00a8ca77","ref":"","in":"path","required":false,"desc":"","default":"USD","type":"string","name":"base"}],"url":"/:route?base=:base"},"isReference":true,"order":1,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Pro Feature\",\n  \"body\": \"Requesting specific currency rates is currently available for clients on the Developer, Enterprise and Unlimited plans.\"\n}\n[/block]\n\nSymbols (currencies) should be provided as a comma-separated list of standard 3-letter ISO currency codes (see our list of available API currencies if in doubt), in any order.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Basic Request & Response\"\n}\n[/block]\nAppend the `symbols` query parameter to your API request, along with the comma-separated list of 3-digit ISO currency codes or symbols you require (in any order), like so:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://openexchangerates.org/api/latest.json\\n    ?app_id=[[app:app_id]]\\n    &symbols=GBP,EUR,AED,CAD\",\n      \"language\": \"http\"\n    },\n    {\n      \"code\": \"$.get('https://openexchangerates.org/api/latest.json', {app_id: '[[app:app_id]]', symbols: 'GBP,EUR,AED,CAD'}, function(data) {\\n    console.log(data);\\n});\",\n      \"language\": \"javascript\",\n      \"name\": \"jQuery\"\n    }\n  ]\n}\n[/block]\nThe response format is exactly the same as the standard API response, with all rates in the `rates` object given relative to 1 standard unit of your requested `base` currency:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    disclaimer: \\\"https://openexchangerates.org/terms/\\\",\\n    license: \\\"https://openexchangerates.org/license/\\\",\\n    \\\"timestamp\\\": 1424127600,\\n    \\\"base\\\": \\\"USD\\\",\\n    \\\"rates\\\": {\\n        \\\"AED\\\": 3.67295,\\n        \\\"CAD\\\": 0.99075,\\n        \\\"EUR\\\": 0.793903,\\n        \\\"GBP\\\": 0.62885\\n    }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThe response format is the same as the standard API response, with only your requested currencies delivered in the `rates` object.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Basic Code Samples\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$.get('https://openexchangerates.org/api/latest.json', {app_id: '[[app:app_id]]', symbols: 'QAR,RUB,SEK'}, function(data) {\\n    console.log(\\\"1 US Dollar equals \\\" + data.rates.SEK + \\\" Swedish Krona\\\");\\n});\",\n      \"language\": \"javascript\",\n      \"name\": \"jQuery\"\n    },\n    {\n      \"code\": \"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.\",\n      \"language\": \"text\",\n      \"name\": \"Others...\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Combining Parameters\"\n}\n[/block]\nRequesting specific currency symbols can be combined with other API parameters, such as changing the base currency (`base`) and JSONP callbacks (`callback`) – for example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://openexchangerates.org/api/historical/2015-02-16.json\\n    ?app_id=[[app:app_id]]\\n    &base=CAD\\n    &symbols=AUD,GBP,EUR\\n    &callback=someFunctionName\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\nThe response will combine your parameters:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"someFunctionName(\\n{\\n    disclaimer: \\\"https://openexchangerates.org/terms/\\\",\\n    license: \\\"https://openexchangerates.org/license/\\\",\\n    timestamp: 1424127600,\\n    base: \\\"CAD\\\",\\n    rates: {\\n            AUD: 1.032828,\\n            EUR: 0.706867,\\n            GBP: 0.522328,\\n        }\\n    }\\n)\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nThe parameter is also available (and strongly recommended) for Time Series requests.","excerpt":"By default, the API returns rates for all currencies, but if you need to minimise transfer size, you can request a limited subset of exchange rates, where available, by setting the `symbols` (alias: `currencies`) parameter in your request.","slug":"requesting-specific-rates","type":"basic","title":"Requesting Specific Rates"}

Requesting Specific Rates

By default, the API returns rates for all currencies, but if you need to minimise transfer size, you can request a limited subset of exchange rates, where available, by setting the `symbols` (alias: `currencies`) parameter in your request.

[block:callout] { "type": "info", "title": "Pro Feature", "body": "Requesting specific currency rates is currently available for clients on the Developer, Enterprise and Unlimited plans." } [/block] Symbols (currencies) should be provided as a comma-separated list of standard 3-letter ISO currency codes (see our list of available API currencies if in doubt), in any order. [block:api-header] { "type": "basic", "title": "Basic Request & Response" } [/block] Append the `symbols` query parameter to your API request, along with the comma-separated list of 3-digit ISO currency codes or symbols you require (in any order), like so: [block:code] { "codes": [ { "code": "https://openexchangerates.org/api/latest.json\n ?app_id=[[app:app_id]]\n &symbols=GBP,EUR,AED,CAD", "language": "http" }, { "code": "$.get('https://openexchangerates.org/api/latest.json', {app_id: '[[app:app_id]]', symbols: 'GBP,EUR,AED,CAD'}, function(data) {\n console.log(data);\n});", "language": "javascript", "name": "jQuery" } ] } [/block] The response format is exactly the same as the standard API response, with all rates in the `rates` object given relative to 1 standard unit of your requested `base` currency: [block:code] { "codes": [ { "code": "{\n disclaimer: \"https://openexchangerates.org/terms/\",\n license: \"https://openexchangerates.org/license/\",\n \"timestamp\": 1424127600,\n \"base\": \"USD\",\n \"rates\": {\n \"AED\": 3.67295,\n \"CAD\": 0.99075,\n \"EUR\": 0.793903,\n \"GBP\": 0.62885\n }\n}", "language": "json" } ] } [/block] The response format is the same as the standard API response, with only your requested currencies delivered in the `rates` object. [block:api-header] { "type": "basic", "title": "Basic Code Samples" } [/block] [block:code] { "codes": [ { "code": "$.get('https://openexchangerates.org/api/latest.json', {app_id: '[[app:app_id]]', symbols: 'QAR,RUB,SEK'}, function(data) {\n console.log(\"1 US Dollar equals \" + data.rates.SEK + \" Swedish Krona\");\n});", "language": "javascript", "name": "jQuery" }, { "code": "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.", "language": "text", "name": "Others..." } ] } [/block] [block:api-header] { "type": "basic", "title": "Combining Parameters" } [/block] Requesting specific currency symbols can be combined with other API parameters, such as changing the base currency (`base`) and JSONP callbacks (`callback`) – for example: [block:code] { "codes": [ { "code": "https://openexchangerates.org/api/historical/2015-02-16.json\n ?app_id=[[app:app_id]]\n &base=CAD\n &symbols=AUD,GBP,EUR\n &callback=someFunctionName", "language": "http" } ] } [/block] The response will combine your parameters: [block:code] { "codes": [ { "code": "someFunctionName(\n{\n disclaimer: \"https://openexchangerates.org/terms/\",\n license: \"https://openexchangerates.org/license/\",\n timestamp: 1424127600,\n base: \"CAD\",\n rates: {\n AUD: 1.032828,\n EUR: 0.706867,\n GBP: 0.522328,\n }\n }\n)", "language": "json" } ] } [/block] The parameter is also available (and strongly recommended) for Time Series requests.