Resources

Renesas IoT Sandbox Documentation

Currency Library

This library provides functions that allow access to currency conversion related services.


Import


To use this library and its functions, you must use the import line at the beginning of your Base Python code.

import Currency


Functions


Currency.get_exchange_rate

Usage: Currency.get_exchange_rate(from_currency, to_currency)

Get the current exchange rate of from_currency to to_currency.

  • Credit cost: 1
  • Parameters:
    • from_currency: ISO 4217 Currency Code (3 letters)
    • to_currency: ISO 4217 Currency Code (3 letters)
  • Sample Code:
    import Currency
    exchange_rate = Currency.get_exchange_rate('USD', 'EUR')
  • Returns:
    • float Exchange rate
      [{"value": "0.91"}]



Currency.get_foreign_value

Usage: Currency.get_foreign_value(amount, from_currency, to_currency)

Get the currency value amount of from_currency converted into to_currency.

  • Credit cost: 1
  • Parameters:
    • amount: float Currency value to convert.
    • from_currency: ISO 4217 Currency Code (3 letters)
    • to_currency: ISO 4217 Currency Code (3 letters)
  • Sample Code:
    import Currency
    ten_dollars_usd_in_cad = Currency.get_exchange_rate(10.0, 'USD', 'CAD')
  • Returns:
    • float Foreign currency value
      [{"value": 13.04}]

Getting Started
User Roles & Permissions
Streams, Tags, & Data Types
Dashboard Widgets
API
Workflow Studio
Workflow Libraries
Metering
Special Characters
Third Party Integration
Mobile
API Explorer

Currency Library

This library provides functions that allow access to currency conversion related services.


Import


To use this library and its functions, you must use the import line at the beginning of your Base Python code.

import Currency


Functions


Currency.get_exchange_rate

Usage: Currency.get_exchange_rate(from_currency, to_currency)

Get the current exchange rate of from_currency to to_currency.

  • Credit cost: 1
  • Parameters:
    • from_currency: ISO 4217 Currency Code (3 letters)
    • to_currency: ISO 4217 Currency Code (3 letters)
  • Sample Code:
    import Currency
    exchange_rate = Currency.get_exchange_rate('USD', 'EUR')
  • Returns:
    • float Exchange rate
      [{"value": "0.91"}]



Currency.get_foreign_value

Usage: Currency.get_foreign_value(amount, from_currency, to_currency)

Get the currency value amount of from_currency converted into to_currency.

  • Credit cost: 1
  • Parameters:
    • amount: float Currency value to convert.
    • from_currency: ISO 4217 Currency Code (3 letters)
    • to_currency: ISO 4217 Currency Code (3 letters)
  • Sample Code:
    import Currency
    ten_dollars_usd_in_cad = Currency.get_exchange_rate(10.0, 'USD', 'CAD')
  • Returns:
    • float Foreign currency value
      [{"value": 13.04}]