DEV · local workspace

Forward delivery evidence

Megatron Markets exposes account-scoped evidence for an existing fixed-window capacity contract. These routes preserve the contract's four token legs and party roles; they do not activate or match a forward order.

Instrument term

A forward instrument fixes the commercial identity used by the order and position records:

  • model, provider endpoint, and service tier;
  • Prompt, Cache read, Cache write, and Output bundle weights;
  • MFT quantity and USD-per-MFT price;
  • tenor until the named window opens; and
  • duration of that window.

MFT is the accounting unit for forward quantity. It does not, by itself, prove that capacity was reserved, made available, or used, and it should not be described as a delivery entitlement.

Evidence routes

All routes require a signed-in session and selected desk. They act only on contracts already visible to that desk.

RouteObservable behavior
GET /api/v1/capacity/contractsCursor-pages contracts where the selected desk is the buyer or provider
GET /api/v1/capacity/contracts/{id}Reads the contract identity, delivery window, MFT quantity, four-leg entitlement, and selected-desk role
GET /api/v1/capacity/contracts/{id}/usageCursor-pages buyer-private Prompt, Cache read, Cache write, and Output usage records
POST /api/v1/capacity/contracts/{id}/usageRecords a buyer usage vector within the delivery window and remaining entitlement
GET /api/v1/capacity/contracts/{id}/fulfillmentsReads the provider's final self-attested report, or null before one exists
POST /api/v1/capacity/contracts/{id}/fulfillmentsRecords the provider's final self-attested report after the delivery window
GET /api/v1/capacity/contracts/{id}/reconciliationReads ordered, available, served, and consumed vectors plus final findings, or null before computation

The contract response identifies the selected desk as BUYER or PROVIDER. The buyer projection does not expose the provider's capacity-listing identity. Usage records are buyer-private; both contract parties can read the provider report and final findings. A buyer does not receive the provider's private report retry reference.

Contract and usage collections accept the standard limit and cursor parameters, default to 50 items, cap a page at 200, and return { items, next_cursor, total } with an exact total.

Role and replay rules

Evidence writes require a trading membership rather than a read-only membership.

  • Only the buyer desk can read and record usage. Each request supplies a non-empty, non-negative four-leg token vector and request_reference; a negative leg returns 422 before evidence is recorded, and cumulative usage cannot exceed entitlement.
  • Only the provider desk can record the one final fulfilment report. Its capacity_available and served values retain all four legs, and served quantity cannot exceed the provider-attested available quantity.
  • The first durable evidence write returns 201. An exact retry under the same reference returns the stored value with 200. Reusing that reference for different evidence on the same contract returns 409 idempotency-conflict. Reusing a provider report reference for another contract returns the privacy-safe 409 report-reference-conflict.
  • Usage outside the fixed window and a provider report before the window ends are refused.
  • A contract or record outside the selected desk's permitted view returns 404; a read-only membership cannot write and returns 403.

Provider availability, served quantity, latency, uptime, and breach detail are self-attested by that provider. The report is evidence attributed to the provider, not an independent verification by Megatron Markets.

Operational boundary

New forward instruments remain HALTED. The evidence routes do not admit or match forward orders and do not create a contract from a new fill. They expose records for an existing fixed-window contract.

The records compare contracted entitlement, provider-attested availability and service, and buyer usage. They do not calculate penalties, move payments, transfer or resell a contract, establish financial finality, or prove independent delivery verification.

No electricity-market gate time, conversion factor, provider substitution, reserve product, or service-period schedule should be inferred. Current instrument and order terms remain documented in Spot and forward instruments; the complete method and response map is in the API surface.