List markets
curl --request GET \
--url https://api.counsel.markets/marketsimport requests
url = "https://api.counsel.markets/markets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.counsel.markets/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.counsel.markets/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://api.counsel.markets/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://api.counsel.markets/markets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.counsel.markets/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": [
{
"id": "8679dd8bda43f5c1",
"question": "Will XRP/USD be ≥ $1.13 by midnight ET?",
"pool_account": "rNPA3W2Gj3mMTqt6V5KYc5hD2pszdPsV6S",
"fee_rate": 0.03,
"bet_cutoff": "2023-11-07T05:31:56Z",
"resolution_time": "2023-11-07T05:31:56Z",
"resolution": {
"summary": "XLS-47 XRP/USD >= 1.13"
},
"total_xrp": 0,
"total_drops": "0",
"outcomes": [
{
"index": 0,
"label": "Yes",
"destination_tag": 0,
"pool_drops": "0",
"pool_xrp": 0,
"bets": 0,
"implied_prob": 0.5,
"payout_per_unit": 1.94
}
]
}
],
"source_tag": 2606220005,
"generated_at": "2023-11-07T05:31:56Z"
}Markets
List markets
All public markets with live pool totals, per-outcome stakes, and indicative parimutuel odds. Odds are indicative until betting closes; the final payout is set by the pool at bet_cutoff.
GET
/
markets
List markets
curl --request GET \
--url https://api.counsel.markets/marketsimport requests
url = "https://api.counsel.markets/markets"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.counsel.markets/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.counsel.markets/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://api.counsel.markets/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://api.counsel.markets/markets")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.counsel.markets/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": [
{
"id": "8679dd8bda43f5c1",
"question": "Will XRP/USD be ≥ $1.13 by midnight ET?",
"pool_account": "rNPA3W2Gj3mMTqt6V5KYc5hD2pszdPsV6S",
"fee_rate": 0.03,
"bet_cutoff": "2023-11-07T05:31:56Z",
"resolution_time": "2023-11-07T05:31:56Z",
"resolution": {
"summary": "XLS-47 XRP/USD >= 1.13"
},
"total_xrp": 0,
"total_drops": "0",
"outcomes": [
{
"index": 0,
"label": "Yes",
"destination_tag": 0,
"pool_drops": "0",
"pool_xrp": 0,
"bets": 0,
"implied_prob": 0.5,
"payout_per_unit": 1.94
}
]
}
],
"source_tag": 2606220005,
"generated_at": "2023-11-07T05:31:56Z"
}⌘I