API
This document describes the HTTP endpoints supported by the Market 2.0 module in Curio. These endpoints are used by clients and external systems to submit storage deals, upload data, track status, and fetch provider configuration.
π Base Path
All endpoints are exposed under:
/market/mk20π POST /store
/storeSubmit a new MK20 deal to the storage provider.
Content-Type:
application/jsonBody: JSON-encoded Deal
Query Parameters: None
β
Response
200 OKβ Deal accepted successfully400 Bad Requestβ Malformed JSON or missing required fields422 Unprocessable Entityβ Unsupported product or data source426β Deal rejected by contract430β Malformed data source441β Deal duration too short
π§ͺ Example
π§Ύ GET /status
/statusRetrieve the current processing status of a deal.
Query Parameters:
id: ULID of the deal
β
Response
200 OK: Returns JSON-encoded status400 Bad Request: Missing or malformedid404 Not Found: No such deal500 Internal Server Error: Unexpected backend error
π Response Schema
π PUT /data
/dataUpload raw deal data for deals that declared a source_httpput source.
Headers:
Content-Type: application/octet-streamContent-Length: must match declared raw size
Query Parameters:
id: ULID of the deal
Body: Raw byte stream
β
Response
200 OK: Data accepted400 Bad Request: Invalid/missing content headers413 Payload Too Large: Content exceeds allowed size415 Unsupported Media Type: Incorrect content type
π GET /contracts
/contractsReturn a list of smart contract addresses currently whitelisted by the provider.
β
Response
200 OK: List of contracts500 Internal Server Error: Failure fetching contract list
π§ GET /info
/infoReturns markdown-formatted documentation describing:
Supported deal structure
Data source formats
Product extensions
β
Response
200 OK: Markdown string500 Internal Server Error: If the info file cannot be generated
π§° GET /products
/productsFetch a JSON list of supported deal products enabled on this provider.
Content-Type: N/A
Body: N/A
Query Parameters: N/A
β
Response
200 OK: JSON array of enabled products500 Internal Server Error: If the list cannot be fetched
π§ͺ Example Response
π GET /sources
/sourcesFetch a JSON list of supported data source types enabled on this provider.
Content-Type: N/A
Body: N/A
Query Parameters: N/A
β
Response
200 OK: JSON array of enabled data sources500 Internal Server Error: If the list cannot be fetched
π§ͺ Example Response
π Error Code Summary
200
Success
400
Bad proposal or malformed JSON
422
Unsupported product or data source
426
Deal rejected by contract
430
Malformed data source
441
Duration too short
500
Internal server error
π§© Status Code Values (from /status)
/status)accepted
Deal was accepted and is waiting for processing
processing
Deal is being staged or fetched
sealing
Deal is being sealed into a sector
indexing
Deal is being indexed for CID-based retrievals
complete
Deal has been sealed and is finalized
failed
Deal failed at any point in the pipeline
For full type schemas, see the /info endpoint or consult the documentation.
Last updated