xe.currency
Module xe.currency
API
Definitions
anjanasupun/xe.currency
Overview
Setup guide
Quickstart
Examples
The {{MODULE_NAME_PC}}
connector provides practical examples illustrating usage in various scenarios. Explore these examples, covering the following use cases:
Clients
xe.currency: Client
Xe Currency Data - Integrate your application with our globally trusted currency data.
Get your free API credentials for 7 days here
Constructor
Gets invoked to initialize the connector
.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://xecdapi.xe.com" - URL of the target service
get v1/account_info
function get v1/account_info(map<string|string[]> headers) returns AccountInfoResponse|error
This endpoint will return basic information for a specific account.
Return Type
- AccountInfoResponse|error - Success
get v1/central_bank_rate
function get v1/central_bank_rate(map<string|string[]> headers, *GetV1Central_bank_rateQueries queries) returns CentralBankExchangeRateResponse|error
Central bank exchange rates from currency of central bank to one or multiple counter currencies, provided by specified central bank.
Parameters
- queries *GetV1Central_bank_rateQueries - Queries to be sent with the request
Return Type
get v1/convert_from
function get v1/convert_from(map<string|string[]> headers, *GetV1Convert_fromQueries queries) returns ConvertFromResponse|error
Convert from one base currency to one or multiple counter currencies.
Parameters
- queries *GetV1Convert_fromQueries - Queries to be sent with the request
Return Type
- ConvertFromResponse|error - OK
get v1/convert_to
function get v1/convert_to(map<string|string[]> headers, *GetV1Convert_toQueries queries) returns ConvertToResponse|error
Convert to a currency amount from one or multiple other currencies.
Parameters
- queries *GetV1Convert_toQueries - Queries to be sent with the request
Return Type
- ConvertToResponse|error - OK
get v1/currencies
function get v1/currencies(map<string|string[]> headers, *GetV1CurrenciesQueries queries) returns CurrencyInfoResponse|error
Access a list of all available currencies.
Parameters
- queries *GetV1CurrenciesQueries - Queries to be sent with the request
Return Type
get v1/historic_rate
function get v1/historic_rate(map<string|string[]> headers, *GetV1Historic_rateQueries queries) returns HistoricRateResponse|error
Get historic rates for one base currency against one or more counter currencies.
Parameters
- queries *GetV1Historic_rateQueries - Queries to be sent with the request
Return Type
get v1/historic_rate/period
function get v1/historic_rate/period(map<string|string[]> headers, *GetV1Historic_ratePeriodQueries queries) returns HistoricRatePeriodResponse|error
Get historic rates for one base currency against one or more counter currencies over a period of time.
Parameters
- queries *GetV1Historic_ratePeriodQueries - Queries to be sent with the request
Return Type
get v1/monthly_average
function get v1/monthly_average(map<string|string[]> headers, *GetV1Monthly_averageQueries queries) returns MonthlyAverageResponse|error
Get monthly average rates for a single base currency and one or more counter currency for the month/year you specify in your API query.
Parameters
- queries *GetV1Monthly_averageQueries - Queries to be sent with the request
Return Type
get v1/stats
function get v1/stats(map<string|string[]> headers, *GetV1StatsQueries queries) returns StatsResponse|error
Gets an average rate over the specified time period, as well various additional statistics such as the standard deviation and volatility.
Parameters
- queries *GetV1StatsQueries - Queries to be sent with the request
Return Type
- StatsResponse|error - OK
Records
xe.currency: AccountInfoResponse
Fields
- id string? -
- organization string? -
- package string? -
- service_start_timestamp string? -
- package_limit_duration string? -
- package_limit decimal? -
- package_limit_remaining decimal? -
- package_limit_reset string? -
xe.currency: CentralBankExchangeRateResponse
Fields
- terms string? -
- privacy string? -
- 'from string? -
- amount decimal? -
- timestamp string? -
- to CentralBankRate[]? -
xe.currency: CentralBankRate
Fields
- quotecurrency string? -
- mid decimal? -
- inverse decimal? -
- bid decimal? -
- ask decimal? -
xe.currency: ClientHttp1Settings
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
xe.currency: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth CredentialsConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
xe.currency: ConvertFromResponse
Fields
- terms string? -
- privacy string? -
- 'from string? -
- amount decimal? -
- timestamp string? -
- to Rate[] -
xe.currency: ConvertToResponse
Fields
- terms string? -
- privacy string? -
- to string? -
- amount decimal? -
- timestamp string? -
- 'from Rate[] -
xe.currency: CurrencyInfo
Fields
- iso string? -
- currency_name string? -
- is_obsolete boolean? -
- superseded_by string? -
- currency_symbol string? -
- currency_symbol_on_right boolean? -
xe.currency: CurrencyInfoResponse
Fields
- terms string? -
- privacy string? -
- currencies CurrencyInfo[]? -
xe.currency: GetV1Central_bank_rateQueries
Represents the Queries record for the operation: getV1Central_bank_rate
Fields
- date string? - OPTIONAL – YYYY-MM-DD format - request rates for a particular past date. Rates are often not posted on weekends and holidays. bid and ask are not available yet for past rates
- inverse boolean(default false) - OPTIONAL – If ‘true’, the endpoint will include inverse rates. An inverse rate is a quote for which the base currency and counter currency are switched. An inverse is calculated by dividing one by the exchange rate. Example: If the exchange rate for 1 USD to EUR = 0.874852, then the inverse rate would be 1/0.874852 = 1.14305, meaning that US$1.14305 would buy 1 euro.
- central_bank string - REQUIRED – Three letter codes representing the specific central bank you are querying for. The time(s) specified below highlights the time rates published by each respective central bank updates within the API service.</br> | Code | Country | Name | Bid/Ask | Available at (UTC) | |:--- |:--- |:--- |:--- |:--- | | AFG | Afghanistan | The Afghanistan Bank | ✓ | 06:00-11:00 | | AGO | Angola | National Bank of Angola | | 11:00-17:00 | | ALB | Albania | Bank of Albania | | 12:00 | | AUS | Australia | Reserve Bank of Australia | | 08:00 | | AZE | Azerbaijan | The Central Bank of the Republic of Azerbaijan | | 06:00 | | BEAC | Central African States | The Bank Of Central African States (Banque des États de l'Afrique Centrale) | ✓ | 10:00 | | BGR | Bulgaria | Bulgarian National Bank | | 15:00 | | BLZ | Belize | Central Bank of Belize | | 20:00 | | BRA | Brazil | Central Bank of Brazil | ✓ | 17:00 | | CAN | Canada | Bank of Canada | | 23:00 | | CAR | Eastern Caribbean States | Eastern Caribbean Central Bank | | 14:00 | | CHE | Switzerland | Swiss National Bank | | 11:00 | | CHL | Chile | Central Bank of Chile | | 03:00 | | CHN | China | China Foreign Exchange Trade System | | hourly | | COL | Colombia | Financial Superintendence of Colombia | | 22:00 | | CRI | Costa Rica | Central Bank of Costa Rica (Banco Central de Costa Rica) | | 15:00 | | CZE | Czechia | Czech National Bank | | 13:00 | | DNK | Denmark | National Bank of Denmark (Danmarks Nationalbank) | | 17:00 | | DOM | Dominican Republic | Central Bank of the Dominican Republic (Banco Central de la República Dominicana) | | 22:00 | | ECB | European Union | European Central Bank | | 17:00 | | EGY | Egypt | Central Bank of Egypt | ✓ | 12:00 | | FJI | Fiji | Reserve Bank of Fiji | | 05:00 | | GBR | United Kingdom of Great Britain and Northern Ireland | Bank of England | | 10:00 | | GTM | Guatemala | Bank of Guatemala | ✓ | 14:00 | | GUY | Guyana | Bank of Guyana | ✓ | 18:00 | | HUN | Hungary | Hungarian National Bank (Magyar Nemzeti Bank) | | 12:00 | | IDN | Indonesia | Bank Indonesia | ✓ | 12:00 | | IND | India | Reserve Bank of India | | 07:30 | | ISR | Israel | Bank of Israel | | 05:00 | | JPN | Japan | Bank of Japan | | 08:00 | | KEN | Kenya | Central Bank of Kenya | | 11:00 | | KOR | Korea | Seoul Money Brokerage Services | | 00:00 | | LAO | Lao People's Democratic Republic | Bank of the Lao P.D.R | | 03:00 | | LBN | Lebanon | Bank of Lebanon (Banque du Liban) | | middle of each month | | MEX | Mexico | Bank of Mexico | | 19:00 | | MNG | Mongolia | Central Bank of Mongolia | | 11:00 | | MOZ | Mozambique | Bank of Mozambique (Banco de Moçambique) | ✓ | 09:00-15:00 | | NGA | Nigeria | Central Bank of Nigeria | ✓ | middle of each week | | NOR | Norway | Central Bank of Norway (Norges Bank) | | 16:00 | | PER | Peru | Central Reserve Bank of Peru (Banco Central de Reserva del Perú) | | 19:00 | | PHL | Philippines | Central Bank of the Philippines (Bangko Sentral ng Pilipinas) | | 10:00 | | PNG | Papua New Guinea | Bank of Papua New Guinea | ✓ | 02:00-10:00 | | POL | Poland | National Bank of Poland | | 15:00 | | PRY | Paraguay | Central Bank of Paraguay | | 17:00 | | QAT | Qatar | Qatar Central Bank | | 11:00 | | ROU | Romania | National Bank of Romania | | 11:00 | | RUS | Russian Federation | Central Bank of the Russian Federation | | 16:00 | | SAU | Saudi Arabia | Saudi Central Bank | | 14:00 | | SRB | Serbia | National Bank of Serbia | | 07:00 | | SVN | Slovenia | Bank of Slovenia | | 15:00 | | SWE | Sweden | Sweden's Central Bank (Sveriges Riksbank) | | 16:00 | | SYC | Seychelles | Central Bank of Seychelles | ✓ | 15:00 | | SYR | Syrian Arab Republic | Central Bank of Syria | | 11:00 | | THA | Thailand | Bank of Thailand | ✓ | 12:00 | | TJK | Tajikistan | National Bank of Tajikistan | | 16:00 | | TKM | Turkmenistan | Central Bank of Turkmenistan | | 14:00 | | TUR | Turkey | Central Bank of the Republic of Turkey | ✓ | 12:00 | | UAE | United Arab Emirates | Central Bank of the UAE | | 15:00 | | UKR | Turkmenistan | National Bank of Ukraine | | 23:00 | | URY | Uruguay | Central Bank of Uruguay | | 21:00 | | USA | United States of America | US Federal Reserve Bank of New York | | Monday, for previous week | | UZB | Uzbekistan | The Central Bank of the Republic of Uzbekistan | | 20:00 | | VEN | Venezuela | Central Bank of Venezuela (Banco Central de Venezuela) | ✓ | 15:00 | | YEM | Yemen | Central Bank of Yemen | ✓ | 08:00 | | ZAF | South Africa | South African Reserve Bank | | 15:00 | | ZWE | Zimbabwe | Reserve Bank of Zimbabwe | ✓ | 05:00 |
- amount decimal(default 1) - OPTIONAL – This parameter can be used to specify the amount you want to convert, if an amount is not specified then 1 is assumed.</br>
- margin decimal(default 0) - OPTIONAL – This parameter can be used to add a margin (+/-) to the exchange rate. Example: adding margin=2.05 to the query will result in the endpoint returning the current exchange rates with a +2.05% margin
- to string - Comma separated list of to currencies ISO 4217 codes. This will limit the data returned to only those currencies you are interested in. Use an asterisk * to convert all currencies.
- fields string(default "mid") - Comma separated list of fields. One or more of "mid", "bid" or "ask". Bid and ask are only available when requesting the current bank rate.
- decimal_places decimal(default 20) - OPTIONAL – This parameter can be used to specify the number of decimal places included in the output. Example: if 1 USD to EUR = 0.874852, adding decimal_places=3 to the query will result in the endpoint returning EUR = 0.875
xe.currency: GetV1Convert_fromQueries
Represents the Queries record for the operation: getV1Convert_from
Fields
- inverse boolean? - OPTIONAL – If ‘true’ then endpoint will include inverse rates. An inverse rate is a quote for which the base currency and counter currency are switched. An inverse is calculated by dividing one by the exchange rate. Example: If the exchange rate for $1 USD to EUR = 0.874852, then the inverse rate would be 1/0.874852 = 1.14305, meaning that US$1.14305 would buy 1 euro.
- amount decimal? - OPTIONAL – This parameter can be used to specify the amount you want to convert, if an amount is not specified then 1 is assumed.</br>
- margin decimal? - OPTIONAL – This parameter can be used to add a margin (-/+) to XE's mid-market rate. Example: add margin=2.05 parameter to the endpoint and the API will return our mid-market rates plus the margin of 2.05 percent
- skip_weekends boolean? - OPTIONAL – LIVE accounts only - If 'true' then requests during the weekend will respond with the rate as of market close (Friday, 5pm America/New_York)
- obsolete boolean? - OPTIONAL – If ‘true’ then endpoint will display rates for currencies that are obsolete. If ‘false’ then obsolete currencies are replaced by their successor currency.
- 'from string? - OPTIONAL – Currency you want to convert from ISO code. Note if this parameter is omitted, default is USD.</br>
- to string - Comma separated list of to currencies ISO 4217 codes. This will limit the data returned to only those currencies you are interested in. Use an asterisk * to convert all currencies.</br> Note: Obsolete currencies are replaced by their successor currency.</br>
- decimal_places decimal? - OPTIONAL – This parameter can be used to specify the number of decimal places included in the output. Example 1 USD to EUR = 0.874852 with decimal_places=3, the output returned will be EUR = 0.875
- crypto boolean? - OPTIONAL – If 'true' then this endpoint will return data for the following crypto currencies: ADA, BCH, DOGE, DOT, ETH, LINK, LTC, LUNA, UNI, XLM and XRP
xe.currency: GetV1Convert_toQueries
Represents the Queries record for the operation: getV1Convert_to
Fields
- inverse boolean? - OPTIONAL – If ‘true’ then endpoint will display the inverse of the converted value. If ‘false‘ then it will not be displayed.
- amount decimal? - OPTIONAL – This parameter can be used to specify the amount you want to convert, if an amount is not specified then 1 is assumed.</br>
- margin decimal? - OPTIONAL – This parameter can be used to add a margin (-/+) to XE's mid-market rate. Example: add margin=2.05 parameter to the endpoint and the API will return our mid-market rates plus the margin of 2.05 percent
- skip_weekends boolean? - OPTIONAL – LIVE accounts only – If 'true' then requests during the weekend will respond with the rate as of market close (Friday, 5pm America/New_York)
- obsolete boolean? - OPTIONAL – If ‘true’ then endpoint will display rates for currencies that are obsolete. If ‘false’ then obsolete currencies are replaced by their successor currency.
- 'from string - Comma separated list of to currencies ISO codes. This will limit the data returned to only those currencies you are interested in. Use an asterisk * to convert all currencies.</br> Note: Obsolete currencies are replaced by their successor currency.</br>
- to string? - OPTIONAL - Currency you want to convert to ISO code. Note if this parameter is omitted, default is USD.</br>
- decimal_places decimal? - OPTIONAL – This parameter can be used to specify the number of decimal places included in the output. Example 1 USD to EUR = 0.874852 with decimal_places=3, the output returned will be EUR = 0.875
- crypto boolean? - OPTIONAL – If 'true' then this endpoint will return data for the following crypto currencies: ADA, BCH, DOGE, DOT, ETH, LINK, LTC, LUNA, UNI, XLM and XRP
xe.currency: GetV1CurrenciesQueries
Represents the Queries record for the operation: getV1Currencies
Fields
- iso string? - OPTIONAL – Comma separated list of ISO 4217 codes. This will limit the data returned to only those currencies that are specified. If this parameter is omitted, this endpoint will return results for all currencies.</br></br> It is a prefix match; you can provide it with one, two, or three characters and it will return a list of all the currencies with ISO 4217 codes that match.</br></br> A list of acceptable ISO 4217 currency codes can be found here: http://www.xe.com/iso4217.php
- obsolete boolean? - OPTIONAL – If 'true' then endpoint will display currencies that are obsolete but for which historical data is available
- additionalInfo string? - OPTIONAL - If 'symbol' then returns 'currency_symbol' and 'currency_symbol_on_right' in response
- language string? - OPTIONAL – Default is en. Specified as an RFC-1766-compliant language tag.</br></br>Languages available: ar, de, en, es, fr, it, ja, pt, sv, zh-CN, zh-HK.
- crypto boolean? - OPTIONAL – If 'true' then this endpoint will return data for the following crypto currencies: ADA, BCH, DOGE, DOT, ETH, LINK, LTC, LUNA, UNI, XLM and XRP
xe.currency: GetV1Historic_ratePeriodQueries
Represents the Queries record for the operation: getV1Historic_ratePeriod
Fields
- per_page decimal? - OPTIONAL – You can specify the number of results per page. The default is 30 results per page with a maximum of 500 results per page.</br>
- inverse boolean? - OPTIONAL – If ‘true’ then endpoint will display the inverse of the converted value. If ‘false‘ then it will not be displayed.
- amount decimal? - OPTIONAL – This parameter can be used to specify the amount you want to convert, if an amount is not specified then 1.00 is assumed.</br>
- margin decimal? - OPTIONAL – This parameter can be used to add a margin (-/+) to XE's mid-market rate. Example: add margin=2.05 parameter to the endpoint and the API will return our mid-market rates plus the margin of 2.05 percent
- start_timestamp string? - OPTIONAL - ISO 8601 timestamp in the format yyyy-mm-ddThh:mm giving the UTC date and time of the start of the period for which you would like rates returned.</br></br>If your account is registered for a Daily package your endpoint will return rates at your preferred daily lock-in time starting on the date specified in your request. If your account does not have a preferred daily lock-in time then rates will return as of 00:00 UTC</br>If your account is registered for a Live package your endpoint will return rates starting at 00:00 UTC if no time portion is specified.</br>
- obsolete boolean? - OPTIONAL – If ‘true’ then endpoint will display rates for currencies that are obsolete. If ‘false’ then obsolete currencies are replaced by their successor currency.
- decimal_places decimal? - OPTIONAL – This parameter can be used to specify the number of decimal places included in the output. Example 1 USD to EUR = 0.874852 with decimal_places=3, the output returned will be EUR = 0.875
- crypto boolean? - OPTIONAL – If 'true' then this endpoint will return data for the following crypto currencies: ADA, BCH, DOGE, DOT, ETH, LINK, LTC, LUNA, UNI, XLM and XRP
- end_timestamp string? - OPTIONAL – ISO 8601 timestamp in the format yyyy-mm-ddThh:mm giving the UTC date and time of the end of the period for which you would like rates returned. If a time in the future is specified, the current time will be used. If no end_time is specified, the time specified in the “start_timestamp” paramenter will also be used for the end_timestamp.”</br>If your account is registered for a Daily package your endpoint will return rates at your preferred daily lock-in time ending on the date specified in your request. If your account does not have a preferred daily lock-in time then rates will return as of 00:00 UTC.</br>If your account is registered for a Live package your endpoint will return rates at 00:00 UTC unless you specify a time parameter in your rate request.</br>
- 'from string? - OPTIONAL – Currency you want to convert from ISO code. Note if this parameter is omitted, default is USD.</br>
- interval string? - OPTIONAL – Interval is applicable to Live packages only. Using one of the interval values below in your call request will return rates for that specific interval within the time period specified.</br></br>Example: adding the interval of "hourly" will return rates for every hour in the time period you specified.</br></br> "daily" - Returns one rate for the days specified in your time period,</br>"hourly" - Returns rates for every hour in the time period you specify</br></br>If omitted, "daily" is used. This parameter is only used if both the "start_timestamp" and "end_timestamp" parameters have been specified
- to string - Comma separated list of to currencies based on ISO 4217 codes.</br>This will limit the data returned to only those currencies you are interested in.</br> Note: Obsolete currencies are replaced by their precursor or successor currency.</br>
- page decimal? - OPTIONAL – You can specify the page number you want to request.</br>Note: that page numbering is 1-based (the first page being page 1).</br>Omitting this parameter will return the first page.</br>
xe.currency: GetV1Historic_rateQueries
Represents the Queries record for the operation: getV1Historic_rate
Fields
- date string - UTC date should be in the form of YYYY-MM-DD, up to 1995-11-16.</br>If your account is registered for a Daily package your endpoint will return rates at your preferred daily lock-in time.</br>If your account is registered for a Live package your endpoint will return XE mid-day rate unless you specify a time parameter in your call request.</br>
- inverse boolean? - OPTIONAL – If ‘true’ then endpoint will display the inverse of the converted value. If ‘false‘ then it will not be displayed.
- amount decimal? - OPTIONAL – This parameter can be used to specify the amount you want to convert, if an amount is not specified then 1.00 is assumed.</br>
- margin decimal? - OPTIONAL – This parameter can be used to add a margin (-/+) to XE's mid-market rate. Example: add margin=2.05 parameter to the endpoint and the API will return our mid-market rates plus the margin of 2.05 percent
- obsolete boolean? - OPTIONAL – If ‘true’ then endpoint will display rates for currencies that are obsolete. If ‘false’ then obsolete currencies are replaced by their successor currency.
- 'from string? - OPTIONAL – Currency you want to convert from ISO code.</br>Note if this parameter is omitted, default is USD.</br>
- to string - Comma separated list of to currencies ISO 4217 codes.</br>This will limit the data returned to only those currencies you are interested in. Use an asterisk * to specify all currencies.</br> Note: Obsolete currencies are replaced by their precursor or successor currency.</br>
- time string? - OPTIONAL – Time parameter is applicable to Live package only.</br>UTC time is in format of HH:MM Time option is only available for the last 24 hours, if time is not specified, only one table is returned using the XE mid-day rates (As returned in http://www.xe.com/currencytables/)</br>
- decimal_places decimal? - OPTIONAL – This parameter can be used to specify the number of decimal places included in the output. Example 1 USD to EUR = 0.874852 with decimal_places=3, the output returned will be EUR = 0.875
- crypto boolean? - OPTIONAL – If 'true' then this endpoint will return data for the following crypto currencies: ADA, BCH, DOGE, DOT, ETH, LINK, LTC, LUNA, UNI, XLM and XRP
xe.currency: GetV1Monthly_averageQueries
Represents the Queries record for the operation: getV1Monthly_average
Fields
- inverse boolean? - OPTIONAL – If ‘true’ then endpoint will include inverse rates.
- amount decimal? - OPTIONAL – This parameter can be used to specify the amount you want to convert, if an amount is not specified then 1 is assumed.</br>
- month decimal? - OPTIONAL – This parameter specifies the month in the given year to return average monthly rates. This is a numeric value from 1 to 12 where 1 is for January and 12 is for December. If no month is provided, then all months for the given year are returned.</br>
- year decimal? - OPTIONAL – This parameter specifies the year to calculate average monthly rates.</br>
- obsolete boolean? - OPTIONAL – If ‘true’ then endpoint will display rates for currencies that are obsolete. If ‘false’ then obsolete currencies are replaced by their successor currency.
- 'from string? - OPTIONAL – Currency you want to convert from ISO code. Note if this parameter is omitted, default is USD.</br>
- to string - Comma separated list of to currencies based on ISO 4217 codes. This will limit the data returned to only those currencies that are specified.</br>
- decimal_places decimal? - OPTIONAL – This parameter can be used to specify the number of decimal places included in the output. Example 1 USD to EUR = 0.874852 with decimal_places=3, the output returned will be EUR = 0.875
- crypto boolean? - OPTIONAL – If 'true' then this endpoint will return data for the following crypto currencies: ADA, BCH, DOGE, DOT, ETH, LINK, LTC, LUNA, UNI, XLM and XRP
xe.currency: GetV1StatsQueries
Represents the Queries record for the operation: getV1Stats
Fields
- end_date string? - OPTIONAL – ISO 8601 timestamp in the format yyyy-mm-dd giving the UTC date of the end of the period for which you would like to compute the volatility to. Note if this parameter is omitted, the end date will default to today.</br>
- daysInPeriod decimal? - OPTIONAL – This parameter can be used to specify the number of days in the period that we are considering.
- obsolete boolean? - OPTIONAL – If ‘true’ then endpoint will display rates for currencies that are obsolete. If ‘false’ then obsolete currencies are replaced by their successor currency.
- 'from string? - OPTIONAL – Currency you want to convert from ISO code. Note if this parameter is omitted, default is USD.</br>
- to string - Comma separated list of to currencies based on ISO 4217 codes. This will limit the data returned to only those currencies that are specified.</br>
- start_date string? - OPTIONAL – ISO 8601 timestamp in the format yyyy-mm-dd giving the UTC date of the start of the period for which you would like to compute the volatility from. Note if this parameter is omitted, the start date will default to today.</br>
- decimal_places decimal? - OPTIONAL – This parameter can be used to specify the number of decimal places included in the output. Example 1 USD to EUR = 0.874852 with decimal_places=3, the output returned will be EUR = 0.875
- crypto boolean? - OPTIONAL – If 'true' then this endpoint will return data for the following crypto currencies: ADA, BCH, DOGE, DOT, ETH, LINK, LTC, LUNA, UNI, XLM and XRP
xe.currency: HistoricRatePeriodResponse
Fields
- terms string? -
- privacy string? -
- 'from string? -
- amount decimal? -
- to record { RatePeriod[]... }? -
xe.currency: HistoricRateResponse
Fields
- terms string? -
- privacy string? -
- 'from string? -
- amount decimal? -
- timestamp string? -
- to Rate[]? -
xe.currency: MonthlyAverageResponse
Fields
- terms string? -
- privacy string? -
- 'from string? -
- amount decimal? -
- year decimal? -
- to record { TOCurrencyISO[]... }? -
xe.currency: ProxyConfig
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
xe.currency: Rate
Fields
- quotecurrency string -
- mid decimal -
xe.currency: RatePeriod
Fields
- mid decimal? -
- timestamp string? -
xe.currency: Stats
Fields
- to string? -
- high decimal? -
- low decimal? -
- average decimal? -
- standardDeviation decimal? -
- volatility decimal? -
- highTimestamp string? -
- lowTimestamp string? -
- dataPoints int? -
xe.currency: StatsResponse
Fields
- terms string? -
- privacy string? -
- 'from string? -
- stats Stats[]? -
xe.currency: TOCurrencyISO
Fields
- monthlyAverage decimal? -
- month decimal? -
- daysInMonth decimal? -
Import
import anjanasupun/xe.currency;
Metadata
Released date: 3 months ago
Version: 0.0.2
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.9.2
GraalVM compatible: Yes
Pull count
Total: 7
Current verison: 5
Weekly downloads
Contributors
Other versions
0.0.2
0.0.1