Skip to content

Spec drift: myriad — GET /markets params expanded (sort enum, 7 new filters); GET /markets/{id} response has 14+ new fields #2004

Description

@realfishsam

Exchange

myriad

Drift Type

changed_params / changed_response

Severity

MEDIUM — new filterable fields and market metadata fields silently absent from normalized output

Their Docs

Source: https://docs.myriad.markets/builders/myriad-api-reference (spec version 2.0.4)

Changed params on GET /markets:

sort enum expanded — our spec stops at featured; live adds:

  • volume_notional
  • volume_notional_24h
  • in_play_starts_at

New filter params not in spec at all:

  • oracle_address — filter by oracle contract address
  • tags — tag filter (comma-separated)
  • exclude_tags — exclude tags
  • event_id — filter by event UUID
  • in_play_starts_at_gte / in_play_starts_at_lte — in-play start time range filters

trading_model param: our spec describes it as a free-form string with example "CLOB, AMM"; live enum values are amm | ob | all (values differ — ob not CLOB)

Changed params on existing user/market endpoints:

  • GET /markets/{id}/events — live adds trading_model and only_relevant params; spec is missing both
  • GET /users/{address}/events — live adds trading_model, token_address, only_relevant; spec missing all
  • GET /users/{address}/portfolio — live adds trading_model, status, exclude_history, keyword, sort, sort_by, group_by_event; spec has none
  • GET /users/{address}/markets — live adds market_slug, status, sort, sort_by, group_by_event, and fee-filter patterns; spec missing all

New response fields in MarketSummary / MarketDetail (GET /markets and GET /markets/{id}):

  • shortName — abbreviated market title
  • ctaName — call-to-action label
  • publishedAt — publication timestamp
  • volumeNotional / volumeNotional24h — notional volume figures
  • executionModeamm or ob for order book mode
  • tradingModelamm | ob | all
  • eventId — UUID linking market to parent event
  • outcomeIndex — integer index of this market's outcome within its event
  • negRisk — boolean for negative-risk NegRisk markets
  • scoreboard — object with { type, status, statusDetail, startsAt, clock, ... } for live/sports markets
  • externalSources[] — array of external data source references
  • oracle — object with { address, name, url, image_url, data }

New per-outcome fields in the outcomes array:

  • bestBid — current best bid price
  • bestAsk — current best ask price
  • tokenId — token contract address for this outcome

Our Cached Spec

core/specs/myriad/myriad.yaml (v2.0.2) — none of the above params or fields are present.

core/src/exchanges/myriad/api.ts — also missing; additionally has operationId collision: getMarkets is defined twice (bare /markets path and /markets/{id}), causing GET /markets list to be unreachable via callApi(). The fetcher works around this with hardcoded URL bypasses.

callApi() References at Risk

  • callApi('getMarkets', ...) at fetcher.ts:199, 229 — both calls use the parameterized GET /markets/{id} path (due to the collision); neither can reach the bare list endpoint via the spec. Not a new risk but an existing spec quality issue.

Hardcoded URL Bypasses

  • ${baseUrl}/markets at fetcher.ts:122, 138 — paginated market list; missing all new filter params in the call construction
  • ${baseUrl}/markets/${id} at fetcher.ts:306, 316 — response will include new fields (bestBid, bestAsk, tokenId per outcome, oracle, scoreboard, etc.) not reflected in normalizer types

Impact

New filter params allow efficient filtering by trading model, oracle, event, and tags — but can't be used since they're absent from the spec. New response fields (particularly executionMode, tradingModel, bestBid/bestAsk per outcome, and tokenId) could improve price/order book accuracy but are silently dropped by the normalizer.


Found by automated spec drift audit

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreCore sidecar/server logicspec-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