All URIs are relative to https://api.elections.kalshi.com/trade-api/v2
MethodHTTP requestDescription
getMilestoneGET /milestones/Get Milestone
getMilestonesGET /milestonesGet Milestones

getMilestone

GetMilestoneResponse getMilestone()
Get a single milestone by ID

Example

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

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

let milestoneId: string; //Milestone ID (default to undefined)

const { status, data } = await apiInstance.getMilestone(
    milestoneId
);

Parameters

NameTypeDescriptionNotes
milestoneId[string]Milestone IDdefaults to undefined

Return type

GetMilestoneResponse

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

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

getMilestones

GetMilestonesResponse getMilestones()
Get all milestones

Example

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

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

let status: string; //Filter by milestone status (optional) (default to undefined)
let limit: number; //Number of items per page (minimum 1, maximum 500) (optional) (default to 100)

const { status, data } = await apiInstance.getMilestones(
    status,
    limit
);

Parameters

NameTypeDescriptionNotes
status[string]Filter by milestone status(optional) defaults to undefined
limit[number]Number of items per page (minimum 1, maximum 500)(optional) defaults to 100

Return type

GetMilestonesResponse

Authorization

bearerAuth

HTTP request headers

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

HTTP response details

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