---
updatedAt: 2026-04-23T08:59:08.000Z
agentTools:
  projectIndex: https://docs.thegivingblock.com/llms.txt
---

# GetCryptoToUSDRate

Get exchange rate for crypto currency to USD

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "The Giving Block REST API service",
    "description": "Public API for integration with TGB",
    "version": "0.100.0"
  },
  "paths": {
    "/v1/crypto-to-usd-rate": {
      "get": {
        "summary": "GetCryptoToUSDRate",
        "description": "Get exchange rate for crypto currency to USD",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "rate": {
                          "type": "number",
                          "format": "float",
                          "description": "Exchange rate"
                        }
                      },
                      "additionalProperties": false,
                      "example": {
                        "rate": 57235.49
                      }
                    },
                    "requestId": {
                      "type": "string",
                      "example": "9a814f5a-58d0-490b-aaad-6227fcdec616"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorMessage": {
                      "type": "string",
                      "example": [
                        "Currency should be in allowed list of deposit currencies"
                      ]
                    },
                    "errorType": {
                      "type": "string",
                      "example": [
                        "err.validation"
                      ]
                    },
                    "meta": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "example": "c8f29f49-fb76-42df-b592-d2ba9853ebc2"
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedError"
                }
              }
            }
          }
        },
        "tags": [
          "Exchange Rate"
        ],
        "security": [
          {
            "PublicApiAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "description": "Currency code",
              "example": "BTC"
            },
            "name": "currency",
            "in": "query",
            "required": true
          }
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://public-api.tgbwidget.com",
      "description": "Production Public API server"
    },
    {
      "url": "https://public-api.sandbox.thegivingblock.com",
      "description": "Sandbox Public API server"
    }
  ],
  "components": {
    "securitySchemes": {
      "PublicApiAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "UnauthorizedError": {
        "type": "object",
        "properties": {
          "errorMessage": {
            "type": "string"
          },
          "errorType": {
            "type": "string"
          },
          "meta": {
            "type": "object",
            "properties": {},
            "additionalProperties": false
          },
          "requestId": {
            "type": "string",
            "example": "42dafda7-f1c3-47f3-8595-45864b7f207f"
          }
        },
        "additionalProperties": false
      }
    }
  }
}
```