> ## Documentation Index
> Fetch the complete documentation index at: https://steamgold.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Курс валютной пары

> Возвращает историю котировок конкретной валютной пары



## OpenAPI

````yaml GET /currency/{pair}
openapi: 3.0.1
info:
  title: OpenAPI SteamGold
  description: Is used for steamgold API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.steamgold.dev/v1
security:
  - bearerAuth: []
paths:
  /currency/{pair}:
    get:
      description: Возвращает историю котировок конкретной валютной пары
      parameters:
        - name: pair
          in: path
          description: Валютная пара в формате `XXX:YYY` (заглавные латинские буквы)
          required: true
          schema:
            type: string
            pattern: ^[A-Z]{3}:[A-Z]{3}$
        - name: count
          in: query
          description: >-
            Количество последних записей. Минимум 1, максимум 90. По умолчанию
            возвращается одна свежая запись.
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 90
      responses:
        '200':
          description: История котировок
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrencyPairsResponse'
        '400':
          description: Некорректный формат пары или параметров запроса
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Отсутствует авторизация
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CurrencyPairsResponse:
      type: object
      description: Ответ со списком котировок валютных пар
      properties:
        status:
          type: integer
          description: HTTP-код ответа
        items:
          type: array
          description: Список котировок
          items:
            $ref: '#/components/schemas/CurrencyPairItem'
        total:
          type: integer
          description: Количество записей в ответе
        message:
          type: string
          description: Дополнительное сообщение
    Error:
      required:
        - code
        - message
      type: object
      properties:
        code:
          description: HTTP-код ответа
          type: integer
          format: int32
        message:
          description: Сообщение об ошибке
          type: string
    CurrencyPairItem:
      type: object
      properties:
        currency_pair:
          type: string
          description: Валютная пара в формате `XXX:YYY`
        close_price:
          type: number
          description: Цена закрытия пары
        created_at:
          type: string
          description: Дата фиксации котировки в формате `YYYY-MM-DD HH:mm:ss`
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````