openapi: 3.1.0 info: title: Polygon Crypto REST Aggregates Conversion API version: '1.0' description: 'Polygon Crypto API exposes aggregated cross-exchange data for crypto pairs (e.g., X:BTCUSD) via `https://api.polygon.io`. This spec covers aggregates, daily open/close, snapshots, and level-2 books. Auth uses an API key via `apiKey` query parameter or `Authorization: Bearer`. ' contact: name: Polygon Documentation url: https://polygon.io/docs/crypto servers: - url: https://api.polygon.io description: Polygon REST API security: - apiKeyQuery: [] - bearerAuth: [] tags: - name: Conversion description: Real-time currency conversion. paths: /v1/conversion/{from}/{to}: get: tags: - Conversion operationId: getForexConversion summary: Convert From One Currency To Another description: Get currency conversion rate and converted amount. parameters: - in: path name: from required: true schema: type: string minLength: 3 maxLength: 3 - in: path name: to required: true schema: type: string minLength: 3 maxLength: 3 - in: query name: amount schema: type: number default: 100 - in: query name: precision schema: type: integer minimum: 0 maximum: 4 default: 2 responses: '200': description: Conversion response content: application/json: schema: $ref: '#/components/schemas/ConversionResponse' components: schemas: ConversionResponse: type: object properties: status: type: string request_id: type: string from: type: string to: type: string initialAmount: type: number converted: type: number last: type: object properties: ask: type: number bid: type: number exchange: type: integer timestamp: type: integer format: int64 securitySchemes: apiKeyQuery: type: apiKey in: query name: apiKey bearerAuth: type: http scheme: bearer bearerFormat: API Key