Build a bet intent
curl --request GET \
--url https://api.counsel.markets/markets/{id}/bet-intentimport requests
url = "https://api.counsel.markets/markets/{id}/bet-intent"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.counsel.markets/markets/{id}/bet-intent', 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/{id}/bet-intent",
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/{id}/bet-intent"
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/{id}/bet-intent")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.counsel.markets/markets/{id}/bet-intent")
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{
"tx": {},
"pool_account": "<string>",
"destination_tag": 123,
"source_tag": 2606220005,
"amount_xrp": 10,
"projected_implied_odds_after": {
"implied_prob": 123,
"payout_per_unit": 123
},
"market": {
"id": "<string>",
"question": "<string>",
"outcome": 123,
"outcome_label": "<string>"
}
}{
"errors": [
"invalid account address"
]
}{
"errors": [
"invalid account address"
]
}{
"error": "market not found"
}Marchés
Construire une intention de pari
Un Payment XRPL non signé, prêt à être signé avec votre propre clé, accompagné des cotes parimutuelles projetées une fois votre mise prise en compte. counsel ne détient jamais de clé.
GET
/
markets
/
{id}
/
bet-intent
Build a bet intent
curl --request GET \
--url https://api.counsel.markets/markets/{id}/bet-intentimport requests
url = "https://api.counsel.markets/markets/{id}/bet-intent"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.counsel.markets/markets/{id}/bet-intent', 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/{id}/bet-intent",
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/{id}/bet-intent"
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/{id}/bet-intent")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.counsel.markets/markets/{id}/bet-intent")
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{
"tx": {},
"pool_account": "<string>",
"destination_tag": 123,
"source_tag": 2606220005,
"amount_xrp": 10,
"projected_implied_odds_after": {
"implied_prob": 123,
"payout_per_unit": 123
},
"market": {
"id": "<string>",
"question": "<string>",
"outcome": 123,
"outcome_label": "<string>"
}
}{
"errors": [
"invalid account address"
]
}{
"errors": [
"invalid account address"
]
}{
"error": "market not found"
}Renvoie un
Payment XRPL non signé pour un pari donné, le compte du pool, le DestinationTag (le résultat) et le SourceTag (l’attribution de counsel), ainsi que projected_implied_odds_after : la ligne qui inclut votre propre mise, puisqu’une ligne parimutuelle évolue à chaque pari. Signez le tx avec votre propre wallet et soumettez-le au XRP Ledger. counsel ne détient jamais de clé.Paramètres de chemin
Market id.
Paramètres de requête
The bettor's XRPL classic address.
Outcome index (also the DestinationTag).
Stake in XRP.
Réponse
Unsigned bet Payment + projected odds
Unsigned XRPL Payment. Sign it with your own key and submit it.
Exemple:
2606220005
Exemple:
10
Show child attributes
Show child attributes
Show child attributes
Show child attributes