Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sportsxapp.com/llms.txt

Use this file to discover all available pages before exploring further.

4 operations. See the market data guide for worked examples.

account_market_stats

Query — returns list[AccountMarketStat]. GraphQL field: accountMarketStats List of all account market stats for a given account Parameters
NameTypeRequiredDescription
paginationPagination (dict — see below)NoThe pagination to use for the results.
filterStatsFilter (dict — see below)NoOptional filter for returned Account Market Stats.
pagination accepts a dict with these keys (pass as params={"pagination": {...}}):
FieldTypeRequiredDescription
pageintYesThe page of result where each page has limit values. Integer >= 0
limitintYesThe limit of values per page. Integer value greater than 0.
filter accepts a dict with these keys (pass as params={"filter": {...}}):
FieldTypeRequiredDescription
market_idslist[str]NoA list of market ids to return stats for.
exclude_zero_settlementsboolNoA flag to determine if stats with 0 settlements should be allowed. if flag is true stats with 0 settlements is not allowed in response. if flag is false stats with 0 settlements is allowed in response.
from_timeintNoThe list of markets that have last_settled_at on or after this time. This time should be specified in microseconds.
to_timeintNoThe list of markets that have last_settled_at on or before this time. This time should be specified in microseconds.
sportslist[str]NoFilter the markets by this sport
competitionslist[str]NoFilter the markets by this competition
Example
result = client.account_market_stats(params={"pagination": ..., "filter": ...}, selections=Selection(...))

markets

Query — returns Page[MarketInfo]. Also available as market_infos_with_count. GraphQL field: marketInfosWithCount Returns a list of the markets and filtered details with the count of entries Parameters
NameTypeRequiredDescription
inputMarketInfosInput (dict — see below)NoOptional list of IDs of the marketInfos to return
input accepts a dict with these keys (pass as params={"input": {...}}):
FieldTypeRequiredDescription
market_idslist[str]NoA list of market ids to return settlements for. If specified, ‘limit’ is ignored.
event_idslist[str]NoA list of event ids to return markets for.
filter_by"ACTIVE" | "LIVE_AND_UPCOMING"NoThe type of filter that should be applied
filtersMarketInfoFiltersNoThe filter that specifies the category, subcategory, section, grouping or subgrouping
market_filterMarketFilterTypeNoThe specification of markets to fetch by filter name
keyword_regexstrNoThe keyword regular expression to match.
limitintNoNumber of records to constrain the return. ‘nil’ and ‘0’ will not limit results
sportslist[str]NoSport or competition to filter the markets by - i.e (Soccer, Cricket).
competitionslist[str]NoCompetition to filter the markets by - i.e (NBA, UEFA).
status"SCHEDULED" | "OPEN" | "PRE_OPEN" | "CANCELLED" | "CLOSED" | … (7 values)NoStatus of the market - (open, pre_open).
trading"TRUE" | "FALSE"NoTrading filter - true means it’s open for trading, false means can’t trade yet.
powered_byPoweredByInputObjectNoPowered by - provider used to result this market.
stat"BASES" | "BK" | "DOUBLES" | "HIT_RUN_RBI" | "HITS" | … (58 values)NoStat filter - can filter by PK or RBI.
featured"TRUE" | "FALSE"NoFeatured flag.
sort_byMarketInfosSortByNoHow to sort the results of the query.
paginationKeysetPaginationNoCursor-based pagination options (cursor and limit). Only available for marketInfosWithCount query.
Example
result = client.markets(params={"input": ...}, selections=Selection(...))

market_settlements

Query — returns list[TransactionHistory]. GraphQL field: marketSettlements List of all settlement for a given market Parameters
NameTypeRequiredDescription
market_idstrYesThe market id to restrict the settlements to.
paginationPagination (dict — see below)NoThe pagination to use for the results.
pagination accepts a dict with these keys (pass as params={"pagination": {...}}):
FieldTypeRequiredDescription
pageintYesThe page of result where each page has limit values. Integer >= 0
limitintYesThe limit of values per page. Integer value greater than 0.
Example
result = client.market_settlements(params={"market_id": ..., "pagination": ...}, selections=Selection(...))

trades_for_settlement

Query — returns SettlementTrades. GraphQL field: tradesForSettlement Opening and closing Trades for given settlement_id Parameters
NameTypeRequiredDescription
settlement_idstrYesThe id of the settlement to find the trades for.
Example
result = client.trades_for_settlement(params={"settlement_id": ...}, selections=Selection(...))

Types

Reusable dict shapes referenced by the operations above. Pass as plain Python dicts; the SDK translates snake_case keys to the wire format.

KeysetPagination

Cursor-based keyset pagination.
FieldTypeRequiredDescription
cursorstrNoOpaque cursor for fetching the next page of results.
limitintNoThe limit of values per page. Integer value greater than 0.

MarketFilterType

Parameters for selecting markets based on filter tree
FieldTypeRequiredDescription
group"TRADE" | "BASIC"YesWhich type of filter to query on
pathlist[str]YesA path (list of node names) to a leaf in the market filter tree to set of markets

MarketInfoFilters

Parameters for selecting markets based on filter tree
FieldTypeRequiredDescription
categorylist[str]NoThe category filter - can be a string or list of strings
subcategorylist[str]NoThe subcategory filter - can be a string or list of strings
sectionlist[str]NoThe section filter - can be a string or list of strings
groupinglist[str]NoThe grouping filter - can be a string or list of strings
subgroupinglist[str]NoThe subgrouping filter - can be a string or list of strings

MarketInfosSortBy

A sort order that can be passed to a query requesting a list of market infos.
FieldTypeRequiredDescription
name"EVENT_START_TIME"NoThe name of the field to sort by.
direction"ASC" | "DESC"NoThe direction, asc or desc for the sort.

PoweredByInputObject

FieldTypeRequiredDescription
providerstrYesProvider used to result this market
linkstrNoreference link of the provider.