Fetch a single challenge by id
curl --request GET \
--url https://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/challenges/{id}import requests
url = "https://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/challenges/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/challenges/{id}', 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://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/challenges/{id}",
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://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/challenges/{id}"
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://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/challenges/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/challenges/{id}")
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": "<string>",
"marketSymbol": "<string>",
"conditionId": "<string>",
"oracleProposedOutcome": "<string>",
"challengerWallet": "<string>",
"bondAmount": "<string>",
"opensAt": "<string>",
"closesAt": "<string>",
"status": "PENDING",
"outcome": "<string>",
"rewardAmount": "<string>",
"txHash": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}Challenges
Fetch a single challenge by id
404 with code=challenge_not_found when the id does not exist on the given symbol.
GET
/
api
/
markets
/
{symbol}
/
challenges
/
{id}
Fetch a single challenge by id
curl --request GET \
--url https://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/challenges/{id}import requests
url = "https://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/challenges/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/challenges/{id}', 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://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/challenges/{id}",
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://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/challenges/{id}"
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://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/challenges/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/challenges/{id}")
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": "<string>",
"marketSymbol": "<string>",
"conditionId": "<string>",
"oracleProposedOutcome": "<string>",
"challengerWallet": "<string>",
"bondAmount": "<string>",
"opensAt": "<string>",
"closesAt": "<string>",
"status": "PENDING",
"outcome": "<string>",
"rewardAmount": "<string>",
"txHash": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>"
}Response
Outcome label of the proposal in force when the challenge was mined (the latest proposal or clear indexed strictly before the challenge event; e.g. YES, NO, a team name). A snapshot taken once when the challenge is indexed and never updated afterwards. Empty string ("") when that proposal was not indexed yet at that moment, when it was cleared before the challenge, or when the challenged proposal is a fair-price split with no single winning outcome.