Skip to main content

Hobby coding project - exchange rate api

I used ChatGPT to provide the guidance. Basically I created a serverless api endpoint (using Vercel) to share the exchange rate data from the front page of the central bank website. I will contact the Central Bank to ask if they plan to provide public APIs for their data in the future.

The project uses Axios + Cheerio, the Requests + BeautifulSoup of the Node.js world. Axios handles HTTP requests with a clean promise-based API. Cheerio provides jQuery-style HTML parsing without a browser.

So my api endpoint serves up json exchange rate data. Next, what I did was create a Github actions to read data from the api endpoint and send it to my email address. I used resend for this and nodejs. Now I could easily send the exchange rates data to my email address on a daily basis by scheduling the action in Github. Next I am going to test out sending the data via sms if I can find a good free sms sending api.

See results below.


Comments

Popular posts from this blog

Rain

This is a chapter from my latest book called (G)rains (o)f san(d)s. Learn more about the book here . Thank you God for the rain. It has just started raining here. I can hear the pitter patter on the roof. I can see the dimmed light through the window. The greenery in the yard is enjoying every chance of rain. The days have been extra hot this year. They say we are experiencing a super el nino in Trinidad. Given this every bit of rainfall feels special. Water is life. Without water there can be no life as we know it. Rain is part of the water cycle. Rain falling is like therapy. A calm state comes over my body. My mind relaxes. I appreciate my home and my shelter to keep me dry and safe. The rain is mentioned as a sign from God in the Quran and how it gives life to a lifeless land. The rain complements the sunshine as part of nature's balance. Sometimes we have to endure storms and floods and even droughts but there are lessons in these events. Community spirit is heightened and our...

Failure

This is a chapter from my latest book called (G)rains (o)f san(d)s. Learn more about the book here . Thank you God for failure. Thank you for the good days and the bad days. Thank you for the journey. There are no failures, only lessons learnt. Better to try and fail than fail to try. For this chapter I made a bunch of notes and pieced them together. If mosaic was a style of writing, this would be it for me. Weirdly enough I am not afraid of failure as much as I am afraid of success. I want to live an ordinary and simple life. Much of what society deems as success is really the rat race. I guess I do not have a problem with success but the mainstream definitions of success. What does failure teach us? Failure teaches us to never give up because success can be right around the corner. Define your own definition of success. Enjoy the journey. Focus on learning. Focus on gaining experience. Focus on becoming wise. Today I learnt how a pearl is formed. A pearl forms when an oyster responds...

Wisdom

This is a chapter from my latest book called (G)rains (o)f san(d)s. Learn more about the book here . Thank you God for wisdom. Age brings wisdom. At least it should. Everyday we are learning. Everyday we are growing. What is the wisest thing ever said? I think one of the wisest things ever said is something my grandfather told my mother which is, "Dont make nothing a problem." Let me digest what was meant by this. Life happens. Fix what we can. Let go of what we cannot fix. Fix what is within our control. Get help when needed. Let go and let God. There are no problems only solutions waiting to be found and lessons waiting to be learnt. Every problem has a solution. Do not look at the problem, look at the solution. Do not see the problem, see the solution. What defines the situation is not the problem but the solution. We get to choose how we react to what we face in life. They say that laughter is the best medicine. If we do not laugh we will cry. So sometimes wisdom comes wi...