A tiny, runnable app that reacts to break points on the Live Tennis API live feed. It shows exactly where your trading logic goes — and it places no real bets.
It rides the official livetennisapi
SDK: it opens the ULTRA WebSocket feed with signals=["break_point"], routes
every frame to a Strategy, and logs the paper action the strategy would take.
Requires an ULTRA key. The WebSocket feed and the break-point signals are ULTRA-tier only. Get a key at https://livetennisapi.com/#pricing.
cp .env.example .env # then put your ULTRA key in .env
pip install -r requirements.txt
python app.pyYou'll see output like:
INFO starter connecting to the live feed with signals=['break_point'] …
INFO strategy BREAK POINT match=18953 p1 serving, p2 holds 2 break point(s) swing=0.22
INFO strategy PAPER ORDER back p2 on match 18953 for 20.00 (2 break point(s) against an unfavoured server)
INFO strategy -> break point broken match=18953 p1 win prob now 0.63
Everything you edit is in strategy.py:
on_break_point(event)— the headline signal lands here.decide(event)— return aPaperOrder(orNone). Put your edge here.place_paper_order(order)— logs the intended order. Nothing real happens.
place_paper_order contains a clearly marked block:
# ================= WIRE YOUR OWN EXCHANGE / VENUE HERE =================
The real-execution seam is Strategy._execute. It is unimplemented and never
called on purpose, so a fresh clone can never move money. To go live, implement
_execute against your venue's API and call it from place_paper_order. That
choice — and any risk it carries — is entirely yours.
pip install -r requirements.txt
pytestThe tests pump canned frames through the same dispatch path the live app uses (no network), and assert the safety invariant: the execution seam refuses to place a real bet.
The subscribe frame this starter sends:
{ "topics": ["live-scores"], "signals": ["break_point"] }Frames it reacts to: score, break_point, break_point_result. See the
WebSocket section of the API reference.
MIT — see LICENSE.