Skip to main content

tradermade SDK

tradermade is Python SDK for getting forex data via REST API or Websocket.

Installation

Use the package manager pip to install foobar.

pip install tradermade

Get API key by signing up for free

Usage

REST API

import tradermade as tm

# set api key
tm.set_rest_api_key(api_key)


tm.live(currency='EURUSD,GBPUSD',fields=["bid", "mid", "ask"]) # returns live data - fields is optional

tm.historical(currency='EURUSD,GBPUSD', date="2021-04-22",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', start="2021-04-20",end="2021-04-22",interval="hourly",fields=["open", "high", "low","close"]) # returns timeseries data for the currency requested interval is daily, hourly, minute - fields is optional

tm.cfd_list() # gets list of all cfds available

tm.currency_list() # gets list of all currency codes available add two codes to get code for currencypair ex EUR + USD gets EURUSD

Streaming Data

from tradermade import stream

def print_message(data):
   print(f"Received: {data}")

api_key = "api_key"

 # set streaming key - not the same as rest API key
stream.set_ws_key(api_key)

stream.set_symbols("USDJPY,EURGBP")

# Set the callback for receiving messages
stream.stream_data(print_message)

stream.connect()

Contributing

For changes, please open an issue to discuss what you would like to change.

License

MIT

Metadata

Release files for tradermade 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tradermade 1.0
File Size Uploaded
tradermade-1.0.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tradermade 1.0
File Interpreter ABI Platform
tradermade-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.0 kB

Release files / tradermade-1.0.tar.gz

Download URL tradermade-1.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
10e4081f9a21ac25d862934e357e1e3f9c6c6333c62626f52b34d9cd76c78a2d
BLAKE2b-256 checksum
How to use checksums
0e6f58f16a17cc36c8b75ae7fa67f50ca4880c9a92a2956331d29abb3c35e168
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.10

Release files / tradermade-1.0-py3-none-any.whl

Download URL tradermade-1.0-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e746542cbd2d4c3fd68475883b4743e325a2fef3a43464e0fe45de9592ac7d73
BLAKE2b-256 checksum
How to use checksums
a1ae775f7dbb65c708b7d25b2842b9ab2e04dc83d5a0f09ad3af11d32b397072
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

0.8.0

1 release file

0.7.0

1 release file

0.5.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page