The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
Angelika
2 years agoNew Contributor
FX Data Feed - Actual Rates - Automate from different Source like ECB or OAND
Hi, looking for experience and OS counterparts for support to automate ( plugging it directly in OneStream from source) FX Data Feed. Concern currency is USD. Which source are used - OANDA, Eurpean ...
- 2 years ago
Hi Angelika
To be honest, I do dot recall the specificities. As long as the ECB is providing you the information from their api, then we can do anything with those rates, even calculates/recalculates/adj/compare/... before storing it to the FX table.
Please give a kuddo if it helps,
Nic
MarcusH
2 years agoValued Contributor
Hi Angelika
We download FX Rates from the client's national bank. They don't explicitly publish an API so it was a matter of opening the web pages and working out the syntax from the web address.
As part of the month end preparation there is a workflow step that downloads the rates and then saves them to the FX Rates (monthly and daily). It uses a Data Source - Connector which calls a Connector BR from the Connector Name setting. The BR imports System.Web and System.Net and then it creates a WebClient:
Imports System.Web
Imports System.Net
Dim client As WebClient = New WebClient()
This then opens the specified web address:
Using reader As StreamReader = New StreamReader(client.OpenRead(thisAddress))
That returns the contents of the web page into the variable 'reader'. The contents are processed and saved to a datatable. That datatable becomes the Stage data. The final step is to save the FX rates to the application. That step uses a TransformEventHandler which reads the Stage data and uses BRApi.Finance.Data.SetFxRate to write the FX Rate.
HTH
Marcus
Related Content
- 18 days ago
- 3 years ago
- 3 years ago
- 2 years ago
- 2 years ago