Get Pulse markets by addresses (batch)
curl --request GET \
--url https://api-mainnet.xo.market/api/pulse/markets/batchimport requests
url = "https://api-mainnet.xo.market/api/pulse/markets/batch"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api-mainnet.xo.market/api/pulse/markets/batch', 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-mainnet.xo.market/api/pulse/markets/batch",
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://api-mainnet.xo.market/api/pulse/markets/batch"
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://api-mainnet.xo.market/api/pulse/markets/batch")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-mainnet.xo.market/api/pulse/markets/batch")
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[
{
"id": 123,
"marketConfigId": 1,
"adapterConfigId": 1,
"marketConfigName": "BTC-5min",
"marketAddress": "<string>",
"status": "ACTIVE",
"cycleNumber": 9821,
"startsAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"observationStartsAt": "2023-11-07T05:31:56Z",
"observationEndsAt": "2023-11-07T05:31:56Z",
"resolvedAt": "2023-11-07T05:31:56Z",
"closedAt": "2023-11-07T05:31:56Z",
"openingTwap": "<string>",
"closingTwap": "<string>",
"winningOutcome": 123,
"sampleCount": 60,
"marketMetadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]Pulse Markets
Get Pulse markets by addresses (batch)
Fetches multiple Pulse markets in a single request using comma-separated on-chain addresses.
GET
/
pulse
/
markets
/
batch
Get Pulse markets by addresses (batch)
curl --request GET \
--url https://api-mainnet.xo.market/api/pulse/markets/batchimport requests
url = "https://api-mainnet.xo.market/api/pulse/markets/batch"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api-mainnet.xo.market/api/pulse/markets/batch', 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-mainnet.xo.market/api/pulse/markets/batch",
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://api-mainnet.xo.market/api/pulse/markets/batch"
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://api-mainnet.xo.market/api/pulse/markets/batch")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-mainnet.xo.market/api/pulse/markets/batch")
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[
{
"id": 123,
"marketConfigId": 1,
"adapterConfigId": 1,
"marketConfigName": "BTC-5min",
"marketAddress": "<string>",
"status": "ACTIVE",
"cycleNumber": 9821,
"startsAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z",
"observationStartsAt": "2023-11-07T05:31:56Z",
"observationEndsAt": "2023-11-07T05:31:56Z",
"resolvedAt": "2023-11-07T05:31:56Z",
"closedAt": "2023-11-07T05:31:56Z",
"openingTwap": "<string>",
"closingTwap": "<string>",
"winningOutcome": 123,
"sampleCount": 60,
"marketMetadata": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]Query Parameters
Comma-separated list of market addresses.
Response
200 - application/json
Pulse markets matching the requested addresses.
Example:
1
Example:
1
Human-readable config name (e.g. asset + horizon).
Example:
"BTC-5min"
On-chain Pulse market address for this cycle.
Cycle status. Common values: ACTIVE, RESOLVED, CLOSED.
Example:
"ACTIVE"
Example:
9821
Example:
60