Skip to main content
POST

Overview

Place a market order that the router splits across every routed venue offering the outcome identified by predexonId. Returns per-venue fills, an aggregate summary, and the routing decision. The router:
  1. Expands predexonId to the cross-venue equivalence set.
  2. Filters to venues the account has enabled, intersects with those the router is actively streaming.
  3. For buys — fans out balance reads and aborts if aggregate balance is below the requested notional. For sells — fans out position reads to cap each venue’s allocation by available size.
  4. Walks the merged fee-inclusive order books from best to worst effective price and computes a per-venue split.
  5. Dispatches per-venue orders in parallel.
  6. Collects every dispatch result (success or failure) and returns a unified response.
There is no cross-venue atomicity. One venue may fill while another fails, and both outcomes surface in fills[]. A 201 Created response may still contain per-venue failures — check summary.venuesFailed. See the Order Router concept page for an end-to-end explanation of how routing and splitting work.

Path Parameters

Request Body

Response Fields

Top level

Request correlation uses the x-request-id response header — the router echoes the header on every response. There is no _trace block in the body.

Fill entry

size, price, and amount are normalised to 6-decimal strings across every venue — partners parsing fills get consistent formatting regardless of which venue produced the fill.

Summary

_routing

Transparency block describing how the router made its allocation decision.

Status Codes & Errors

HTTP status is binary: 201 when at least one venue produced a fill, 502 when no venue filled. Partial vs. full success is a body-level distinction — read summary.venuesFailed.
  • summary.venuesFailed === 0full success. Every dispatched venue filled.
  • summary.venuesFailed > 0 with status 201partial success. Some venues filled, others failed. Inspect per-fill status and fills[].error to see which.
Every non-201 response carries a machine-readable errorCode alongside the human-readable error. On 502 all_venues_failed, the response is the full Place Order body (with fills[] and _routing) plus errorCode — diagnose per-venue failures from fills[].error and _routing.considered[].

Examples

Full success — market buy by notional

Both dispatched venues filled. summary.venuesFailed is 0. Request:
Response (201):
The x-request-id response header carries a request correlation identifier — propagate it when reporting issues so support can correlate your call with router-side logs.

Market sell by size

The router fans out position reads to each enabled venue, caps each venue’s allocation by the user’s position size there, and walks the merged bid-side book from best price down.

Partial success — still a 201

At least one venue filled, so the response is still 201. summary.venuesFailed is 1, and the failed venue returns an error string for diagnostics. errorCode is absent at the top level because at least one venue filled.

All venues failed (502)

A 502 with the full Place Order body. Use fills[].error to diagnose per-venue failures.
The router serializes concurrent requests per account to narrow (but not eliminate) the self-induced double-spend window on market buys. If two requests race from different machines, per-venue balance checks at the exec plane are the authoritative guard. Partners should still size concurrent order flow against aggregate balance.

Authorizations

x-api-key
string
header
required

Trading key provided by Predexon. The data key used by the Sports Discovery API on api.predexon.com is a separate credential.

Path Parameters

accountId
string
required

Account ID. Must belong to the calling API key.

Body

application/json
predexonId
string
required

Canonical predexon_id for the outcome. The router expands to every routed venue listing for that canonical outcome.

side
enum<string>
required
Available options:
buy,
sell
amount
string

USD/stablecoin notional to spend. Required when side is buy. Must not be set when side is sell. Must be a positive decimal string.

size
string

Number of shares to sell. Required when side is sell. Must not be set when side is buy. Must be a positive decimal string.

Response

At least one venue produced a fill. Full success when summary.venuesFailed === 0; partial success when > 0 — some venues filled, others failed, inspect per-fill status and fills[].error to see which.

routerOrderId
string
required

Unique identifier for this routed order (prefix rord-).

predexonId
string
required

Echoes the request predexonId.

side
enum<string>
required
Available options:
buy,
sell
type
enum<string>
required
Available options:
market
requestedAmount
string | null
required

Echo of the request amount. Present (as a stringified number) on buy orders; null on sell orders.

requestedSize
string | null
required

Echo of the request size. Present (as a stringified number) on sell orders; null on buy orders.

fills
object[]
required

One entry per venue that was dispatched. A single order can produce multiple fills. size, price, and amount are normalised to 6-decimal strings across every venue.

summary
object
required
_routing
object
required

Transparency block describing how the router made its allocation decision.

errorCode
enum<string>

Present only on a 502 response when every dispatched venue failed. Set to "all_venues_failed". Absent on a 201 success.

Available options:
all_venues_failed