API ReferenceMarket Data
Execution price + fill breakdown over a client-supplied order book
const url = 'https://data.predictefy.com/api/example/getExecutionPriceDetailed';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"args":[{"bids":[{"price":0.61,"size":250}],"asks":[{"price":0.63,"size":180}]},"buy",100],"credentials":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://data.predictefy.com/api/example/getExecutionPriceDetailed \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "args": [ { "bids": [ { "price": 0.61, "size": 250 } ], "asks": [ { "price": 0.63, "size": 180 } ] }, "buy", 100 ], "credentials": {} }'Stateless calculator: like getExecutionPrice but returns the partial-fill detail { price, filledAmount, fullyFilled } instead of collapsing an unfillable order to 0, plus levels — the per-level breakdown (price, size taken, running size and cost) of the walk behind that VWAP. Does NOT fetch — every figure comes from the book in the body.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Positional tuple [orderBook, side, size].
Example
[ { "bids": [ { "price": 0.61, "size": 250 } ], "asks": [ { "price": 0.63, "size": 180 } ] }, "buy", 100]Accepted for backward compatibility but IGNORED (a pure calc needs no keys).
object
Responses
Section titled “Responses”Execution price with fill breakdown.
object
object
VWAP of the filled portion (probability 0..1).
Contracts/shares filled.
Predictefy extension: the per-level breakdown behind the VWAP, in consumption order. Empty when nothing filled.
One book level the fill walk consumed. Every figure is derived from the CALLER-SUPPLIED book in the request — nothing is fetched, modeled, or estimated.
object
The level's price, exactly as supplied.
How much of the requested size this level filled (<= the level's own size).
Running filled total through this level.
Running cost through this level (price x size, summed), 6dp.
Examplegenerated
{ "success": true, "data": { "price": 1, "filledAmount": 1, "fullyFilled": true, "levels": [ { "price": 1, "size": 1, "cumulativeSize": 1, "cumulativeCost": 1 } ] }}The request was rejected before any work was done — an invalid query, path, or body parameter, a malformed JSON body, or a parameter combination this route cannot honestly serve. Not retryable.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}UNAUTHORIZED — platform lane (READS_ENABLE_AUTH)
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}INSUFFICIENT_CREDITS — endpoint-weighted credits
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}SCOPE_MISSING — API key lacks the route's required scope (RBAC v1)
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}The route does not exist, or the requested venue, market, event, cluster, outcome, or snapshot was not found. error.code names which. Not retryable.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}RATE_LIMITED — per-key rps limit
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}Unexpected internal error. Retryable; error.requestId identifies the failure.
object
object
Always present on errors; quote this id when reporting a failed request.
Present only when a venue error is attributed to a specific exchange.
Example
{ "success": false, "error": { "code": "VALIDATION_ERROR" }}