Get prices history
curl --request GET \
--url https://clob.polymarket.com/prices-historyimport requests
url = "https://clob.polymarket.com/prices-history"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://clob.polymarket.com/prices-history', 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://clob.polymarket.com/prices-history",
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://clob.polymarket.com/prices-history"
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://clob.polymarket.com/prices-history")
.asString();require 'uri'
require 'net/http'
url = URI("https://clob.polymarket.com/prices-history")
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{
"history": [
{
"t": 123,
"p": 123
}
]
}{
"error": "<string>",
"code": "<string>",
"retry_after_seconds": 123
}{
"error": "<string>",
"code": "<string>",
"retry_after_seconds": 123
}获取历史价格
Retrieve historical price data for a market.
GET
/
prices-history
Get prices history
curl --request GET \
--url https://clob.polymarket.com/prices-historyimport requests
url = "https://clob.polymarket.com/prices-history"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://clob.polymarket.com/prices-history', 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://clob.polymarket.com/prices-history",
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://clob.polymarket.com/prices-history"
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://clob.polymarket.com/prices-history")
.asString();require 'uri'
require 'net/http'
url = URI("https://clob.polymarket.com/prices-history")
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{
"history": [
{
"t": 123,
"p": 123
}
]
}{
"error": "<string>",
"code": "<string>",
"retry_after_seconds": 123
}{
"error": "<string>",
"code": "<string>",
"retry_after_seconds": 123
}查询参数
The market (asset id) to query.
Filter by items after this unix timestamp.
Filter by items before this unix timestamp.
Time interval for data aggregation.
可用选项:
max, all, 1m, 1w, 1d, 6h, 1h Accuracy of the data expressed in minutes. Default is 1 minute.
响应
Successful response with price history
Show child attributes
Show child attributes
此页面对您有帮助吗?
⌘I