AlgoProven turns each firm's rule-set into a live decision: your bot asks "can I take this trade?" and gets ALLOW / REDUCE / BLOCK with the exact max-safe size — checked against the firm's drawdown and risk math before the order is sent. This is the "Can I take this trade?" gate as a programmatic endpoint.
Live API · interactive docs ↗ · independent tooling, illustrative — verify each firm's official rules.
GET /api/v1/rulegate/firms — the rule-modelled firms and their default room-to-breach.
# request curl https://app.algoproven.com/api/v1/rulegate/firms # response { "firms": [ { "key": "topstep_50k", "name": "Topstep 50K Combine", "default_room": 1000.0 }, { "key": "apex_50k", "name": "Apex 50K Intraday", "default_room": 2500.0 }, { "key": "ffn_50k", "name": "FFN 50K", "default_room": 2000.0 } ] }
POST /api/v1/rulegate/check — pass the firm, the instrument, size + stop, and your live room-to-breach. Get a verdict.
# request curl -X POST https://app.algoproven.com/api/v1/rulegate/check \ -H "Content-Type: application/json" \ -d '{"firm":"topstep_50k","symbol":"ES","qty":2,"stop_ticks":12,"room":1000}' # response { "decision": "ALLOW", "reason": "Risk $300 is within $1,000 of room — $700 left after.", "max_safe_qty": null, "proposed_risk": 300.0, "room": 1000.0, "distance_to_breach": 700.0 }
| Field | Meaning |
|---|---|
| decision | ALLOW · REDUCE (too big — see max_safe_qty) · BLOCK (no safe size) |
| reason | Plain-English explanation, in dollars of room. |
| max_safe_qty | On REDUCE: the largest size that still fits your room. null otherwise. |
| proposed_risk | The trade's worst-case loss = qty × stop_ticks × tick value. |
| room | Distance-to-breach you passed in (or the firm default). |
| distance_to_breach | Room left after the trade, if allowed. |
Any language can hit the HTTP endpoint. Plain Python, no package needed:
import urllib.request, json req = urllib.request.Request( "https://app.algoproven.com/api/v1/rulegate/check", data=json.dumps({"firm":"topstep_50k","symbol":"ES","qty":2,"stop_ticks":12,"room":1000}).encode(), headers={"Content-Type":"application/json"}) verdict = json.load(urllib.request.urlopen(req)) if verdict["decision"] == "BLOCK": # don't send the order skip_trade(verdict["reason"])
Prefer a package? pip install algoproven — then from algoproven import RuleGate (.check() / .allowed() / .firms()), a thin wrapper over the same API. on PyPI ↗. The HTTP example above works for any stack.
In AlgoProven, your bot checks this against your live distance-to-breach before each trade — ALLOW / REDUCE / BLOCK / FLATTEN, in real time. Try the gate free on the simulator.
More: interactive API docs ↗ · the gate, in your browser · works with your stack · human-readable bot policy