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

# Conversion

> Convert one symbol to another



## OpenAPI

````yaml /openapi.json get /currencies/convert/{from}/{to}
openapi: 3.1.0
info:
  title: tradewatch.io
  version: 3.1.0
  description: Financial market data for Developers
servers:
  - url: https://api.tradewatch.io
    description: Production API server
security:
  - API Key: []
tags:
  - name: Account
    description: >-
      In this section, you can find methods that can be helpful to manage your
      API account.
    x-displayName: Account
  - name: Currencies
    description: >-
      In this section, you can find methods that can be helpful to retrieve data
      for traditional currencies (Forex).
    x-displayName: Currencies
  - name: Crypto
    description: >-
      In this section, you can find methods that can be helpful to retrieve data
      for cryptocurrencies.
    x-displayName: Crypto
  - name: Indices
    description: >-
      In this section, you can find methods that can be helpful to retrieve data
      for market indices.
    x-displayName: Indices
  - name: Stocks
    description: >-
      In this section, you can find methods that can be helpful to retrieve data
      for stocks and equities.
    x-displayName: Stocks
  - name: Fundamentals
    description: Financial statements and company data sourced from SEC EDGAR filings.
  - name: Markets
    description: Stock exchange and market session information.
  - name: Commodities
    description: >-
      In this section, you can find methods that can be helpful to retrieve data
      for commodities.
    x-displayName: Commodities
paths:
  /currencies/convert/{from}/{to}:
    get:
      tags:
        - Currencies
      summary: Conversion
      description: Convert one symbol to another
      operationId: currencies_convert
      parameters:
        - name: from
          in: path
          required: true
          schema:
            type: string
            title: 'From '
            description: The symbol you want to convert from.
          description: The symbol you want to convert from.
        - name: to
          in: path
          required: true
          schema:
            type: string
            title: To
            description: The symbol you want to convert to.
          description: The symbol you want to convert to.
        - name: amount
          in: query
          required: false
          schema:
            type: number
            minimum: 0.01
            title: Amount
            description: The amount to be converted.
            default: 10
          description: The amount to be converted.
        - name: precision
          in: query
          required: false
          schema:
            type: integer
            title: Precision
            description: The decimal precision of the result.
            default: 5
          description: The decimal precision of the result.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversion'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Conversion:
      properties:
        info:
          $ref: '#/components/schemas/ConversionInfo'
        query:
          $ref: '#/components/schemas/ConversionQuery'
        result:
          type: number
          title: Result of the conversion
      type: object
      required:
        - info
        - query
        - result
      title: Conversion
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ConversionInfo:
      properties:
        timestamp:
          type: integer
          exclusiveMinimum: 0
          title: Timestamp of a tick.
          example: 1704882030
        rate:
          type: number
          exclusiveMinimum: 0
          title: Value of a tick.
          example: 1.23456
      type: object
      required:
        - timestamp
        - rate
      title: ConversionInfo
    ConversionQuery:
      properties:
        from:
          type: string
          title: 'From '
          description: The symbol you want to convert from.
        to:
          type: string
          title: To
          description: The symbol you want to convert to.
        amount:
          type: number
          minimum: 0.01
          title: Amount
          description: The amount to be converted.
          default: 10
        precision:
          type: integer
          title: Precision
          description: The decimal precision of the result.
          default: 5
      type: object
      required:
        - from
        - to
      title: ConversionQuery
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    API Key:
      description: Authentication via API key header
      type: apiKey
      name: api-key
      in: header

````