Python SDK (Software Development Kit) to help get live and historical forex data in one line of code.
pip install tradermade
Signup for Free at https://marketdata.tradermade.com/signup.
You can find your key at https://marketdata.tradermade.com/myAccount
You can follow the full tutorial at https://tradermade.com/tutorials/python-sdk-for-forex-data
tm.set_rest_api_key("api_key")
tm.currency_list()
gets a list of all currency codes available add two codes to get code for currency pair ex EUR + USD gets EURUSD
tm.live(currency='EURUSD,GBPUSD',fields=["bid", "mid", "ask"])
tm.historical(currency='EURUSD,GBPUSD', date="2011-01-20",interval="daily", fields=["open", "high", "low","close"])
returns historical data for the currency requested interval is daily, hourly, minute - fields is optional
tm.timeseries(currency='EURUSD,GBPUSD', start="2021-04-26",end="2021-04-27",interval="minute",fields=["close"],period=15)
returns 15-minute bar for two currencies - you may need to adjust the date to two days back or the function will return an error that only two days of data is allowed for minute interval