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)