Set exchange rates SC
Updated on 30 Mar 2023
There are two options of getting exchange rates for the operations:
- manage them manually
- get from third-party
In our case, we use Currency Cloud (https://www.currencycloud.com/) as a third-party solution for getting currency exchange rates.
To switch between manual and automated mode (Currency Cloud) the system should be redeployed with corresponding changes in the YAML file.
1 rate:
2 exchange-rates:
3 ttl: PT6H
4 currency-cloud:
5 enabled: true
6 url: ‘https://devapi.currencycloud.com/v2’
7 login-id: ‘…’
8 api-key: ‘…’
where:
- TTL – a frequency of getting the updated rates from third-party
- currency-cloud.enabled – true/false means turn on/turn off using Currency Cloud. If it’s turned off then the system uses manually set up exchange rates. If it’s turned on – the system gets exchange rates from Currency Cloud.
You need to create your own account in Currency Cloud in order to use it.
See currency exchange commission calculation