Skip to content

spec-drift: probable — GET /book missing min_order_size, tick_size, neg_risk fields (order constraint data) #2007

Description

@realfishsam

Exchange

probable (core/src/exchanges/probable/)

Spec file

core/specs/probable/probable.yaml

Summary

The live GET /public/api/v1/book response includes five top-level fields absent from the spec:

Field Type Significance
asset_id string token identifier for this book
timestamp string server-side timestamp of the snapshot
hash string book state hash
min_order_size string minimum valid order size for this market
tick_size string price tick increment for this market
neg_risk boolean whether this is a negatively-correlated risk market

The spec currently documents only { bids: array, asks: array, market: string } — the three newly-visible trading constraint fields are not captured in ProbableRawOrderBook.

Additionally, the bids and asks arrays are untyped in the spec. Live API returns elements shaped as { price: string, size: string } — the normalizer (normalizer.ts:59–64) already reads level.price and level.size with parseFloat, so the element shape is correct but undocumented.

Runtime impact

Order placement logic is missing CLOB constraints from the book response:

  • min_order_size — placing an order below this threshold will be rejected by the exchange; PMXT currently has no way to read or enforce this constraint
  • tick_size — prices not aligned to the tick increment are rejected; PMXT currently does not validate this
  • neg_risk — on a neg_risk: true market, outcome pricing is inverted relative to a standard market; any code computing implied probability from prices will produce wrong values if unaware of this flag

Action needed

  • Add asset_id, timestamp, hash, min_order_size, tick_size, neg_risk to the OrderBook schema in probable.yaml
  • Type bids[] and asks[] elements as { price: string, size: string } in the spec
  • Regenerate api.ts / ProbableRawOrderBook type
  • Evaluate whether order-placement code in core/src/exchanges/probable/index.ts should read min_order_size and tick_size from a book fetch before submitting orders
  • Evaluate neg_risk handling for any implied-probability computations

Metadata

Metadata

Assignees

No one assigned

    Labels

    spec-driftCached OpenAPI spec out of date vs venue's live docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions