Skip to main content
This is the buyer side of Stream: how a discovers a , purchases access, and downloads it. Producers don’t call these routes — the Edge Agent and the stream SDK wrap the producer side. The marketplace runs on the peaqOS orchestration backend, base path /api/v1.
Rolling out. The marketplace API is still being deployed — the /api/v1/stream/* endpoints below may not be live on the production backend yet. Settlement is off-chain today. Recording a payment stores a self-reported reference and marks the order paid — there is no escrow or on-chain verification yet. On-chain settlement is part of the omnichain rollout. Treat the marketplace API as beta: request and response shapes may still change.

The buyer journey

1

Discover

Browse active listings (GET /stream/listings, filter by machine or storage) and fetch detail (GET /stream/listings/:listingId). A listing exposes the dataset’s machine identity, topic, time range, chunk count, storage type, and price — never plaintext.
2

Verify before buying

Fetch the chunk and verify the machine’s Ed25519 signatures and that chunk hashes match the dataset’s . The trust model is in Data streams.
3

Order

Create an order (POST /stream/orders) with the listingId, your buyerId, and your 32-byte X25519 buyerPublicKeyHex — the key your access grant will be wrapped to. Optionally select a chunk subset. The order starts payment_pending.
4

Pay

Record payment (POST /stream/orders/:orderId/payment) with your payment reference. The order moves to paid. (See the settlement caveat above.)
5

Get access and delivery

Fetch delivery (GET /stream/orders/:orderId/delivery?buyerId=...). Once the seller’s agent has prepared access, this returns your — the purchased keys re-wrapped to your public key — plus a delivery descriptor (a local delivery URL, or a walrus:// / s3:// / gdrive:// storage reference).
6

Download and decrypt

Download the encrypted chunks, unwrap each chunk key with your X25519 private key, and decrypt chunk by chunk (XChaCha20-Poly1305). You only ever receive keys for the chunks you bought.

Buyer endpoints

MethodPathPurpose
GET/stream/listingsDiscover active listings (filter by machineId, storageProvider).
GET/stream/listings/:listingIdListing detail.
POST/stream/ordersCreate an order; binds your buyerId + buyerPublicKeyHex.
GET/stream/orders/:orderIdOrder status (payment_pending → paid → access_ready / delivery_ready → completed, or cancelled).
POST/stream/orders/:orderId/paymentRecord payment (self-reported reference; see caveat).
GET/stream/orders/:orderId/deliveryFetch the access grant + delivery descriptor.
Listings also surface in the Machine Markets catalogue as data.stream services (skill stream-data-listing), so an can reach the same datasets through the Machine Markets order flow.

Authentication

TierWhoHow
PlatformEvery /api/v1 callx-api-key (or Authorization: Bearer).
BuyerContext ProviderPlatform key, plus a per-order buyerId / buyerPublicKeyHex match.
AgentProducerPer-agent token in the request body — see the Edge Agent.

Producing data

This page is the buyer side. To sell data, run the Stream Edge Agent or use the stream SDK — they sign, encrypt, chunk, list, and fulfil orders for you.