Metadata-Version: 2.5
Name: traderail
Version: 1.0.0
Summary: Official Python SDK for the TradeRail managed MetaTrader 5 (MT5) API.
Project-URL: Homepage, https://traderail.cloud
Project-URL: Documentation, https://traderail.cloud/docs.html
Project-URL: Repository, https://github.com/blockmob/trade-rail-sdk
Project-URL: Issues, https://github.com/blockmob/trade-rail-sdk/issues
Author: TradeRail
License-Expression: MIT
License-File: LICENSE
Keywords: copy-trading,forex,metatrader,metatrader5,mt5,trading,trading-api
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.8
Requires-Dist: requests>=2.25
Description-Content-Type: text/markdown

# TradeRail — Python SDK

Official Python client for the [TradeRail](https://traderail.cloud) managed MetaTrader 5 (MT5) API.

```bash
pip install traderail
```

```python
from traderail import TradeRail

tr = TradeRail(api_key="ak_...")          # issued when your account is provisioned

account = tr.connect(user=5012345678)     # -> "acct-5012345678"
print(tr.account_summary(account))        # balance, equity, margin, ...
print(tr.quote(account, "XAUUSD"))        # {'bid': ..., 'ask': ..., 'last': ...}

# DEMO-only by default
tr.order_send(account, "Buy", "XAUUSD", 0.10, sl=2352, tp=2378)
```

Copy-trade fan-out (one call → many accounts) needs a bearer token:

```python
tr = TradeRail(api_key="ak_...", token="tk_...")
tr.bulk_order("Buy", "XAUUSD", 0.01)      # omit logins => every connected account
```

Full method list and the REST reference: **https://traderail.cloud/docs.html**

## Methods
`ping` · `connect` · `check_connect` · `account_summary` · `quote` · `symbol_list` · `symbols` ·
`price_history` · `opened_orders` · `order_send` · `order_modify` · `order_close` ·
`order_history` · `order_history_paginated` · `trade_stats` · `equity_history` ·
`bulk_order` · `bulk_close`

Errors raise `TradeRailError` (HTTP errors and broker-rejected trades).

MIT licensed. © TradeRail.
