All URIs are relative to https://api.elections.kalshi.com/trade-api/v2
MethodHTTP requestDescription
getStructuredTargetGET /structured_targets/Get Structured Target
getStructuredTargetsGET /structured_targetsGet Structured Targets

getStructuredTarget

GetStructuredTargetResponse getStructuredTarget()
Get a single structured target by ID

Example

import {
    StructuredTargetsApi,
    Configuration
} from '@kalshi/trading-api';

const configuration = new Configuration();
const apiInstance = new StructuredTargetsApi(configuration);

let structuredTargetId: string; //Structured target ID (default to undefined)

const { status, data } = await apiInstance.getStructuredTarget(
    structuredTargetId
);

Parameters

NameTypeDescriptionNotes
structuredTargetId[string]Structured target IDdefaults to undefined

Return type

GetStructuredTargetResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Structured target 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]

getStructuredTargets

GetStructuredTargetsResponse getStructuredTargets()
Get all structured targets

Example

import {
    StructuredTargetsApi,
    Configuration
} from '@kalshi/trading-api';

const configuration = new Configuration();
const apiInstance = new StructuredTargetsApi(configuration);

let status: string; //Filter by structured target status (optional) (default to undefined)
let pageSize: number; //Number of items per page (minimum 100, default 100) (optional) (default to 100)

const { status, data } = await apiInstance.getStructuredTargets(
    status,
    pageSize
);

Parameters

NameTypeDescriptionNotes
status[string]Filter by structured target status(optional) defaults to undefined
pageSize[number]Number of items per page (minimum 100, default 100)(optional) defaults to 100

Return type

GetStructuredTargetsResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Structured targets retrieved successfully-
401Unauthorized - authentication required-
500Internal server error-
[Back to top] [Back to API list] [Back to Model list] [Back to README]