---
agentTools:
  projectIndex: https://chimoney.readme.io/llms.txt
---

# Get exchange rates.

Retrieves the latest currency exchange rates.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Chimoney API Docs",
    "version": "0.2.4",
    "description": "This is the latest version of the Chimoney API. For deprecated version routes, please refer to /v0.2/api-docs."
  },
  "security": [
    {
      "apiKeyAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.chimoney.io/",
      "description": "Prod Server"
    },
    {
      "url": "https://api-v2-sandbox.chimoney.io",
      "description": "Sandbox API v2 (v0.2.4)"
    }
  ],
  "paths": {
    "/v0.2.4/info/exchange-rates": {
      "get": {
        "summary": "Get exchange rates.",
        "tags": [
          "Info"
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the request.",
                      "example": "success"
                    },
                    "message": {
                      "type": "string",
                      "description": "Message indicating the result of the operation.",
                      "example": "Exchange rates retrieved successfully"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "USDAED": {
                          "type": "number",
                          "description": "Exchange rate from USD to AED.",
                          "example": 2.634
                        },
                        "NGNUSD": {
                          "type": "number",
                          "description": "Exchange rate from NGN to USD.",
                          "example": 0.0006
                        },
                        "NGNSTN": {
                          "type": "number",
                          "description": "Exchange rate from NGN to STN.",
                          "example": 0.0511
                        },
                        "validUntil": {
                          "type": "string",
                          "description": "Date and time when the exchange rates are valid until (UTC).",
                          "example": "9/9/2024, 8:00:00 AM UTC"
                        },
                        "expiresAt": {
                          "type": "string",
                          "description": "Expiration date and time for the exchange rates (UTC).",
                          "example": "9/9/2024, 8:00:00 AM UTC"
                        },
                        "expiresAtTimestamp": {
                          "type": "integer",
                          "description": "Unix timestamp when the exchange rates expire.",
                          "example": 1725868800000
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "description": "Exchange rate retrieval failed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "Status of the error.",
                      "example": "error"
                    },
                    "type": {
                      "type": "string",
                      "description": "Type of error.",
                      "example": "Exchange Rate Error"
                    },
                    "code": {
                      "type": "string",
                      "description": "Error code.",
                      "example": "EXCHANGE_RATE_FETCH_FAILED,"
                    },
                    "message": {
                      "type": "string",
                      "description": "Detailed error message.",
                      "example": "Failed to retrieve exchange rates."
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    },
    "responses": {
      "Forbidden": {
        "description": "Access to this resource is forbidden.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Forbidden"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Access to this resource is not available for unauthenticated users.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Unauthorized"
            }
          }
        }
      }
    },
    "schemas": {
      "Forbidden": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the response.",
            "example": "error"
          },
          "error": {
            "type": "string",
            "description": "Error message indicating forbidden access.",
            "example": "API Access not enabled for account Test. Email support@chimoney.io"
          }
        }
      },
      "Unauthorized": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Status of the response.",
            "example": "error"
          },
          "error": {
            "type": "string",
            "description": "Error message indicating unauthorized access.",
            "example": "API key is not defined. Generate a new one from the developer portal."
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Info",
      "description": "All info related endpoints."
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 102,
      "1": 208,
      "2": 243,
      "3": 240,
      "4": 73,
      "5": 214,
      "6": 34,
      "7": 0,
      "8": 37,
      "9": 190,
      "10": 200,
      "11": 166
    }
  }
}
```