-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
114 lines (106 loc) · 2.32 KB
/
Copy path__init__.py
File metadata and controls
114 lines (106 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
"""SharpAPI Python SDK — Real-time sports betting odds, +EV, and arbitrage detection.
Example::
from sharpapi import SharpAPI
client = SharpAPI("sk_live_xxx")
# Arbitrage opportunities
arbs = client.arbitrage.get(min_profit=1.0)
for arb in arbs.data:
print(f"{arb.profit_percent}% — {arb.event_name}")
# +EV opportunities
evs = client.ev.get(min_ev=3.0, league="nba")
for opp in evs.data:
print(f"+{opp.ev_percentage}% on {opp.selection} @ {opp.sportsbook}")
"""
from ._utils import american_to_decimal, american_to_probability, decimal_to_american
from .async_client import AsyncSharpAPI
from .client import SharpAPI
from .exceptions import (
ERROR_CODE_DESCRIPTIONS,
ERROR_CODE_TO_EXCEPTION,
AuthenticationError,
RateLimitedError,
SharpAPIError,
StreamError,
TierRestrictedError,
ValidationError,
)
from .models import (
AccountInfo,
APIKey,
APIResponse,
ArbitrageLeg,
ArbitrageOpportunity,
ClosingOddsLine,
ClosingSnapshot,
EntityRef,
Event,
EVOpportunity,
GameState,
League,
LowHoldOpportunity,
LowHoldSide,
Market,
MiddleOpportunity,
MiddleSide,
OddsLine,
OddsValue,
Pagination,
RateLimitInfo,
ResponseMeta,
Sport,
SportRef,
Sportsbook,
Team,
TeamRef,
)
from .streaming import EventStream
__version__ = "0.4.0"
__all__ = [
# Clients
"SharpAPI",
"AsyncSharpAPI",
# Models
"APIKey",
"APIResponse",
"AccountInfo",
"ArbitrageLeg",
"ArbitrageOpportunity",
"ClosingOddsLine",
"ClosingSnapshot",
"EntityRef",
"EVOpportunity",
"Event",
"GameState",
"League",
"LowHoldOpportunity",
"LowHoldSide",
"Market",
"MiddleOpportunity",
"MiddleSide",
"OddsLine",
"OddsValue",
"Pagination",
"RateLimitInfo",
"ResponseMeta",
"Sport",
"SportRef",
"Sportsbook",
"Team",
"TeamRef",
# Streaming
"EventStream",
# Exceptions
"AuthenticationError",
"RateLimitedError",
"SharpAPIError",
"StreamError",
"TierRestrictedError",
"ValidationError",
# Error-code registry
"ERROR_CODE_DESCRIPTIONS",
"ERROR_CODE_TO_EXCEPTION",
# Utilities
"american_to_decimal",
"american_to_probability",
"decimal_to_american",
]