---
updatedAt: 2025-09-22T17:23:32.000Z
agentTools:
  projectIndex: https://developer.bitpay.com/llms.txt
---

# Retrieve the rates for a cryptocurrency / fiat pair

Facades: `public`

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "test",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://test.bitpay.com"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/rates/{basecurrency}/{currency}": {
      "get": {
        "summary": "Retrieve the rates for a cryptocurrency / fiat pair",
        "description": "Facades: `public`",
        "operationId": "retrieve-the-rates-for-a-cryptocurrency-fiat-pair",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "Must be set to `application/json` for requests to the BitPay API",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "X-Accept-Version",
            "in": "header",
            "description": "Must be set to `2.0.0` for requests to the BitPay API",
            "required": true,
            "schema": {
              "type": "string",
              "default": "2.0.0"
            }
          },
          {
            "name": "baseCurrency",
            "in": "path",
            "description": "The cryptocurrency for which you want to fetch the rates. Current supported values are BTC and BCH",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "currency",
            "in": "path",
            "description": "the fiat currency for which you want to fetch the `baseCurrency` rates",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"data\":{\n    \"code\":\"USD\",\n    \"name\":\"US Dollar\",\n    \"rate\":41154.05\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "example": "USD"
                        },
                        "name": {
                          "type": "string",
                          "example": "US Dollar"
                        },
                        "rate": {
                          "type": "number",
                          "example": 41154.05,
                          "default": 0
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": []
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```