This could be done with https://pypi.org/project/forex-python/ Doc: https://forex-python.readthedocs.io/en/latest/usage.html