Documentation Index
Fetch the complete documentation index at: https://docs.kalshi.com/llms.txt
Use this file to discover all available pages before exploring further.
All URIs are relative to https://api.elections.kalshi.com/trade-api/v2
| Method | HTTP request | Description |
|---|
| getMilestone | GET /milestones/ | Get Milestone |
| getMilestones | GET /milestones | Get Milestones |
getMilestone
GetMilestoneResponse getMilestone()
Get a single milestone by ID
Example
import {
MilestonesApi,
Configuration
} from 'kalshi-typescript';
const configuration = new Configuration({
apiKey: 'your-api-key-id',
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
});
const apiInstance = new MilestonesApi(configuration);
let milestoneId: string; //Milestone ID (default to undefined)
const { status, data } = await apiInstance.getMilestone(
milestoneId
);
Parameters
| Name | Type | Description | Notes |
|---|
| milestoneId | [string] | Milestone ID | defaults to undefined |
Return type
GetMilestoneResponse
Authorization
bearerAuth
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|
| 200 | Milestone retrieved successfully | - |
| 401 | Unauthorized - authentication required | - |
| 404 | Resource not found | - |
| 500 | Internal 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-typescript';
const configuration = new Configuration({
apiKey: 'your-api-key-id',
privateKeyPath: '/path/to/private-key.pem' // or privateKeyPem: 'PEM string'
});
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
| Name | Type | Description | Notes |
|---|
| 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
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|
| 200 | Milestones retrieved successfully | - |
| 401 | Unauthorized - authentication required | - |
| 500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]