UNPKG

kalshi-typescript

Version:
87 lines (57 loc) 3.18 kB
# MilestoneApi All URIs are relative to *https://api.elections.kalshi.com/trade-api/v2* |Method | HTTP request | Description| |------------- | ------------- | -------------| |[**getMilestone**](#getmilestone) | **GET** /milestones/{milestone_id} | Get Milestone| |[**getMilestones**](#getmilestones) | **GET** /milestones | Get Milestones| # **getMilestone** > GetMilestoneResponse getMilestone() Endpoint for getting data about a specific milestone by its ID. ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **milestoneId** | [**string**] | Milestone ID | defaults to undefined| ### Return type **GetMilestoneResponse** ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**200** | Milestone retrieved successfully | - | |**400** | Bad Request | - | |**401** | Unauthorized | - | |**404** | Not Found | - | |**500** | Internal Server Error | - | # **getMilestones** > GetMilestonesResponse getMilestones() Minimum start date to filter milestones. Format: RFC3339 timestamp ### Parameters |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| | **limit** | [**number**] | Number of milestones to return per page | defaults to undefined| | **minimumStartDate** | [**string**] | Minimum start date to filter milestones. Format RFC3339 timestamp | (optional) defaults to undefined| | **category** | [**string**] | Filter by milestone category. E.g. Sports, Elections, Esports, Crypto. | (optional) defaults to undefined| | **competition** | [**string**] | Filter by competition. E.g. Pro Football, Pro Basketball (M), Pro Baseball, Pro Hockey, College Football. | (optional) defaults to undefined| | **sourceId** | [**string**] | Filter by source id | (optional) defaults to undefined| | **type** | [**string**] | Filter by milestone type. E.g. football_game, basketball_game, soccer_tournament_multi_leg, baseball_game, hockey_match, political_race. | (optional) defaults to undefined| | **relatedEventTicker** | [**string**] | Filter by related event ticker | (optional) defaults to undefined| | **cursor** | [**string**] | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results | (optional) defaults to undefined| | **minUpdatedTs** | [**number**] | Filter milestones with metadata updated after this Unix timestamp (in seconds). Use this to efficiently poll for changes. | (optional) defaults to undefined| ### Return type **GetMilestonesResponse** ### Authorization No authorization required ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| |**200** | Milestones retrieved successfully | - | |**400** | Bad Request | - | |**401** | Unauthorized | - | |**500** | Internal Server Error | - |