Python Forum
currency converter using forex-python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
currency converter using forex-python
#3
Quick test is down,if look at converter.py
def _source_url(self):
     return "https://theforexapi.com/api/"
So the theforexapi👀 is down,then nothing will work in this library.

If look at isssus so has ddofborg has done a altentaive.
Test it no has PyPi install just a Repo,so clone down and run.
G:\div_code\forex_env
(forex_env) λ git clone https://github.com/ddofborg/exchange_rates.git
Cloning into 'exchange_rates'...
remote: Enumerating objects: 25, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 25 (delta 10), reused 6 (delta 2), pack-reused 0
Receiving objects: 100% (25/25), 8.59 KiB | 4.29 MiB/s, done.
Resolving deltas: 100% (10/10), done.

G:\div_code\forex_env
(forex_env) λ ls
exchange_rates/  Include/  Lib/  pyvenv.cfg  Scripts/

G:\div_code\forex_env
(forex_env) λ cd exchange_rates\

G:\div_code\forex_env\exchange_rates (main -> origin)
(forex_env) λ ptpython
>>> from exchange_rates import get_exchange_rates
>>> get_exchange_rates('USD', target_currencies=['EUR', 'CAD', 'USD'], on_date='2023-10-01')
{'EUR': 0.9496676163342831, 'CAD': 1.3613485280151947, 'USD': 1.0}

# Test a newer date
>>> get_exchange_rates('USD', target_currencies=['EUR', 'CAD', 'USD'], on_date='2024-03-05')
{'EUR': 0.9217439395335976, 'CAD': 1.3592957876301963, 'USD': 1.0}
Reply


Messages In This Thread
RE: currency converter using forex-python - by snippsat - Mar-07-2024, 06:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Is there a *.bat DOS batch script to *.py Python Script converter? pstein 3 3,863 Jun-29-2023, 11:57 AM
Last Post: gologica
  Help with basic weight converter PythonSquizzel 3 1,618 Jun-29-2022, 02:42 PM
Last Post: deanhystad
  xml extract currency 3lnyn0 5 1,884 Apr-30-2022, 10:29 AM
Last Post: snippsat
  calculate daily return in percent in forex as to some strategy? alen 1 2,311 Mar-12-2021, 10:03 AM
Last Post: buran
  Converter Souls99 2 2,522 Aug-01-2020, 01:27 AM
Last Post: Souls99
  Help me get this image converter code working? NeTgHoSt 0 2,218 Jul-14-2020, 10:36 PM
Last Post: NeTgHoSt
  Currency converter Scott 5 3,258 Jun-14-2020, 11:59 PM
Last Post: Scott
  How to use 2to3.py converter under Windows OS samsonite 2 7,496 Mar-02-2019, 05:49 AM
Last Post: samsonite
  Currency formatting the third element in a 2D list RedSkeleton007 3 3,380 Mar-09-2018, 12:53 PM
Last Post: j.crater
  Can't get a downloaded file converter to work Godotisnothere 1 3,287 Jan-24-2017, 06:01 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020