Unified 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.1.tar.gz
(9.6 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.1-py3-none-any.whl
(10.9 kB
view details)
File details
Details for the file trademux-0.1.1.tar.gz.
File metadata
- Download URL: trademux-0.1.1.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b99d66603e6d2f5c4d0330ab44f35079c698651ab8a38e160809c04cd4644ff
|
|
| MD5 |
2c175cee1c42f1dd15c2ee2fed09acdd
|
|
| BLAKE2b-256 |
be9dc3e9d630c07246841c9b037bddb198af1000323239c43b04808c74d9b0a2
|
File details
Details for the file trademux-0.1.1-py3-none-any.whl.
File metadata
- Download URL: trademux-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.9 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 |
8a63d4e8e4835e360e43e1fbcef1df5453a7f45afd16e04687d5e22ad753bb47
|
|
| MD5 |
cf5fba7fbf434efce6481ca2edd9fc47
|
|
| BLAKE2b-256 |
1ac15819ced8855a09c62b1025726d42cf06db2142968874fccb764b7b0ea2e5
|