INNER CODE UNIT · Python
root
codedpro/mt5-trade-split-manager · server.py:221
async def root():
return {"status": "online", "service": "MT5 TCP Bridge"}
@app.get("/health")
async def health():
return {
"status": "healthy",
"tcp_host": TCP_HOST,
"tcp_port": TCP_PORT,
"auth_required": bool(API_KEY),
}
@app.post("/order", dependencies=[Depends(require_key)])
async def create_order(order: OrderCommand):
"""Place order on MT5 via TCP (split into 1-10 positions by the EA)."""
# The command sent to the EA always carries an explicit volume_split; when