curl --request GET \
--url https://external-api.kalshi.com/trade-api/v2/marketsimport requests
url = "https://external-api.kalshi.com/trade-api/v2/markets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://external-api.kalshi.com/trade-api/v2/markets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://external-api.kalshi.com/trade-api/v2/markets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://external-api.kalshi.com/trade-api/v2/markets"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://external-api.kalshi.com/trade-api/v2/markets")
.asString();require 'uri'
require 'net/http'
url = URI("https://external-api.kalshi.com/trade-api/v2/markets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"markets": [
{
"ticker": "<string>",
"event_ticker": "<string>",
"market_type": "binary",
"yes_sub_title": "<string>",
"no_sub_title": "<string>",
"created_time": "2023-11-07T05:31:56Z",
"updated_time": "2023-11-07T05:31:56Z",
"open_time": "2023-11-07T05:31:56Z",
"close_time": "2023-11-07T05:31:56Z",
"latest_expiration_time": "2023-11-07T05:31:56Z",
"settlement_timer_seconds": 123,
"status": "initialized",
"yes_bid_dollars": "0.5600",
"yes_bid_size_fp": "10.00",
"yes_ask_dollars": "0.5600",
"yes_ask_size_fp": "10.00",
"no_bid_dollars": "0.5600",
"no_ask_dollars": "0.5600",
"last_price_dollars": "0.5600",
"volume_fp": "10.00",
"volume_24h_fp": "10.00",
"result": "yes",
"can_close_early": true,
"open_interest_fp": "10.00",
"notional_value_dollars": "0.5600",
"previous_yes_bid_dollars": "0.5600",
"previous_yes_ask_dollars": "0.5600",
"previous_price_dollars": "0.5600",
"settlement_bounds_type": "default",
"expiration_value": "<string>",
"rules_primary": "<string>",
"rules_secondary": "<string>",
"price_level_structure": "<string>",
"price_ranges": [
{
"start": "<string>",
"end": "<string>",
"step": "<string>"
}
],
"title": "<string>",
"subtitle": "<string>",
"expected_expiration_time": "2023-11-07T05:31:56Z",
"settlement_value_dollars": "0.5600",
"settlement_ts": "2023-11-07T05:31:56Z",
"settlement_floor_dollars": "0.5600",
"occurrence_datetime": "2023-11-07T05:31:56Z",
"fee_waiver_expiration_time": "2023-11-07T05:31:56Z",
"early_close_condition": "<string>",
"strike_type": "greater",
"floor_strike": 123,
"cap_strike": 123,
"functional_strike": "<string>",
"custom_strike": {},
"mve_collection_ticker": "<string>",
"mve_selected_legs": [
{
"event_ticker": "<string>",
"market_ticker": "<string>",
"side": "<string>",
"yes_settlement_value_dollars": "0.5600"
}
],
"allowed_leg_misses": 1,
"primary_participant_key": "<string>",
"is_provisional": true,
"exchange_index": 0
}
],
"cursor": "<string>"
}Get Markets
Filter by market status. Possible values: unopened, open, closed, settled. Leave empty to return markets with any status.
- Only one
statusfilter may be supplied at a time. - Timestamp filters will be mutually exclusive from other timestamp filters and certain status filters.
| Compatible Timestamp Filters | Additional Status Filters | Extra Notes |
|---|---|---|
| min_created_ts, max_created_ts | unopened, open, empty | |
| min_close_ts, max_close_ts | closed, empty | |
| min_settled_ts, max_settled_ts | settled, empty | |
| min_updated_ts, max_updated_ts | empty | Incompatible with all filters besides mve_filter=exclude. May be combined with series_ticker, which requires mve_filter=exclude |
Markets that settled before the historical cutoff are only available via GET /historical/markets. See Historical Data for details.
Paging and ordering:
- When
event_tickerortickersis the only filter (nostatus,series_ticker, timestamp filter,mve_filterorcursor), every matching market is returned in one response, in no guaranteed order.limitis not applied and the returnedcursoris empty. - Otherwise results are sorted by creation time, newest first, with these exceptions. With
min_updated_tsormax_updated_tsthey are sorted by last update time, oldest first. When neitherevent_tickernortickersis supplied,status=closed,min_close_tsormax_close_tssorts by close time, latest first, andmin_settled_tsormax_settled_tssorts by settlement time, latest first. A request that suppliesevent_tickerortickerstogether with another filter is sorted by creation time, even when that filter isstatus=closedor a close-time or settlement-time filter. The unpaged case above, whereevent_tickerortickersis the only filter, has no guaranteed order. - A market whose close time changes while you page through a listing sorted by close time can be skipped or returned twice. Deduplicate by
ticker. - A
cursorthat cannot be decoded is ignored and the first page is returned, with no error. Pass the cursor exactly as it was returned, and stop when the returnedcursoris empty.
Responses are cached for a short time, so prices, sizes and status can lag the exchange by several seconds, and filtered listings can lag longer than a read of a single market. Use the WebSocket API when you need current state.
curl --request GET \
--url https://external-api.kalshi.com/trade-api/v2/marketsimport requests
url = "https://external-api.kalshi.com/trade-api/v2/markets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://external-api.kalshi.com/trade-api/v2/markets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://external-api.kalshi.com/trade-api/v2/markets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://external-api.kalshi.com/trade-api/v2/markets"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://external-api.kalshi.com/trade-api/v2/markets")
.asString();require 'uri'
require 'net/http'
url = URI("https://external-api.kalshi.com/trade-api/v2/markets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"markets": [
{
"ticker": "<string>",
"event_ticker": "<string>",
"market_type": "binary",
"yes_sub_title": "<string>",
"no_sub_title": "<string>",
"created_time": "2023-11-07T05:31:56Z",
"updated_time": "2023-11-07T05:31:56Z",
"open_time": "2023-11-07T05:31:56Z",
"close_time": "2023-11-07T05:31:56Z",
"latest_expiration_time": "2023-11-07T05:31:56Z",
"settlement_timer_seconds": 123,
"status": "initialized",
"yes_bid_dollars": "0.5600",
"yes_bid_size_fp": "10.00",
"yes_ask_dollars": "0.5600",
"yes_ask_size_fp": "10.00",
"no_bid_dollars": "0.5600",
"no_ask_dollars": "0.5600",
"last_price_dollars": "0.5600",
"volume_fp": "10.00",
"volume_24h_fp": "10.00",
"result": "yes",
"can_close_early": true,
"open_interest_fp": "10.00",
"notional_value_dollars": "0.5600",
"previous_yes_bid_dollars": "0.5600",
"previous_yes_ask_dollars": "0.5600",
"previous_price_dollars": "0.5600",
"settlement_bounds_type": "default",
"expiration_value": "<string>",
"rules_primary": "<string>",
"rules_secondary": "<string>",
"price_level_structure": "<string>",
"price_ranges": [
{
"start": "<string>",
"end": "<string>",
"step": "<string>"
}
],
"title": "<string>",
"subtitle": "<string>",
"expected_expiration_time": "2023-11-07T05:31:56Z",
"settlement_value_dollars": "0.5600",
"settlement_ts": "2023-11-07T05:31:56Z",
"settlement_floor_dollars": "0.5600",
"occurrence_datetime": "2023-11-07T05:31:56Z",
"fee_waiver_expiration_time": "2023-11-07T05:31:56Z",
"early_close_condition": "<string>",
"strike_type": "greater",
"floor_strike": 123,
"cap_strike": 123,
"functional_strike": "<string>",
"custom_strike": {},
"mve_collection_ticker": "<string>",
"mve_selected_legs": [
{
"event_ticker": "<string>",
"market_ticker": "<string>",
"side": "<string>",
"yes_settlement_value_dollars": "0.5600"
}
],
"allowed_leg_misses": 1,
"primary_participant_key": "<string>",
"is_provisional": true,
"exchange_index": 0
}
],
"cursor": "<string>"
}Query Parameters
Return markets with metadata updated later than this Unix timestamp (in seconds). Tracks non-trading changes only. May be combined with max_updated_ts and mve_filter=exclude. May also be combined with series_ticker, which requires mve_filter=exclude. Incompatible with other filters.
Return markets with metadata updated at or before this Unix timestamp (in seconds). Tracks non-trading changes only. May be combined with min_updated_ts and mve_filter=exclude. May also be combined with series_ticker, which requires mve_filter=exclude. Incompatible with other filters.