Skip to main content
POST
/
api
/
kalshi
/
markets
/kalshi/markets
curl --request POST \
  --url https://api.anysite.io/api/kalshi/markets \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "ticker": "<string>",
  "timeout": 300
}
'
import requests

url = "https://api.anysite.io/api/kalshi/markets"

payload = {
"ticker": "<string>",
"timeout": 300
}
headers = {
"access-token": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'access-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({ticker: '<string>', timeout: 300})
};

fetch('https://api.anysite.io/api/kalshi/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://api.anysite.io/api/kalshi/markets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ticker' => '<string>',
'timeout' => 300
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"access-token: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.anysite.io/api/kalshi/markets"

payload := strings.NewReader("{\n \"ticker\": \"<string>\",\n \"timeout\": 300\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("access-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.anysite.io/api/kalshi/markets")
.header("access-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"ticker\": \"<string>\",\n \"timeout\": 300\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.anysite.io/api/kalshi/markets")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["access-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ticker\": \"<string>\",\n \"timeout\": 300\n}"

response = http.request(request)
puts response.read_body
[
  {
    "ticker": "<string>",
    "@type": "KalshiMarket",
    "event_ticker": "<string>",
    "market_type": "<string>",
    "status": "<string>",
    "subtitle": "<string>",
    "yes_sub_title": "<string>",
    "no_sub_title": "<string>",
    "yes_bid": 123,
    "yes_ask": 123,
    "no_bid": 123,
    "no_ask": 123,
    "last_price": 123,
    "previous_price": 123,
    "previous_yes_bid": 123,
    "previous_yes_ask": 123,
    "yes_bid_size": 123,
    "yes_ask_size": 123,
    "volume": 123,
    "volume_24h": 123,
    "open_interest": 123,
    "liquidity": 123,
    "notional_value": 123,
    "floor_strike": 123,
    "strike_type": "<string>",
    "rules_primary": "<string>",
    "rules_secondary": "<string>",
    "result": "<string>",
    "expiration_value": "<string>",
    "settlement_value": 123,
    "can_close_early": true,
    "early_close_condition": "<string>",
    "settlement_timer_seconds": 123,
    "open_at": "<string>",
    "close_at": "<string>",
    "expiration_at": "<string>",
    "expected_expiration_at": "<string>",
    "latest_expiration_at": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>",
    "settled_at": "<string>"
  }
]
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
ticker
string
required
Minimum string length: 1
timeout
integer
default:300
Required range: 20 <= x <= 1500

Response

Successful Response

ticker
string
required
@type
string
default:KalshiMarket
event_ticker
string | null
market_type
string | null
status
string | null
subtitle
string | null
yes_sub_title
string | null
no_sub_title
string | null
yes_bid
number | null
yes_ask
number | null
no_bid
number | null
no_ask
number | null
last_price
number | null
previous_price
number | null
previous_yes_bid
number | null
previous_yes_ask
number | null
yes_bid_size
integer | null
yes_ask_size
integer | null
volume
integer | null
volume_24h
integer | null
open_interest
integer | null
liquidity
number | null
notional_value
number | null
floor_strike
number | null
strike_type
string | null
rules_primary
string | null
rules_secondary
string | null
result
string | null
expiration_value
string | null
settlement_value
number | null
can_close_early
boolean | null
early_close_condition
string | null
settlement_timer_seconds
integer | null
open_at
string | null
close_at
string | null
expiration_at
string | null
expected_expiration_at
string | null
latest_expiration_at
string | null
created_at
string | null
updated_at
string | null
settled_at
string | null