List Currencies
Retrieve a list of all currencies.
Code Samples
.NET
using System; namespace RapydApiRequestSample { class Program { static void Main(string[] args) { try { string result = RapydApiRequestSample.Utilities.MakeRequest("GET", "/v1/data/currencies"); Console.WriteLine(result); } catch (Exception e) { Console.WriteLine("Error completing request: " + e.Message); } } } }
JavaScript
const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest; async function main() { try { const result = await makeRequest('GET', '/v1/data/currencies'); console.log(result); } catch (error) { console.error('Error completing request', error); } }
PHP
<?php $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/<path-to-your-utility-file>/utilities.php"; include($path); try { $object = make_request('get', '/v1/data/currencies'); var_dump($object); } catch(Exception $e) { echo "Error: $e"; } ?>
Python
from pprint import pprint from utilities import make_request response = make_request(method='get', path='/v1/data/currencies') pprint(response)
/v1/data/currencies
List Currencies
curl -X get https://sandboxapi.rapyd.net/v1/data/currencies -H 'access_key: your-access-key-here' -H 'Content-Type: application/json' -H 'salt: your-random-string-here' -H 'signature: your-calculated-signature-here' -H 'timestamp: your-unix-timestamp-here'
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "b2605944-980a-40ce-83fd-9cb98ccc51a3" }, "data": [ { "code": "AED", "name": "United Arab Emirates dirham", "symbol": "د.إ", "numeric_code": "784", "digits_after_decimal_separator": 2 }, { "code": "AFN", "name": "Afghan afghani", "symbol": "؋", "numeric_code": "971", "digits_after_decimal_separator": 2 }, { "code": "ALL", "name": "Albanian lek", "symbol": "L", "numeric_code": "008", "digits_after_decimal_separator": 2 }, { "code": "AMD", "name": "Armenian dram", "symbol": "֏", "numeric_code": "051", "digits_after_decimal_separator": 2 } ] }