How to display the current interest rate, inflation rate, or GDP growth rate on your website

I receive a lot of emails asking about the current inflation and interest rates. So I decided to create a few widgets.

You can use these widgets if you want to display the current interest rates, inflation rates and/or GDP growth rates on your own blog or website.

The widgets automatically fetch the latest figures that are available.

If, for example, the SARB decides to adjust the repo rate, the widgets will automatically fetch and display the new repo and prime rate figures.


Latest Rates Table

To display a table with all the latest rates (like the one at the top of this page), use the following HTML:


Prime Interest Rate

To display the current prime interest rate (like this: ), use the following HTML:


Repo Rate

To display the current repo rate (like this: ), use the following HTML:


CPI Inflation Rate

To display the current CPI inflation rate (like this: ), use the following HTML:


PPI Inflation Rate

To display the current PPI inflation rate (like this: ), use the following HTML:


GDP Growth Rate

To display the current GDP growth rate (like this: ), use the following HTML:


, , ,

 

~ i may be wrong ~ report evil adverts ~
  1. Debt Counselling

    Great job and widget you made. I will try it on one of my blogs. Thank you

  2. Marius de Beer

    Can you add the following to your “Latest Rates” table:
    Exchange Rates:
    R/$US
    R/ GB pond
    R/euro
    Oil Price per Barrel

    I want to display all the rates as a one pager on my PC every day.

  3. Francois Viljoen

    @Marius

    I agree those are useful.

    I’ll have a look if I can add a table for exchange rates.

  4. Robert Bravery

    This is great resource. Thank you very much.

    I am looking for a web service that supplies the latest interest rate. I am writing an Insurance Program that need to use the interest rate. Currently I have to enter this manually. Can you point me in the right direction as to where I can find a websiervice that will supply the interest rate.

  5. Francois Viljoen

    Hey Robert

    I don’t think such a web-service exists. I integrate directly with a database to enable the web-widgets.

    Perhaps you can get the value by doing a web-request from your application and parsing the result?

  6. Muzi

    awesome thanks for sharing bud!!!

  7. G-DOG

    Great website, and a nice summary :) No useless information

    Do you guys think the prime rate will decline next year?

  8. Chris Brits

    Nice resource page – well done and thank you!

  9. Willi Badenhorst

    Awesome tool! Love the way it can display individually in plain text, which I can format myself. Streaming live on a client’s website as we speak. Any chance of target=_blank?

    Also, wondering if you managed to get major exchange rates working, as per your response on 8/12/2009?

  10. Mwendabai Kalaluka

    I cant seem to get the link to display numeric charactors on our business news page, I copied the whole link. We need the prime and repo rates. 011 023 5530

  11. Francois Viljoen

    @Mwendabai

    I tested all the links again and they work correctly. There may be something wrong with the way you’re inserting the links (it has to go directly into the HTML), or perhaps JavaScript is disabled on your server.

    @Willi

    Unfortunately not yet.

  12. Mwendabai

    I will try again or get our IT consultant to assist:) Many thank!

  13. John Dreyer

    Hi Francois
    Do you have a link that could be drawn exchane rates into a Excel spreadsheet?

  14. Francois Viljoen

    @John

    Unfortunately not.

  15. JOhn Dreyer

    Hi Francois
    I discover a way myself to do it.
    You use the menu “DATA” and choose the “FROM WEB” option.
    Once you have linked it with the information you want you only need to use the “REFRESH ALL” button to get the latest update.
    This way you can draw almost any information from the web.
    Hope that this will assist somebody.

  16. Francois Viljoen

    @John

    Thanks, that is a good tip!

  17. George

    I have added the widget to one of my websites but the style is not what I expected. Is there anyway I could get it to display in the same font and colour as my site? It Currently displays in Times Roman and Black with the standard link style of blue.

  18. Francois Viljoen

    @George

    Yes there is.

    Open the table source (http://liberta.co.za/widgets/latest_rates_table.js.php) in a web browser.

    You’ll notice that it just writes a normal table out as HTML.

    So you can for example place that table in a DIV tag and specify the table style by modifying the CSS for that DIV for your site.

    Also notice that there are classes assigned to some of the table cells (e.g. <td class=”rate_name”>). So you can add a CSS entry just for those class names too, if you want to do it that way.

  19. Jacqueline

    I’d love to have that table on my desktop. Can it be done?

  20. Francois Viljoen

    @Jacqueline

    Check out Snippage.

    It allows you to capture a section of any website and display it on your Desktop. So, you can just capture the table from this page, as an example.

    Here is a post that demonstrates how to use Snippage:

    http://www.addictivetips.com/windows-tips/display-live-web-page-content-on-your-desktop-with-snippage-widgets/

  21. Kelly Anne

    Great scripts, and still up to date i see.

  22. Andrew

    Hi Franois
    Can you tell me know actually calculates SAs GDP and what calculation method is currently being used?
    Thanks Andrew

  23. Ettienne le Roux

    Hi there

    Can someone please help me out with the code and the steps to follow in order to display the data within a XML file (excel ) on my website.

    What I would ideally like is if I could have separate js plug-ins or widgets to display any one of the data sets in the excel spreadsheet/XML file, in whichever order on my website.

    If I could have the same plug-ins as what you guys provided – which I’m currently using to display the latest SA prime, repo, CPI and PPI rates on my website, to display the data in my Excel/XML file.

    Both the Excel file and the XML file can be found in my dropbox website files under “data-sources”. Here is the link again: https://www.dropbox.com/sh/e5dasy7q1i7aiag/OOdzD5bTNU.

    If you could just give me the code to display for example the first data value “ALSI” and the “% move” next to it and then also the code and steps to create each veriable – the php file, the widget, js etc…

    So for example, I would like to know how to make the folowing plug-in work on my website:

    .

    Then lastly, once I have achieved to display the string of values on my website, to have them run over the screen in one horizontal line, same as in the following website: http://www.liberty.co.za/Pages/home.aspx. Could you possibly help me out with the code and steps to accomplish this as well?

    I’ll really appreciate the help.

    Thank you very much.

    Kind regards,
    Ettienne le Roux
    082 564 5008

  24. approved

    Hi there, we would like to know if you would allow us to embed this in a mobile app ? We could chat about it via email. Alternatively, the app could have an iframe that pulls the data.

    Do you have any time frame as to how long you will support these feeds?

    Regards,
    Kelly

  25. Francois Viljoen

    Hi Kelly

    We have no plans to stop supporting these feeds any time soon.

    The best way is to just use a section some HTML to pull the stats into your app.

    Kind regards,

    Francois

Add a Comment