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?",
"family": "A",
"phase": "open",
"status": "open",
"pool_account": "rNPA3W2Gj3mMTqt6V5KYc5hD2pszdPsV6S",
"fee_rate": 0.03,
"bet_cutoff": "2023-11-07T05:31:56Z",
"resolution_time": "2023-11-07T05:31:56Z",
"resolution": {
"kind": "oracle",
"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"
}Marchés
Lister les marchés
Tous les marchés publics de counsel avec les totaux de pool en direct, les mises par issue et les cotes parimutuel indicatives, à partir d’un instantané d’indexeur XRPL en direct.
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?",
"family": "A",
"phase": "open",
"status": "open",
"pool_account": "rNPA3W2Gj3mMTqt6V5KYc5hD2pszdPsV6S",
"fee_rate": 0.03,
"bet_cutoff": "2023-11-07T05:31:56Z",
"resolution_time": "2023-11-07T05:31:56Z",
"resolution": {
"kind": "oracle",
"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"
}Renvoie chaque marché public avec les soldes de pool en temps réel lus depuis l’indexeur XRPL. Chaque issue porte sa mise, sa probabilité implicite et son payout indicatif par unité. Les cotes sont indicatives jusqu’à
bet_cutoff ; le payout final est déterminé par la composition du pool à la clôture. Aucun paramètre, aucune authentification.