All URIs are relative to https://api.elections.kalshi.com/trade-api/v2
MethodHTTP requestDescription
get_multivariate_event_collectionGET /multivariate_event_collections/Get Multivariate Event Collection
get_multivariate_event_collectionsGET /multivariate_event_collectionsGet Multivariate Event Collections
lookup_multivariate_event_collection_bundlePOST /multivariate_event_collections//lookupLookup Multivariate Event Collection Bundle

get_multivariate_event_collection

GetMultivariateEventCollectionResponse get_multivariate_event_collection(collection_ticker)
Get Multivariate Event Collection Get a single multivariate event collection by ticker

Example

import kalshi_python
from kalshi_python.models.get_multivariate_event_collection_response import GetMultivariateEventCollectionResponse
from kalshi_python.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.elections.kalshi.com/trade-api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = kalshi_python.Configuration(
    host = "https://api.elections.kalshi.com/trade-api/v2"
)

# Read private key from file
with open('path/to/private_key.pem', 'r') as f:
    private_key = f.read()

# Configure API key authentication
configuration.api_key_id = "your-api-key-id"
configuration.private_key_pem = private_key

# Initialize the Kalshi client
client = kalshi_python.KalshiClient(configuration)

collection_ticker = 'collection_ticker_example' # str | Collection ticker

try:
    # Get Multivariate Event Collection
    api_response = client.get_multivariate_event_collection(collection_ticker)
    print("The response of MultivariateCollectionsApi->get_multivariate_event_collection:\n")
    pprint(api_response)
except Exception as e:
    print("Exception when calling MultivariateCollectionsApi->get_multivariate_event_collection: %s\n" % e)

Parameters

NameTypeDescriptionNotes
collection_tickerstrCollection ticker

Return type

GetMultivariateEventCollectionResponse

HTTP response details

Status codeDescription
200Collection retrieved successfully
401Unauthorized - authentication required
404Resource not found
500Internal server error
[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_multivariate_event_collections

GetMultivariateEventCollectionsResponse get_multivariate_event_collections(status=status)
Get Multivariate Event Collections Get all multivariate event collections

Example

import kalshi_python
from kalshi_python.models.get_multivariate_event_collections_response import GetMultivariateEventCollectionsResponse
from kalshi_python.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.elections.kalshi.com/trade-api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = kalshi_python.Configuration(
    host = "https://api.elections.kalshi.com/trade-api/v2"
)

# Read private key from file
with open('path/to/private_key.pem', 'r') as f:
    private_key = f.read()

# Configure API key authentication
configuration.api_key_id = "your-api-key-id"
configuration.private_key_pem = private_key

# Initialize the Kalshi client
client = kalshi_python.KalshiClient(configuration)

status = 'status_example' # str | Filter by multivariate collection status (optional)

try:
    # Get Multivariate Event Collections
    api_response = client.get_multivariate_event_collections(status=status)
    print("The response of MultivariateCollectionsApi->get_multivariate_event_collections:\n")
    pprint(api_response)
except Exception as e:
    print("Exception when calling MultivariateCollectionsApi->get_multivariate_event_collections: %s\n" % e)

Parameters

NameTypeDescriptionNotes
statusstrFilter by multivariate collection status[optional]

Return type

GetMultivariateEventCollectionsResponse

HTTP response details

Status codeDescription
200Collections retrieved successfully
401Unauthorized - authentication required
500Internal server error
[Back to top] [Back to API list] [Back to Model list] [Back to README]

lookup_multivariate_event_collection_bundle

LookupBundleResponse lookup_multivariate_event_collection_bundle(collection_ticker, lookup_bundle_request)
Lookup Multivariate Event Collection Bundle Lookup a bundle in a multivariate event collection

Example

import kalshi_python
from kalshi_python.models.lookup_bundle_request import LookupBundleRequest
from kalshi_python.models.lookup_bundle_response import LookupBundleResponse
from kalshi_python.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.elections.kalshi.com/trade-api/v2
# See configuration.py for a list of all supported configuration parameters.
configuration = kalshi_python.Configuration(
    host = "https://api.elections.kalshi.com/trade-api/v2"
)

# Read private key from file
with open('path/to/private_key.pem', 'r') as f:
    private_key = f.read()

# Configure API key authentication
configuration.api_key_id = "your-api-key-id"
configuration.private_key_pem = private_key

# Initialize the Kalshi client
client = kalshi_python.KalshiClient(configuration)

collection_ticker = 'collection_ticker_example' # str | Collection ticker

lookup_bundle_request = kalshi_python.LookupBundleRequest() # LookupBundleRequest | 

try:
    # Lookup Multivariate Event Collection Bundle
    api_response = client.lookup_multivariate_event_collection_bundle(collection_ticker, lookup_bundle_request)
    print("The response of MultivariateCollectionsApi->lookup_multivariate_event_collection_bundle:\n")
    pprint(api_response)
except Exception as e:
    print("Exception when calling MultivariateCollectionsApi->lookup_multivariate_event_collection_bundle: %s\n" % e)

Parameters

NameTypeDescriptionNotes
collection_tickerstrCollection ticker
lookup_bundle_requestLookupBundleRequest

Return type

LookupBundleResponse

HTTP response details

Status codeDescription
200Bundle lookup successful
400Bad request - invalid input
401Unauthorized - authentication required
404Resource not found
500Internal server error
[Back to top] [Back to API list] [Back to Model list] [Back to README]