Get User Data Timestamp
curl --request GET \
--url https://external-api.kalshi.com/trade-api/v2/exchange/user_data_timestampimport requests
url = "https://external-api.kalshi.com/trade-api/v2/exchange/user_data_timestamp"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://external-api.kalshi.com/trade-api/v2/exchange/user_data_timestamp', 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/exchange/user_data_timestamp",
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/exchange/user_data_timestamp"
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/exchange/user_data_timestamp")
.asString();require 'uri'
require 'net/http'
url = URI("https://external-api.kalshi.com/trade-api/v2/exchange/user_data_timestamp")
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{
"as_of_time": "2023-11-07T05:31:56Z"
}exchange
Get User Data Timestamp
There is typically a short delay before exchange events are reflected in the API endpoints. Whenever possible, combine API responses to PUT/POST/DELETE requests with WebSocket data to obtain the most accurate view of the exchange state. This endpoint provides an approximate indication of when the data from the following endpoints was last validated: GetBalance, GetOrder(s), GetFills, GetPositions
GET
/
exchange
/
user_data_timestamp
Get User Data Timestamp
curl --request GET \
--url https://external-api.kalshi.com/trade-api/v2/exchange/user_data_timestampimport requests
url = "https://external-api.kalshi.com/trade-api/v2/exchange/user_data_timestamp"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://external-api.kalshi.com/trade-api/v2/exchange/user_data_timestamp', 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/exchange/user_data_timestamp",
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/exchange/user_data_timestamp"
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/exchange/user_data_timestamp")
.asString();require 'uri'
require 'net/http'
url = URI("https://external-api.kalshi.com/trade-api/v2/exchange/user_data_timestamp")
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{
"as_of_time": "2023-11-07T05:31:56Z"
}Response
User data timestamp retrieved successfully
Timestamp when user data was last updated.