11# SharpAPI Python SDK
22
3+ [ ![ PyPI] ( https://img.shields.io/pypi/v/sharpapi?color=06b6d4 )] ( https://pypi.org/project/sharpapi/ )
4+ [ ![ python] ( https://img.shields.io/pypi/pyversions/sharpapi?color=06b6d4 )] ( https://pypi.org/project/sharpapi/ )
5+ [ ![ license] ( https://img.shields.io/badge/license-MIT-06b6d4 )] ( LICENSE )
6+ [ ![ docs] ( https://img.shields.io/badge/docs-docs.sharpapi.io-06b6d4 )] ( https://docs.sharpapi.io )
7+
38Official Python client for the [ SharpAPI] ( https://sharpapi.io ) real-time sports betting odds API.
49
5- Get pre-computed +EV opportunities, arbitrage detection, middles, and live odds from 20 + sportsbooks — with Pinnacle as the sharp reference.
10+ Get pre-computed +EV opportunities, arbitrage detection, middles, and live odds from 45 + sportsbooks, with Pinnacle as the sharp reference.
611
712## Install
813
@@ -20,7 +25,7 @@ client = SharpAPI("sk_live_xxx")
2025# --- Arbitrage opportunities ---
2126arbs = client.arbitrage.get(min_profit = 1.0 , league = " nba" )
2227for arb in arbs.data:
23- print (f " { arb.profit_percent:.2f } % profit — { arb.event_name} " )
28+ print (f " { arb.profit_percent:.2f } % profit: { arb.event_name} " )
2429 for leg in arb.legs:
2530 print (f " { leg.sportsbook} : { leg.selection} @ { leg.odds_american} ( { leg.stake_percent:.1f } %) " )
2631
@@ -52,7 +57,7 @@ def on_ev(data):
5257@stream.on (" arb:detected" )
5358def on_arb (data ):
5459 for arb in data:
55- print (f " Arb: { arb[' profit_percent' ]} % — { arb[' event_name' ]} " )
60+ print (f " Arb: { arb[' profit_percent' ]} %: { arb[' event_name' ]} " )
5661
5762stream.connect() # Blocks, processing events
5863```
@@ -105,10 +110,10 @@ Every opportunity response includes staleness metadata to avoid acting on stale
105110arbs = client.arbitrage.get()
106111for arb in arbs.data:
107112 if arb.possibly_stale:
108- print (f " Skipping — odds may be stale ( { arb.oldest_odds_age_seconds} s old) " )
113+ print (f " Skipping: odds may be stale ( { arb.oldest_odds_age_seconds} s old) " )
109114 continue
110115 if " LIVE_HIGH_PROFIT_SUSPICIOUS" in arb.warnings:
111- print (f " Skipping — likely phantom arb " )
116+ print (f " Skipping: likely phantom arb " )
112117 continue
113118 print (f " Actionable: { arb.profit_percent} % " )
114119```
@@ -142,7 +147,7 @@ except AuthenticationError:
142147except TierRestrictedError as e:
143148 print (f " Upgrade to { e.required_tier} tier for this feature " )
144149except RateLimitedError as e:
145- print (f " Rate limited — retry after { e.retry_after} s " )
150+ print (f " Rate limited: retry after { e.retry_after} s " )
146151```
147152
148153## Odds Conversion Utilities
0 commit comments