currency query
Use the currency
query to return information about the store's currency configuration.
Syntax
{currency {Currency}}
Reference
The currency
reference provides detailed information about the types and fields defined in this query.
Example usage
The following query returns currency information for an instance of the application that is configured for multiple currencies, USD and EUR. The default (base) currency for the store is US Dollar (USD). The response includes a list of currencies in the available_currency_codes
attribute as well as a set of exchange rates.
Request:
Copied to your clipboardquery {currency {base_currency_codebase_currency_symboldefault_display_currency_codedefault_display_currency_symbolavailable_currency_codesexchange_rates {currency_torate}}}
Response:
Copied to your clipboard{"data": {"currency": {"base_currency_code": "USD","base_currency_symbol": "$","default_display_currency_code": "USD","default_display_currency_symbol": "$","available_currency_codes": ["EUR","USD"],"exchange_rates": [{"currency_to": "EUR","rate": 0.7067},{"currency_to": "USD","rate": 1}]}}}