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())
Metadata
Release files for trademux 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| trademux-0.1.3.tar.gz | 15.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| trademux-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.4 kB
Release files / trademux-0.1.3.tar.gz
| Download URL | trademux-0.1.3.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a58044d7e3b5e1e99a344973402808bcdcf71f7a9f0b453e9ffa47bd6819ba6
|
|
BLAKE2b-256 checksum How to use checksums |
db5421f7e6a8eb2791a5c83a28180c5d2da56f1700f575b15068e403cd057791
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|
Release files / trademux-0.1.3-py3-none-any.whl
| Download URL | trademux-0.1.3-py3-none-any.whl |
|---|---|
| Size | 16.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
761572e1a7554637715019669e97fc162105b871f3266e15d5dec3a3a08b13c4
|
|
BLAKE2b-256 checksum How to use checksums |
92d5fe2a5852a4750dad6009972f1a9d602471e7c64b34dbfa9082992f4c0a1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.0
|