Rates
GET /api/currencies/rates
Section titled “GET /api/currencies/rates”Get Rates
Section titled “Get Rates”This endpoint retrieves all the application currency exchange rates. The response returns a list of rate objects with their names, groups, and values.
Request Details
Section titled “Request Details”- Method:
GET - URL:
https://api.money-go.com/api/currencies/rates
Code Examples
Section titled “Code Examples”curl -X GET "https://api.money-go.com/api/currencies/rates"<?php
$url = "https://api.money-go.com/api/currencies/rates";$result = file_get_contents($url);if ($result === FALSE) { die('Error fetching rates');}$response = json_decode($result, true);print_r($response);import fetch from 'node-fetch';
async function getRates(): Promise<void> { const url = "https://api.money-go.com/api/currencies/rates"; try { const response = await fetch(url, { method: "GET" }); if (!response.ok) { throw new Error(`HTTP error! Status: ${response.status}`); } const data = await response.json(); console.log("Rates:", data); } catch (error) { console.error("Error fetching rates:", error); }}
getRates();Response 200 (application/json)
Section titled “Response 200 (application/json)”{ "status": true, "data": [ { "name": "EUR/USD", "group": "USD", "value": 1.09 } ]}Field Descriptions
Section titled “Field Descriptions”Root Object
Section titled “Root Object”| Field | Type | Description |
|---|---|---|
| status | boolean | Indicates whether the request was successful. |
| data | array | List of rate objects. |
Rate Object
Section titled “Rate Object”| Field | Type | Description |
|---|---|---|
| name | string | The name of the currency pair (e.g., “EUR/USD”). |
| group | string | The base currency group (e.g., “USD”). |
| value | number | The exchange rate value for the currency pair. |