Metadata-Version: 2.4
Name: socketrade
Version: 0.1.0
Summary: Minimal Python client for the Socketrade MT5 API
Author-email: Socketrade <support@socketrade.com>
License: MIT License
        
        Copyright (c) 2026 Socketrade
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://www.socketrade.com
Project-URL: Documentation, https://www.socketrade.com/developers/quickstart
Project-URL: Source, https://github.com/respondsetausi-del/socketrade-sdks/tree/main/python
Project-URL: Issues, https://github.com/respondsetausi-del/socketrade-sdks/issues
Keywords: mt5,metatrader,trading,api,forex
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28
Dynamic: license-file

# Socketrade Python client

Minimal client for the Socketrade MT5 API. Only `requests` is required.

```bash
pip install socketrade
```

```python
import os
from socketrade import Socketrade

sr = Socketrade(os.environ["SOCKETRADE_KEY"])

print(sr.usage())

account = sr.add_account(
    number="41299492",
    password=os.environ["MT5_PASSWORD"],
    server="Deriv-Demo",
    name="Demo",
)
sr.connect(account["id"])

print(sr.status(account["id"]))
for p in sr.positions(account["id"])["positions"]:
    print(p["symbol"], p["volume"], p["profit"])

order = sr.order_send(account["id"], "EURUSD", 0.01, "buy")
sr.position_close(account["id"], order["ticket"])
```

- One seat covers one MT5 account.
- Wait for `status == "ready"` before placing an order.
- Use a demo account first.
- The WebSocket streams price ticks; positions and history are REST reads.
- Docs: https://www.socketrade.com/developers
