Python SDK methods for Events operations
Method | HTTP request | Description |
---|---|---|
get_event | GET /events/ | Get Event |
get_event_metadata | GET /events//metadata | Get Event Metadata |
get_events | GET /events | Get Events |
GetEventResponse get_event(event_ticker, with_nested_markets=with_nested_markets)Get Event Get data about an event by its ticker. An event represents a real-world occurrence that can be traded on, such as an election, sports game, or economic indicator release. Events contain one or more markets where users can place trades on different outcomes.
Name | Type | Description | Notes |
---|---|---|---|
event_ticker | str | Event ticker | |
with_nested_markets | bool | If true, markets are included within the event object. If false (default), markets are returned as a separate top-level field in the response. | [optional] [default to False] |
Status code | Description |
---|---|
200 | Event retrieved successfully |
401 | Unauthorized - authentication required |
404 | Resource not found |
500 | Internal server error |
GetEventMetadataResponse get_event_metadata(event_ticker)Get Event Metadata Get metadata about an event by its ticker
Name | Type | Description | Notes |
---|---|---|---|
event_ticker | str | Event ticker |
Status code | Description |
---|---|
200 | Event metadata retrieved successfully |
401 | Unauthorized - authentication required |
404 | Resource not found |
500 | Internal server error |
GetEventsResponse get_events(limit=limit, cursor=cursor, with_nested_markets=with_nested_markets, status=status, series_ticker=series_ticker, min_close_ts=min_close_ts)Get Events Get data about all events. An event represents a real-world occurrence that can be traded on, such as an election, sports game, or economic indicator release. Events contain one or more markets where users can place trades on different outcomes. This endpoint returns a paginated response. Use the ‘limit’ parameter to control page size (1-200, defaults to 100). The response includes a ‘cursor’ field - pass this value in the ‘cursor’ parameter of your next request to get the next page. An empty cursor indicates no more pages are available.
Name | Type | Description | Notes |
---|---|---|---|
limit | int | Number of results per page. Defaults to 100. Maximum value is 200. | [optional] [default to 100] |
cursor | str | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | [optional] |
with_nested_markets | bool | If true, markets are included within the event object. If false (default), markets are returned as a separate top-level field in the response. | [optional] [default to False] |
status | str | Filter by status. Possible values depend on the endpoint. | [optional] |
series_ticker | str | Filter by series ticker | [optional] |
min_close_ts | int | Filter items that close after this Unix timestamp | [optional] |
Status code | Description |
---|---|
200 | Events retrieved successfully |
400 | Bad request - invalid input |
401 | Unauthorized - authentication required |
500 | Internal server error |