{"_id":"56a480315fb2530d00421b75","editedParams2":true,"project":"55312174c68f493900aebb3f","editedParams":true,"category":{"_id":"566b59110506f40d0034f148","__v":5,"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"},"user":"5531215e29603d2300011341","version":{"_id":"55312174c68f493900aebb42","project":"55312174c68f493900aebb3f","__v":10,"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"},"__v":1,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-24T07:41:37.678Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"results":{"codes":[]},"settings":"","auth":"required","params":[{"_id":"566b5afcec4a320d00a8ca77","ref":"","in":"body","required":false,"desc":"","default":"USD","type":"string","name":"base"},{"_id":"566cabbef0a5dc0d009acbc6","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"app_id"}],"url":"/latest.json"},"isReference":false,"order":2,"body":"You may add data for all supported unofficial, black market and alternative digital currencies by adding the  `show_alternative` query parameter to your API request. The list of supported 'alternative' currencies is **[here](doc:supported-currencies#unofficial-black-market-and-alternative-digital-cu)**.\n\nSome of these rates are due to be added to the primary API (such as LTC/Litecoin and ETH/Ether), while others will remain available only through the `show_alternative` API parameter (such as VEF_DIPRO and VEF_DICOM).\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Beta Feature\",\n  \"body\": \"Alternative currencies data are available for all clients, and the feature is currently in extended beta. The request and response format may change and currencies may be added and removed (but we'll post an update via our Status Page whenever this happens).\\n\\nYou may contact us with any feedback or questions about this feature and the returned rates at support:::at:::openexchangerates.org.\\n\\n**Please note:** As of 31 January 2017, we have updated the terminology for this API endpoint to  `show_alternative` and `only_alternative`. We will continue to support the earlier query parameters (`show_experimental` and `only_experimental`) indefinitely.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Request Latest 'Alternative' Rates\"\n}\n[/block]\nAppend the `show_alternative` query parameter to your `latest.json` API request, like so:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://openexchangerates.org/api/latest.json\\n    ?app_id=YOUR_APP_ID\\n    &show_alternative=1\",\n      \"language\": \"http\"\n    },\n    {\n      \"code\": \"$.get('https://openexchangerates.org/api/latest.json', {app_id: 'YOUR_APP_ID', show_alternative: 1}, 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 additional rates added to the `rates` object:\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\\\": \\\"EUR\\\",\\n    \\\"rates\\\": {\\n        \\\"AED\\\": 4.626447,\\n        \\\"AFN\\\": 61.002415,\\n        \\\"ALL\\\": 137.92617,\\n        /* ... */\\n    }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nEach new symbol can be set as the [base currency](doc:changing-base-currency), if available in the returned data set (default is USD).\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Alternative rate symbols are not limited to standard international 3-letter ISO codes, and may have fewer or more characters. \\n\\nYou can find a full list via the `currencies.json` route (see below), and our [list of supported currencies](doc:supported-currencies#unofficial-black-market-and-alternative-digital-cu).\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Show Only Alternative Rates\"\n}\n[/block]\nYou may also request to see only the alternative rates in your API response (excluding the standard list), by using the `only_alternative` query parameter **instead of** `show_alternative`:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://openexchangerates.org/api/latest.json\\n    ?app_id=YOUR_APP_ID\\n    &only_alternative=1\",\n      \"language\": \"http\"\n    },\n    {\n      \"code\": \"$.get('https://openexchangerates.org/api/latest.json', {app_id: 'YOUR_APP_ID', only_alternative: 1}, function(data) {\\n    console.log(data);\\n});\",\n      \"language\": \"javascript\",\n      \"name\": \"jQuery\"\n    }\n  ]\n}\n[/block]\nThe response will only contain the experimental rates currently offered:\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\\\": \\\"EUR\\\",\\n    \\\"rates\\\": {\\n        \\\"DASH\\\": 0.225464297,\\n        \\\"DOGE\\\": 5840.74485,\\n        \\\"EAC\\\": 8031.02416875,\\n        /* ... */\\n    }\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nOnly currencies in the returned list can be set as a base currency.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Get List Of Available Alternative Currencies\"\n}\n[/block]\nThe `show_alternative` and `only_alternative` query options can be added to requests for our `currencies.json` endpoint, to view the rate symbols and names:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://openexchangerates.org/api/currencies.json\\n    ?show_alternative=1\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]\nYou can view a list of supported alternative rates **[here](doc:supported-currencies#unofficial-black-market-and-alternative-digital-cu)**.\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: 'YOUR_APP_ID', show_alternative: 1}, function(data) {\\n    console.log(\\\"1 USD equals \\\" + data.rates.DOGE + \\\" DogeCoin.\\\");\\n    console.log(\\\"1 USD equals \\\" + data.rates.VEF_BLKMKT + \\\" Venezuelan Bolivar on the black market.\\\");\\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]\nAlternative, digital and black-market rates can be combined with all other parameters on the latest.json endpoint:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://openexchangerates.org/api/latest.json\\n    ?app_id=YOUR_APP_ID\\n    &base=LTC\\n    &show_alternative=1\\n    &symbols=ETH,VEF,VEF_DIPRO,VEF_DICOM,VEF_BLKMKT,BTC,NEM\\n    &prettyprint=0\",\n      \"language\": \"http\"\n    }\n  ]\n}\n[/block]","excerpt":"Certain alternative rates aren't suitable for our primary API endpoints, but have been commonly requested by our clients (such as the Dicom/Dipro and black market rates for Venezuelan Bolìvar, and 20+ alternative digital currencies).\n\nYou may now request rates for unofficial, black market and alternative digital currencies by adding a simple API parameter onto your request. Currently available for Latest rates only.","slug":"alternative-currencies","type":"basic","title":"Alternative Rates (beta)"}

Alternative Rates (beta)

Certain alternative rates aren't suitable for our primary API endpoints, but have been commonly requested by our clients (such as the Dicom/Dipro and black market rates for Venezuelan Bolìvar, and 20+ alternative digital currencies). You may now request rates for unofficial, black market and alternative digital currencies by adding a simple API parameter onto your request. Currently available for Latest rates only.

You may add data for all supported unofficial, black market and alternative digital currencies by adding the `show_alternative` query parameter to your API request. The list of supported 'alternative' currencies is **[here](doc:supported-currencies#unofficial-black-market-and-alternative-digital-cu)**. Some of these rates are due to be added to the primary API (such as LTC/Litecoin and ETH/Ether), while others will remain available only through the `show_alternative` API parameter (such as VEF_DIPRO and VEF_DICOM). [block:callout] { "type": "warning", "title": "Beta Feature", "body": "Alternative currencies data are available for all clients, and the feature is currently in extended beta. The request and response format may change and currencies may be added and removed (but we'll post an update via our Status Page whenever this happens).\n\nYou may contact us with any feedback or questions about this feature and the returned rates at support@openexchangerates.org.\n\n**Please note:** As of 31 January 2017, we have updated the terminology for this API endpoint to `show_alternative` and `only_alternative`. We will continue to support the earlier query parameters (`show_experimental` and `only_experimental`) indefinitely." } [/block] [block:api-header] { "type": "basic", "title": "Request Latest 'Alternative' Rates" } [/block] Append the `show_alternative` query parameter to your `latest.json` API request, like so: [block:code] { "codes": [ { "code": "https://openexchangerates.org/api/latest.json\n ?app_id=YOUR_APP_ID\n &show_alternative=1", "language": "http" }, { "code": "$.get('https://openexchangerates.org/api/latest.json', {app_id: 'YOUR_APP_ID', show_alternative: 1}, 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 additional rates added to the `rates` object: [block:code] { "codes": [ { "code": "{\n disclaimer: \"https://openexchangerates.org/terms/\",\n license: \"https://openexchangerates.org/license/\",\n \"timestamp\": 1424127600,\n \"base\": \"EUR\",\n \"rates\": {\n \"AED\": 4.626447,\n \"AFN\": 61.002415,\n \"ALL\": 137.92617,\n /* ... */\n }\n}", "language": "json" } ] } [/block] Each new symbol can be set as the [base currency](doc:changing-base-currency), if available in the returned data set (default is USD). [block:callout] { "type": "info", "body": "Alternative rate symbols are not limited to standard international 3-letter ISO codes, and may have fewer or more characters. \n\nYou can find a full list via the `currencies.json` route (see below), and our [list of supported currencies](doc:supported-currencies#unofficial-black-market-and-alternative-digital-cu)." } [/block] [block:api-header] { "type": "basic", "title": "Show Only Alternative Rates" } [/block] You may also request to see only the alternative rates in your API response (excluding the standard list), by using the `only_alternative` query parameter **instead of** `show_alternative`: [block:code] { "codes": [ { "code": "https://openexchangerates.org/api/latest.json\n ?app_id=YOUR_APP_ID\n &only_alternative=1", "language": "http" }, { "code": "$.get('https://openexchangerates.org/api/latest.json', {app_id: 'YOUR_APP_ID', only_alternative: 1}, function(data) {\n console.log(data);\n});", "language": "javascript", "name": "jQuery" } ] } [/block] The response will only contain the experimental rates currently offered: [block:code] { "codes": [ { "code": "{\n disclaimer: \"https://openexchangerates.org/terms/\",\n license: \"https://openexchangerates.org/license/\",\n \"timestamp\": 1424127600,\n \"base\": \"EUR\",\n \"rates\": {\n \"DASH\": 0.225464297,\n \"DOGE\": 5840.74485,\n \"EAC\": 8031.02416875,\n /* ... */\n }\n}", "language": "json" } ] } [/block] Only currencies in the returned list can be set as a base currency. [block:api-header] { "type": "basic", "title": "Get List Of Available Alternative Currencies" } [/block] The `show_alternative` and `only_alternative` query options can be added to requests for our `currencies.json` endpoint, to view the rate symbols and names: [block:code] { "codes": [ { "code": "https://openexchangerates.org/api/currencies.json\n ?show_alternative=1", "language": "http" } ] } [/block] You can view a list of supported alternative rates **[here](doc:supported-currencies#unofficial-black-market-and-alternative-digital-cu)**. [block:api-header] { "type": "basic", "title": "Basic Code Samples" } [/block] [block:code] { "codes": [ { "code": "$.get('https://openexchangerates.org/api/latest.json', {app_id: 'YOUR_APP_ID', show_alternative: 1}, function(data) {\n console.log(\"1 USD equals \" + data.rates.DOGE + \" DogeCoin.\");\n console.log(\"1 USD equals \" + data.rates.VEF_BLKMKT + \" Venezuelan Bolivar on the black market.\");\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] Alternative, digital and black-market rates can be combined with all other parameters on the latest.json endpoint: [block:code] { "codes": [ { "code": "https://openexchangerates.org/api/latest.json\n ?app_id=YOUR_APP_ID\n &base=LTC\n &show_alternative=1\n &symbols=ETH,VEF,VEF_DIPRO,VEF_DICOM,VEF_BLKMKT,BTC,NEM\n &prettyprint=0", "language": "http" } ] } [/block]