Events
Event Endpoints
- Client.get_scoring(league: str) Dict[str, Dict[str, float]]
method to retreive information about scoring for different league events
- Client.get_events(start: int = 0, limit: int = 25, league: Optional[str] = None, include_sims: bool = False, include_count: bool = False) Union[List[jockmkt_sdk.objects.Event], Tuple[List[jockmkt_sdk.objects.Event], int]]
Populates event objects with recent and upcoming events
- Parameters
start (int, optional) – Page at which the user wants to start their search, default: 0 (first page of events)
limit (int, optional) – Number of entities the user wants to display, default: 25 (displays 25 recent and upcoming events)
league (str, optional) – Filter by league, must be one of: [‘nba’, ‘nfl’, ‘nhl’, ‘pga’, ‘mlb’, ‘nascar’]
include_sims (bool, optional) – Will return all events, including Horse Sims for test use
include_count (bool, optional) – include the count of available events for this request as part of a tuple in the return value
- Returns
list of
objects.Events, containing the event_id and information for each- Return type
List[objects.Event]
- Client.get_event(event_id: str) jockmkt_sdk.objects.Event
fetch a particular event, by default includes games, payouts and tradeables. This is easier than pulling payouts, tradeables, and games separately
- Parameters
event_id (str, required) – The event_id for your chosen event, (e.g. evt_60dbec530d2197a973c5dddcf6f65e12)
- Returns
An
objects.Event, including its payouts, tradeables and games- Return type
Recommended usage: pull a list of events using get_events and then get event-specific information using the event_id.
Example
events = client.get_events()
event_info = client.get_event(event[0].event_id)
This will include information about event games, payouts and tradeables. You can also use the following methods to pull that data.
- Client.get_event_tradeables(event_id: str) List[jockmkt_sdk.objects.Tradeable]
get all tradeables in an event
- Parameters
event_id (str, required) – The event_id for your chosen event, (e.g. evt_60dbec530d2197a973c5dddcf6f65e12)
- Returns
a list of
objects.Tradeableobjects participating in the chosen event- Return type
List[objects.Tradeable]
returns a list of objects.Tradeable objects. Tradeable ID is what is used to place orders.
returns a dictionary of event payouts.
- Client.get_event_games(event_id: str) List[jockmkt_sdk.objects.Game]
get all games in an event
- Parameters
event_id (str, required) – the event_id for your chosen event, (e.g. evt_60dbec530d2197a973c5dddcf6f65e12)
- Returns
a list of event-relevant
objects.Gameobjects- Return type
List[objects.Game]
returns a list of object.Game objects
Event Object
- class jockmkt_sdk.objects.Event(event: dict)
Class dedicated to storing event-related info. May contain list of Game objects, Tradeable objects and other information related to payouts and whether the event is a contest.
- Variables
event_id – event_id for the chosen event, accessed via self.event_id. Used to access other event-specific info
name – the event’s name as displayed on the app
description – the event’s description
type – the type of event, either a contest or a cash market
status – the event’s status. One of: scheduled, cancelled, halted, ipo, ipo_closed, live, live_closed, payouts_completed, prizes_paid or contests_paid
league – the league to which this event’s scoring, games and players apply
ipo_start – timestamp at which the ipo opens
ipo_end – estimated time at which the ipo should end
est_close – estimated time the event will close
amt_completed – percentage of the event completed
updated_at – last timestamp at which the event was updated
payouts – a list of payouts for the event in the following format: ‘payouts’: [{‘position’: 1, ‘amount’: 25},…, {‘position’: n, ‘amount’: k}]
games – a list of
objects.Gameobjectstradeables – a list of :class`objects.Tradeable` objects
contest – information about the contest, if it’s a contest-type market see: objects.Event.type
share_count – the number of shares available for that market