Skip to content

Python SDK (Software Development Kit) to help get live and historical forex data in one line of code.

Notifications You must be signed in to change notification settings

tradermade/Forex-Python-SDK

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Forex-Python-SDK

Python SDK (Software Development Kit) to help get live and historical forex data in one line of code.

Install

pip install tradermade

Signup

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

Set API KEY

tm.set_rest_api_key("api_key")

get currency codes

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

Get Live Rates

tm.live(currency='EURUSD,GBPUSD',fields=["bid", "mid", "ask"])

Get Historical Rates

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

Get Timeseries

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

About

Python SDK (Software Development Kit) to help get live and historical forex data in one line of code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published