Daily bank balances, and exchange ratesvthrough the API

Folowing on from my currency revaluation feature request (thanks again), I have implemented a solution to automatically generate my revaluation journals utilising the API.

I intended to make this public but due to a few additional shortcomings with the API I have held off.

My implementation revalues my currency accounts prior to each transaction. in my use case there are few transactions, and this works so as to give me a realistic base currency ‘running total’. I suspect however that a more general use case would want to be able to revalue a currency account daily, weekly, or monthly. As far as I can tell there are no API endpoints to simply return an account balance on a specific date. Could this be implemented?

Secondly, my tooling utilises exchange rates from Open Exchange Rates. Again, this works and is the ‘next best’ option, but it would be extremely useful if one could have consistency with the exchange rates used by QuickFile. Is it possible to have an endpoint for pulling exchange rates on a given date, or alternatively could the ‘account balance’ endpoint proposed above return both the foreign currency value and the converted value.

Many thanks.

Thomas

Hi Thomas,

You may be able to pull the most recent bank balance from an existing method that’s available. However, I’m not able to try at this moment in time. I will certainly have a look for you and update this post if I find anything.

As for the exchange rates, we use the xe.com rates as this is a trusted source. They have an API that’s available (you’ll have to check their website for details), but you’re also welcome to supply your own. Another one you may wish to look at is the HMRC exchange rates.

Hope that helps.

[Edit]
Just coming back to you regarding the balance query. There is a function called Reports_ChartOfAccounts. If you run a query, similar to the below:

<Body>
      <SearchParameters>
		  <StartNominalCode>1200</StartNominalCode>
		  <EndNominalCode>1200</EndNominalCode>
		  <FromDate>2012-01-01</FromDate>
		  <ToDate>2016-10-24</ToDate>
      </SearchParameters>
  </Body>

This will return the balance during that time. So providing the start date is quite early, and the end date is the date you’re after, it will return the current balance, for example:

<Body>
    <Nominals>
      <Nominal>
        <Code>1200</Code>
        <SystemCode>True</SystemCode>
        <Amount>-100.00</Amount>
      </Nominal>
    </Nominals>
  </Body>
</Report_ChartOfAccounts>

Note: The balance is returned from a Chart of Accounts point of view, so a negative balance is actually a positive bank balance. This also only returns the GBP value. But if you can see any recent transactions by using the Ledger_Search function if required.

Hi QFSupport.

Thanks for the response, and the update.

I am able to pull the latest bank balance. Your edit looks promising as regards both the exchange rate issue, and the account balance issue. Assuming that I can query single day date ranges and get back a balance at the time, at the prevalent exchange rate on that date then everything is perfect !

I will have a play when i get a moment and will report back.