← Romanian Finance API · Contact us

Excel & Power Query integration guide

Use Microsoft Excel and Power Query to connect directly to FinPulse API for live BNR exchange rates and Romanian mutual fund prices without installing third-party add-ins.

Connecting via Power Query GUI

  1. Open Excel, go to the Data tab, and click Get DataFrom Other SourcesFrom Web.
  2. Choose Advanced. Enter the API URL (e.g. https://ro-finance.mediashare.ro/api/fx-rates).
  3. Add an HTTP request header: Authorization with value Bearer YOUR_API_KEY.
  4. Click OK, then expand the data list into table rows and columns in the Power Query Editor.

Power Query M Code Snippets

You can also paste these M scripts into Excel’s Advanced Editor (Data → Get Data → Blank Query → Advanced Editor):

1. Latest BNR Exchange Rates

let
    ApiKey = "YOUR_API_KEY",
    Url = "https://ro-finance.mediashare.ro/api/fx-rates",
    Source = Json.Document(Web.Contents(Url, [
        Headers = [
            #"Authorization" = "Bearer " & ApiKey,
            #"Accept" = "application/json"
        ]
    ])),
    DataList = Source[data],
    TableFromList = Table.FromList(DataList, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    ExpandedTable = Table.ExpandRecordColumn(
        TableFromList,
        "Column1",
        {"currency", "rate", "multiplier", "ron_per_unit", "rate_date"},
        {"Currency", "Rate", "Multiplier", "RON Per Unit", "Publication Date"}
    ),
    TypedTable = Table.TransformColumnTypes(ExpandedTable, {
        {"Currency", type text},
        {"Rate", type number},
        {"Multiplier", Int64.Type},
        {"RON Per Unit", type number},
        {"Publication Date", type date}
    })
in
    TypedTable

2. Latest Mutual Fund Prices

let
    ApiKey = "YOUR_API_KEY",
    Url = "https://ro-finance.mediashare.ro/api/prices",
    Source = Json.Document(Web.Contents(Url, [
        Headers = [
            #"Authorization" = "Bearer " & ApiKey,
            #"Accept" = "application/json"
        ]
    ])),
    DataList = Source[data],
    TableFromList = Table.FromList(DataList, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    ExpandedTable = Table.ExpandRecordColumn(
        TableFromList,
        "Column1",
        {"fund_name", "provider", "price", "previous_price", "price_change", "price_change_percent", "price_date", "currency", "has_price_data"},
        {"Fund Name", "Provider", "NAV / Price", "Previous Price", "Price Change", "Change %", "Price Date", "Currency", "Has Data"}
    ),
    TypedTable = Table.TransformColumnTypes(ExpandedTable, {
        {"Fund Name", type text},
        {"Provider", type text},
        {"NAV / Price", type number},
        {"Previous Price", type number},
        {"Price Change", type number},
        {"Change %", type number},
        {"Price Date", type date},
        {"Currency", type text},
        {"Has Data", type logical}
    })
in
    TypedTable

3. BNR FX Rate History

let
    ApiKey = "YOUR_API_KEY",
    Currency = "EUR",
    Url = "https://ro-finance.mediashare.ro/api/fx-rates/" & Currency & "/history?limit=100",
    Source = Json.Document(Web.Contents(Url, [
        Headers = [
            #"Authorization" = "Bearer " & ApiKey,
            #"Accept" = "application/json"
        ]
    ])),
    DataList = Source[data],
    TableFromList = Table.FromList(DataList, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    ExpandedTable = Table.ExpandRecordColumn(
        TableFromList,
        "Column1",
        {"currency", "rate", "multiplier", "ron_per_unit", "rate_date"},
        {"Currency", "Rate", "Multiplier", "RON Per Unit", "Publication Date"}
    ),
    TypedTable = Table.TransformColumnTypes(ExpandedTable, {
        {"Currency", type text},
        {"Rate", type number},
        {"Multiplier", Int64.Type},
        {"RON Per Unit", type number},
        {"Publication Date", type date}
    })
in
    TypedTable

Automatic Data Refresh in Excel

Once imported into an Excel sheet, right-click any cell in the table, select External Data Properties (or right-click the query in Queries & ConnectionsProperties), and enable Refresh data when opening the file or set a periodic refresh interval.