Unified forex trading API and Python SDK for MetaTrader 4/5 and OANDA.
Project description
TradeMux
Python SDK for TradeMux, a unified trading API for MetaTrader (MT4/MT5) and OANDA.
Docs: https://docs.trademux.io
Install
pip install trademux
Quickstart (MetaTrader)
from trademux import MTClient
client = MTClient(api_key="sb_tmux_...")
print(client.get_server_status())
# {"status": "ok"}
order = client.buy_market("EURUSD", 0.01, sl=1.0900, tp=1.1100, comment="tmx demo")
print(order)
print(client.get_account_info())
print(client.get_balance())
print(client.get_equity())
Make sure the MT4/MT5 EA is running and connected to the same API key.
Quickstart (OANDA)
from trademux import OandaClient
client = OandaClient(
api_key="sb_tmux_...",
oanda_api_key="oanda_pat_...",
)
print(client.get_server_status())
# {"status": "ok"}
order = client.buy_market("EURUSD", 0.01, sl=1.0900, tp=1.1100, comment="tmx demo")
print(order)
print(client.get_account_info())
print(client.get_balance())
print(client.get_equity())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
trademux-0.1.2.tar.gz
(14.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
trademux-0.1.2-py3-none-any.whl
(14.8 kB
view details)
File details
Details for the file trademux-0.1.2.tar.gz.
File metadata
- Download URL: trademux-0.1.2.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cd5b693e8abfe9d6dc295e8d91bc274855114b299e7f808baf9bc93f4b2796d
|
|
| MD5 |
fc28c5941ac174677da6a77c2baad941
|
|
| BLAKE2b-256 |
fbb57f4ccd4589520b6c545cb2d0fd6289244603ca094c29a208b1ea1326f0ac
|
File details
Details for the file trademux-0.1.2-py3-none-any.whl.
File metadata
- Download URL: trademux-0.1.2-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd3b726dbf1998bda7789ae4cc99c06289444b1b1ce4460488d55fad2d5cdd9c
|
|
| MD5 |
d1f51171bf73d9b51050db410aa29480
|
|
| BLAKE2b-256 |
b1ce1b5b34e43ab7a86032ab6e193d2edd09da8f25a05d651c3f6dfaa48db2a5
|