{ "swagger": "2.0", "info": { "version": "v1", "title": "currencyapi", "description": "The currency APIs help you retrieve exchange rates and convert prices between currencies easily." }, "host": "api.cloudmersive.com", "schemes": [ "https" ], "paths": { "/currency/exchange-rates/list-available": { "post": { "tags": [ "CurrencyExchange" ], "summary": "Get a list of available currencies and corresponding countries", "description": "Enumerates available currencies and the countries that correspond to these currencies.", "operationId": "CurrencyExchange_GetAvailableCurrencies", "consumes": [], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/AvailableCurrencyResponse" } } }, "security": [ { "Apikey": [] } ] } }, "/currency/exchange-rates/convert/{source}/to/{destination}": { "post": { "tags": [ "CurrencyExchange" ], "summary": "Converts a price from the source currency into the destination currency", "description": "Automatically converts the price in the source currency into the destination currency using the latest available currency exchange rate data.", "operationId": "CurrencyExchange_ConvertCurrency", "consumes": [ "application/json", "text/json" ], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "name": "source", "in": "path", "description": "Source currency three-digit code (ISO 4217), e.g. USD, EUR, etc.", "required": true, "type": "string" }, { "name": "destination", "in": "path", "description": "Destination currency three-digit code (ISO 4217), e.g. USD, EUR, etc.", "required": true, "type": "string" }, { "name": "sourcePrice", "in": "body", "description": "Input price, such as 19.99 in source currency", "required": true, "schema": { "format": "double", "type": "number" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ConvertedCurrencyResult" } } }, "security": [ { "Apikey": [] } ] } }, "/currency/exchange-rates/get/{source}/to/{destination}": { "post": { "tags": [ "CurrencyExchange" ], "summary": "Gets the exchange rate from the source currency into the destination currency", "description": "Automatically gets the exchange rate from the source currency into the destination currency using the latest available currency exchange rate data.", "operationId": "CurrencyExchange_GetExchangeRate", "consumes": [], "produces": [ "application/json", "text/json", "application/xml", "text/xml" ], "parameters": [ { "name": "source", "in": "path", "description": "Source currency three-digit code (ISO 4217), e.g. USD, EUR, etc.", "required": true, "type": "string" }, { "name": "destination", "in": "path", "description": "Destination currency three-digit code (ISO 4217), e.g. USD, EUR, etc.", "required": true, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ExchangeRateResult" } } }, "security": [ { "Apikey": [] } ] } } }, "definitions": { "AvailableCurrencyResponse": { "description": "Result of performing an enumerate currencies operation", "type": "object", "properties": { "Currencies": { "description": "List of available currencies from the API", "type": "array", "items": { "$ref": "#/definitions/AvailableCurrency" } } } }, "AvailableCurrency": { "description": "Details of a specific currency", "type": "object", "properties": { "ISOCurrencyCode": { "description": "ISO 4217 currency three-letter code associated with the country", "type": "string" }, "CurrencySymbol": { "description": "Symbol associated with the currency", "type": "string" }, "CurrencyEnglishName": { "description": "Full name of the currency", "type": "string" }, "CountryName": { "description": "Name of the country", "type": "string" }, "CountryThreeLetterCode": { "description": "Three-letter ISO 3166-1 country code", "type": "string" }, "CountryISOTwoLetterCode": { "description": "Two-letter ISO 3166-1 country code", "type": "string" }, "IsEuropeanUnionMember": { "description": "True if this country is currently a member of the European Union (EU), false otherwise", "type": "boolean" } } }, "ConvertedCurrencyResult": { "description": "Result of performing a Convert Currency operation", "type": "object", "properties": { "ConvertedPrice": { "format": "double", "description": "The converted price in the destination currency", "type": "number" }, "ISOCurrencyCode": { "description": "ISO 4217 currency three-letter code of destination price", "type": "string" }, "CurrencySymbol": { "description": "Destination currency symbol", "type": "string" }, "FormattedPriceAsString": { "description": "Formatted price in the destination currency as a string", "type": "string" } } }, "ExchangeRateResult": { "description": "Result of performing a get exchange rate operation", "type": "object", "properties": { "ExchangeRate": { "format": "double", "description": "The exchange rate from the source to the destination currency", "type": "number" } } } }, "securityDefinitions": { "Apikey": { "type": "apiKey", "description": "API Key Authentication", "name": "Apikey", "in": "header" } } }