Structured_Target API Reference¶
Endpoints¶
Get Structured Target¶
Synchronous API Call
kalshi_py.api.structured_target.get_structured_target.sync(structured_target_id: str, *, client: Union[AuthenticatedClient, Client]) -> Optional[ModelGetStructuredTargetResponse]
¶
Get Structured Target
Endpoint for getting data about a specific structured target by its ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
structured_target_id
|
str
|
Structured Target ID |
required |
Raises:
Type | Description |
---|---|
UnexpectedStatus
|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. |
TimeoutException
|
If the request takes longer than Client.timeout. |
Returns:
Type | Description |
---|---|
Optional[ModelGetStructuredTargetResponse]
|
ModelGetStructuredTargetResponse |
Source code in kalshi_py/api/structured_target/get_structured_target.py
Asynchronous API Call
kalshi_py.api.structured_target.get_structured_target.asyncio(structured_target_id: str, *, client: Union[AuthenticatedClient, Client]) -> Optional[ModelGetStructuredTargetResponse]
async
¶
Get Structured Target
Endpoint for getting data about a specific structured target by its ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
structured_target_id
|
str
|
Structured Target ID |
required |
Raises:
Type | Description |
---|---|
UnexpectedStatus
|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. |
TimeoutException
|
If the request takes longer than Client.timeout. |
Returns:
Type | Description |
---|---|
Optional[ModelGetStructuredTargetResponse]
|
ModelGetStructuredTargetResponse |
Source code in kalshi_py/api/structured_target/get_structured_target.py
Synchronous Detailed Response
kalshi_py.api.structured_target.get_structured_target.sync_detailed(structured_target_id: str, *, client: Union[AuthenticatedClient, Client]) -> Response[ModelGetStructuredTargetResponse]
¶
Get Structured Target
Endpoint for getting data about a specific structured target by its ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
structured_target_id
|
str
|
Structured Target ID |
required |
Raises:
Type | Description |
---|---|
UnexpectedStatus
|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. |
TimeoutException
|
If the request takes longer than Client.timeout. |
Returns:
Type | Description |
---|---|
Response[ModelGetStructuredTargetResponse]
|
Response[ModelGetStructuredTargetResponse] |
Source code in kalshi_py/api/structured_target/get_structured_target.py
Asynchronous Detailed Response
kalshi_py.api.structured_target.get_structured_target.asyncio_detailed(structured_target_id: str, *, client: Union[AuthenticatedClient, Client]) -> Response[ModelGetStructuredTargetResponse]
async
¶
Get Structured Target
Endpoint for getting data about a specific structured target by its ID.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
structured_target_id
|
str
|
Structured Target ID |
required |
Raises:
Type | Description |
---|---|
UnexpectedStatus
|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. |
TimeoutException
|
If the request takes longer than Client.timeout. |
Returns:
Type | Description |
---|---|
Response[ModelGetStructuredTargetResponse]
|
Response[ModelGetStructuredTargetResponse] |
Source code in kalshi_py/api/structured_target/get_structured_target.py
Get Structured Targets¶
Synchronous API Call
kalshi_py.api.structured_target.get_structured_targets.sync(*, client: Union[AuthenticatedClient, Client], type_: Union[Unset, str] = UNSET, competition: Union[Unset, str] = UNSET, page_size: Union[Unset, int] = UNSET, cursor: Union[Unset, str] = UNSET) -> Optional[ModelGetStructuredTargetsResponse]
¶
Get Structured Targets
Endpoint for getting data about structured targets.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
type_
|
Union[Unset, str]
|
Type of structured target |
UNSET
|
competition
|
Union[Unset, str]
|
Competition filter |
UNSET
|
page_size
|
Union[Unset, int]
|
Page size (min: 1, max: 2000) |
UNSET
|
cursor
|
Union[Unset, str]
|
Pagination cursor |
UNSET
|
Raises:
Type | Description |
---|---|
UnexpectedStatus
|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. |
TimeoutException
|
If the request takes longer than Client.timeout. |
Returns:
Type | Description |
---|---|
Optional[ModelGetStructuredTargetsResponse]
|
ModelGetStructuredTargetsResponse |
Source code in kalshi_py/api/structured_target/get_structured_targets.py
Asynchronous API Call
kalshi_py.api.structured_target.get_structured_targets.asyncio(*, client: Union[AuthenticatedClient, Client], type_: Union[Unset, str] = UNSET, competition: Union[Unset, str] = UNSET, page_size: Union[Unset, int] = UNSET, cursor: Union[Unset, str] = UNSET) -> Optional[ModelGetStructuredTargetsResponse]
async
¶
Get Structured Targets
Endpoint for getting data about structured targets.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
type_
|
Union[Unset, str]
|
Type of structured target |
UNSET
|
competition
|
Union[Unset, str]
|
Competition filter |
UNSET
|
page_size
|
Union[Unset, int]
|
Page size (min: 1, max: 2000) |
UNSET
|
cursor
|
Union[Unset, str]
|
Pagination cursor |
UNSET
|
Raises:
Type | Description |
---|---|
UnexpectedStatus
|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. |
TimeoutException
|
If the request takes longer than Client.timeout. |
Returns:
Type | Description |
---|---|
Optional[ModelGetStructuredTargetsResponse]
|
ModelGetStructuredTargetsResponse |
Source code in kalshi_py/api/structured_target/get_structured_targets.py
Synchronous Detailed Response
kalshi_py.api.structured_target.get_structured_targets.sync_detailed(*, client: Union[AuthenticatedClient, Client], type_: Union[Unset, str] = UNSET, competition: Union[Unset, str] = UNSET, page_size: Union[Unset, int] = UNSET, cursor: Union[Unset, str] = UNSET) -> Response[ModelGetStructuredTargetsResponse]
¶
Get Structured Targets
Endpoint for getting data about structured targets.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
type_
|
Union[Unset, str]
|
Type of structured target |
UNSET
|
competition
|
Union[Unset, str]
|
Competition filter |
UNSET
|
page_size
|
Union[Unset, int]
|
Page size (min: 1, max: 2000) |
UNSET
|
cursor
|
Union[Unset, str]
|
Pagination cursor |
UNSET
|
Raises:
Type | Description |
---|---|
UnexpectedStatus
|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. |
TimeoutException
|
If the request takes longer than Client.timeout. |
Returns:
Type | Description |
---|---|
Response[ModelGetStructuredTargetsResponse]
|
Response[ModelGetStructuredTargetsResponse] |
Source code in kalshi_py/api/structured_target/get_structured_targets.py
Asynchronous Detailed Response
kalshi_py.api.structured_target.get_structured_targets.asyncio_detailed(*, client: Union[AuthenticatedClient, Client], type_: Union[Unset, str] = UNSET, competition: Union[Unset, str] = UNSET, page_size: Union[Unset, int] = UNSET, cursor: Union[Unset, str] = UNSET) -> Response[ModelGetStructuredTargetsResponse]
async
¶
Get Structured Targets
Endpoint for getting data about structured targets.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
type_
|
Union[Unset, str]
|
Type of structured target |
UNSET
|
competition
|
Union[Unset, str]
|
Competition filter |
UNSET
|
page_size
|
Union[Unset, int]
|
Page size (min: 1, max: 2000) |
UNSET
|
cursor
|
Union[Unset, str]
|
Pagination cursor |
UNSET
|
Raises:
Type | Description |
---|---|
UnexpectedStatus
|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. |
TimeoutException
|
If the request takes longer than Client.timeout. |
Returns:
Type | Description |
---|---|
Response[ModelGetStructuredTargetsResponse]
|
Response[ModelGetStructuredTargetsResponse] |