Skip to content

feat: establish authoritative market data and safe order execution - #979

Merged
IbrahimIjai merged 1 commit into
SO4-Markets:mainfrom
Johnsmichael150:main
Oct 16, 2026
Merged

IbrahimIjai merged 1 commit into
SO4-Markets:mainfrom
Johnsmichael150:main

Conversation

@Johnsmichael150

Copy link
Copy Markdown

Summary

This PR establishes the market-data foundation for SO4 trading, including authoritative feed specifications, typed adapters, verified order submission/cancellation, and exact price and quantity normalization.

Changes

Authoritative Market Data (#693)

  • Document feed source, venue identity, snapshot/delta formats, ordering, heartbeats, precision, and timestamps
  • Define polling and resynchronization behavior
  • Include captured upstream examples to establish executable depth and trade semantics
  • Record unavailable upstream APIs as explicit blockers

Typed Feed Adapters (#694)

  • Implement runtime-validated adapters for snapshots and trade feeds
  • Preserve source identity, decimal strings, sequence metadata, and timestamps
  • Handle empty, malformed, wrong-market, and unsupported-version payloads
  • Prevent invalid responses from silently replacing valid order-book data

Order Submission and Cancellation (#695)

  • Integrate the bounded submit/cancel gateway with the selected venue
  • Verify signing, network, order identity, acceptance, execution, and settlement semantics
  • Test resting-order acceptance followed by authoritative cancellation or fill
  • Keep the issue blocked if the required matching or settlement deployment is unavailable

Exact Price and Size Normalization (#696)

  • Add precision-safe parsing, comparison, and normalization
  • Validate price ticks and quantity increments
  • Support differing token decimal precisions and large values
  • Reject invalid amounts or apply an explicitly documented rounding policy
  • Prevent silent changes to signed order amounts

Testing and Verification

  • Add deterministic MSW fixtures for valid, empty, stale, malformed, and wrong-market responses
  • Test snapshot/delta handling and resynchronization
  • Verify order submission and cancellation against a real test deployment
  • Test decimal boundaries, tick sizes, lot sizes, and large notionals
  • Run relevant unit, integration, and regression checks
  • Follow AGENTS.md and the required commit and clean-room verification gates

Scope

Changes are limited to market-data contracts and adapters, venue integration, and trading-math normalization. Preserve existing design tokens, toast implementation, and verified perpetuals capabilities.

No fabricated executable liquidity, UI fixtures presented as real depth, or unverified execution claims.

Issues Closed

Closes #693
Closes #694
Closes #695
Closes #696

Add comprehensive documentation specifying the exact evidence,
API specifications, and test fixtures required from the protocol
team to unblock OB-041, OB-042, OB-043, and OB-044.

This document details:
- Required API specifications for depth/trade feeds (OB-041)
- Schema and fixture requirements for adapters (OB-042)
- Test environment and submission/cancellation evidence (OB-043)
- Precision and normalization rules (OB-044)

Current blocker: SO4 uses keeper venue over pool liquidity,
not a native price-time matching book. Protocol team must
provide venue design, API endpoints, and real captured examples
before implementation can proceed.
@drips-wave

drips-wave Bot commented Oct 16, 2026

Copy link
Copy Markdown

@Johnsmichael150 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@vercel

vercel Bot commented Oct 16, 2026

Copy link
Copy Markdown

@johnsmccain is attempting to deploy a commit to the Ijai's projects Team on Vercel.

A member of the Team first needs to authorize it.

@IbrahimIjai
IbrahimIjai merged commit 4e7d872 into SO4-Markets:main Oct 16, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants