curl --request GET \
--url https://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/executable-priceimport requests
url = "https://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/executable-price"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/executable-price', 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}/executable-price",
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}/executable-price"
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}/executable-price")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/executable-price")
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{
"executableQty": "<string>",
"totalCost": "<string>",
"avgPrice": "<string>",
"levelsConsumed": [
{
"price": "<string>",
"quantity": "<string>"
}
],
"bookEmpty": true,
"capped": true,
"tradable": true
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}Indicative executable price for a size
Walks the visible book for one outcome: a BUY takes the asks from the lowest price up, a SELL takes the bids from the highest price down, until size is filled or the next level is beyond limitPrice. Only the first 100 levels of the side are walked: a size beyond that depth reports the quantity within them with capped: true, while a size beyond a shallower book reports the whole book with capped: false. Indicative only: the book can change before an order is placed, and tradable is false on a market that is not OPEN or while trading on its contract generation is halted. The walk is exact over the levels as /orderbook serves them (quantities on 8 decimal places), not over the matcher’s raw depth. A market the matcher does not run answers an empty book (bookEmpty: true); a matcher that cannot be read answers 503 orderbook_unavailable. Refusals: 400 invalid_side, 400 invalid_size, 400 invalid_limit_price, 400 invalid_outcome, 400 outcome_required, 404 market_not_found. Cache-Control: no-store.
curl --request GET \
--url https://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/executable-priceimport requests
url = "https://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/executable-price"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/executable-price', 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}/executable-price",
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}/executable-price"
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}/executable-price")
.asString();require 'uri'
require 'net/http'
url = URI("https://core.api.dev.predictstreet.sde.adifoundation.ai/api/markets/{symbol}/executable-price")
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{
"executableQty": "<string>",
"totalCost": "<string>",
"avgPrice": "<string>",
"levelsConsumed": [
{
"price": "<string>",
"quantity": "<string>"
}
],
"bookEmpty": true,
"capped": true,
"tradable": true
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}{
"status": 400,
"error": {
"code": "bad_request",
"message": "<string>",
"trace_id": "<string>",
"retryAfterSec": 123,
"retryable": true,
"details": {}
}
}Path Parameters
Query Parameters
Outcome index, digits only, as on /orderbook: anything else, or an index the market does not have, answers 400 invalid_outcome. Required on a market of more than two outcomes (400 outcome_required when omitted); on a two-outcome (binary) market an omitted outcome means 0.
x >= 0Response
OK
True when size outlasted every level walked and the read of that side was cut (at its 100-level cap, or otherwise truncated), so deeper levels may exist within the limit price and more may be executable than executableQty. False when the size was filled, the limit price stopped the walk, the limit price is at or before the last price the cut read returned, the side holds no more levels (book exhausted), or the side has no levels at all (bookEmpty: the two are never both true).
True when the market is OPEN and trading on its contract generation is not halted, so an order can take the price now. False on any other status (PRE_MARKET, PAUSED, SUSPENDED, CLOSED, PENDING_RESOLUTION …) or while the market's contract generation is halted: the walk still reports the resting levels, but no order can take them (PRE_MARKET accepts only resting LIMIT GTC orders). The status can lag a status change by a few seconds.