{"openapi":"3.1.0","info":{"title":"ValeMarket Community API","version":"2.0.0","description":"Privacy-preserving Spirit Vale market observations. Public reads require corroboration or a trusted contributor and a configurable publication delay. Seller, buyer, account, character, shop, and raw payload data are never accepted."},"servers":[{"url":"https://market-api.spiritvalers.com"}],"paths":{"/health":{"get":{"summary":"Service health","responses":{"200":{"description":"Worker is running"}}}},"/v2/installations":{"post":{"summary":"Create an anonymous contributor installation token","responses":{"201":{"description":"Installation token created"},"429":{"description":"Rate limit exceeded"},"503":{"description":"Ingestion disabled"}}}},"/v2/observations":{"post":{"summary":"Submit a bounded market observation batch","security":[{"installationToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"./observation-batch.schema.json"}}}},"responses":{"202":{"description":"Batch queued or already accepted"},"400":{"description":"Invalid batch or canonical payload hash"},"401":{"description":"Invalid contributor token"},"403":{"description":"Contributor disabled or quarantined"},"409":{"description":"Batch identifier conflict"},"413":{"description":"Request exceeds 256 KB"},"422":{"description":"Game build disabled by runtime policy"},"429":{"description":"Rate limit exceeded"},"503":{"description":"Ingestion disabled"}}}},"/v2/markets/{marketId}/listings":{"get":{"summary":"List current confirmed market observations","parameters":[{"$ref":"#/components/parameters/marketId"},{"$ref":"#/components/parameters/snapshot"},{"$ref":"#/components/parameters/minPrice"},{"$ref":"#/components/parameters/maxPrice"},{"$ref":"#/components/parameters/stat"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/limit"}],"responses":{"200":{"description":"Confirmed, fresh listings"},"304":{"description":"ETag matched"},"400":{"description":"Invalid query"},"503":{"description":"Reads disabled"}}}},"/v2/markets/{marketId}/items/{itemType}/{itemId}":{"get":{"summary":"List confirmed observations for one item","parameters":[{"$ref":"#/components/parameters/marketId"},{"$ref":"#/components/parameters/snapshot"},{"$ref":"#/components/parameters/itemType"},{"$ref":"#/components/parameters/itemId"},{"$ref":"#/components/parameters/minPrice"},{"$ref":"#/components/parameters/maxPrice"},{"$ref":"#/components/parameters/stat"},{"$ref":"#/components/parameters/sort"},{"$ref":"#/components/parameters/offset"},{"$ref":"#/components/parameters/limit"}],"responses":{"200":{"description":"Confirmed, fresh item listings"}}}},"/v2/markets/{marketId}/items/{itemType}/{itemId}/history":{"get":{"summary":"Read confirmed observation history for one item","parameters":[{"$ref":"#/components/parameters/marketId"},{"$ref":"#/components/parameters/itemType"},{"$ref":"#/components/parameters/itemId"}],"responses":{"200":{"description":"Confirmed history, capped at 100 rows"}}}}},"components":{"securitySchemes":{"installationToken":{"type":"http","scheme":"bearer","bearerFormat":"opaque installation token"}},"parameters":{"marketId":{"name":"marketId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,64}$"}},"itemType":{"name":"itemType","in":"path","required":true,"schema":{"type":"integer","minimum":0,"maximum":65535}},"itemId":{"name":"itemId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}},"snapshot":{"name":"snapshot","in":"query","description":"Public response contract version used to isolate browser caches.","schema":{"type":"string","enum":["2"]}},"minPrice":{"name":"minPrice","in":"query","schema":{"type":"integer","minimum":0,"maximum":9007199254740991}},"maxPrice":{"name":"maxPrice","in":"query","schema":{"type":"integer","minimum":0,"maximum":9007199254740991}},"stat":{"name":"stat","in":"query","schema":{"type":"string","minLength":1,"maxLength":128}},"sort":{"name":"sort","in":"query","schema":{"enum":["price-asc","price-desc"],"default":"price-asc"}},"offset":{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":100000,"default":0}},"limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}}}}