{"openapi":"3.1.0","info":{"title":"Reiy Fisherman API","version":"0.1.0","description":"Execution coordinator API for Reiy solver discovery, auction orchestration, solution certificates, and settlement callbacks."},"servers":[{"url":"https://testnet-fisherman.reiy.finance","description":"Current deployment"}],"tags":[{"name":"System"},{"name":"Orderbook"},{"name":"Auctions"},{"name":"Certificates"},{"name":"Solvers"},{"name":"Indexer"}],"paths":{"/health":{"get":{"tags":["System"],"operationId":"getHealth","summary":"Read coordinator health","responses":{"200":{"description":"Coordinator identity and readiness.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/metrics":{"get":{"tags":["System"],"operationId":"getMetrics","summary":"Read Prometheus metrics","responses":{"200":{"description":"Prometheus text exposition.","content":{"text/plain":{"schema":{"type":"string"},"example":"# HELP reiy_fisherman_ready Fisherman coordinator readiness.\n# TYPE reiy_fisherman_ready gauge\nreiy_fisherman_ready 1\n"}}}}}},"/orderbook":{"get":{"tags":["Orderbook"],"operationId":"getOrderbook","summary":"List open intents grouped by pair and epoch","parameters":[{"name":"source","in":"query","required":false,"description":"Orderbook source.","schema":{"type":"string","enum":["local","indexer"]}},{"name":"limit","in":"query","required":false,"description":"Maximum intents to return.","schema":{"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"Current orderbook snapshot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderbookSnapshot"}}}},"400":{"description":"Invalid orderbook query.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Indexer gateway is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/auctions/active":{"get":{"tags":["Auctions"],"operationId":"listActiveAuctions","summary":"List active auction rounds","responses":{"200":{"description":"Active auction rounds.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuctionRound"}}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/auctions/{id}":{"get":{"tags":["Auctions"],"operationId":"getAuction","summary":"Read auction details","parameters":[{"name":"id","in":"path","required":true,"description":"Auction round id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Auction with intents, solutions, and certificate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuctionDetails"}}}},"404":{"description":"Auction not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/certificates/{id}":{"get":{"tags":["Certificates"],"operationId":"getCertificate","summary":"Read a solution certificate","parameters":[{"name":"id","in":"path","required":true,"description":"Certificate id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Certificate record, or null when missing.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Certificate"},{"type":"null"}]}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/events/stream":{"get":{"tags":["System"],"operationId":"streamDomainEvents","summary":"Stream Fisherman domain events as SSE","parameters":[{"name":"lastEventId","in":"query","required":false,"description":"Replay buffered events after this SSE event id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Server-sent domain event stream.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/indexer/sync":{"post":{"tags":["Indexer"],"operationId":"syncIndexer","summary":"Run one indexer sync pass","responses":{"200":{"description":"Updated event cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventCursor"}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/indexer/health":{"get":{"tags":["Indexer"],"operationId":"getIndexerHealth","summary":"Read upstream indexer health through Fisherman","responses":{"200":{"description":"Indexer health.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexerHealth"}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Indexer gateway is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/indexer/intents":{"get":{"tags":["Indexer"],"operationId":"listIndexedIntents","summary":"List intents from the upstream indexer","parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque pagination cursor.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Maximum items to return.","schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"descending","in":"query","required":false,"description":"Return newest records first.","schema":{"type":"boolean"}},{"name":"owner","in":"query","required":false,"description":"Owner address filter.","schema":{"type":"string"}},{"name":"targetEpoch","in":"query","required":false,"description":"Auction epoch filter.","schema":{"type":"string"}},{"name":"status","in":"query","required":false,"description":"Intent status filter.","schema":{"type":"string","enum":["open","cancelled","settled"]}}],"responses":{"200":{"description":"Indexed intent page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexedIntentPage"}}}},"400":{"description":"Invalid indexer query.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Indexer gateway is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/indexer/settlements":{"get":{"tags":["Indexer"],"operationId":"listIndexedSettlements","summary":"List settlements from the upstream indexer","parameters":[{"name":"cursor","in":"query","required":false,"description":"Opaque pagination cursor.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Maximum items to return.","schema":{"type":"integer","minimum":1,"maximum":500}},{"name":"descending","in":"query","required":false,"description":"Return newest records first.","schema":{"type":"boolean"}},{"name":"epoch","in":"query","required":false,"description":"Settlement epoch filter.","schema":{"type":"string"}},{"name":"solver","in":"query","required":false,"description":"Solver address filter.","schema":{"type":"string"}}],"responses":{"200":{"description":"Indexed settlement page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexedSettlementPage"}}}},"400":{"description":"Invalid indexer query.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Indexer gateway is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/indexer/state/{kind}":{"get":{"tags":["Indexer"],"operationId":"getIndexedState","summary":"Read an upstream indexed state snapshot","parameters":[{"name":"kind","in":"path","required":true,"description":"State kind: auction, global-config, or fee-vault.","schema":{"type":"string"}}],"responses":{"200":{"description":"Indexed state snapshot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexerStateSnapshot"}}}},"400":{"description":"Invalid state kind.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Indexer gateway is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/indexer/events/stream":{"get":{"tags":["Indexer"],"operationId":"streamIndexerEvents","summary":"Stream contract events from the upstream indexer as SSE","parameters":[{"name":"startFromId","in":"query","required":false,"description":"Redis stream id to resume from. Empty starts at the live tail.","schema":{"type":"string"}}],"responses":{"200":{"description":"Server-sent contract event stream.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Indexer gateway is not configured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/admin/retry/{auctionId}":{"post":{"tags":["Auctions"],"operationId":"retryAuction","summary":"Retry an expired or failed auction","parameters":[{"name":"auctionId","in":"path","required":true,"description":"Auction round id.","schema":{"type":"string"}}],"responses":{"200":{"description":"Retry result.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"description":"Auction not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/quote":{"post":{"tags":["Solvers"],"operationId":"requestQuote","summary":"Collect solver quotes and return the best quote","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"responses":{"200":{"description":"Aggregated solver quote results.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"400":{"description":"Invalid quote request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/solve":{"post":{"tags":["Auctions"],"operationId":"solveAuction","summary":"Solve a target auction, or the next eligible round","requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolveCommand"}}}},"responses":{"200":{"description":"Solve result.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Invalid solver response or command.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/reveal":{"post":{"tags":["Auctions"],"operationId":"revealAuction","summary":"Reveal auction details","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevealCommand"}}}},"responses":{"200":{"description":"Auction details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuctionDetails"}}}},"400":{"description":"auctionId is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Auction not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/settle":{"post":{"tags":["Certificates"],"operationId":"settleCertificate","summary":"Ask the winning solver to settle a certificate","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettleCommand"}}}},"responses":{"200":{"description":"Solver settlement result.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"certificateId is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Certificate not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/notify":{"post":{"tags":["Solvers"],"operationId":"notifySettlement","summary":"Record a solver settlement notification","requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyCommand"}}}},"responses":{"200":{"description":"Recorded settlement notification.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettlementRecord"}}}},"500":{"description":"Domain error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"Health":{"type":"object","required":["ok","service","role","coordinatorPublicKey","coordinatorKeyVersion"],"properties":{"ok":{"type":"boolean","example":true},"service":{"type":"string","example":"fisherman"},"role":{"type":"string","example":"Execution Coordinator"},"coordinatorPublicKey":{"type":"string","example":"0x1234"},"coordinatorKeyVersion":{"type":"string","example":"1"}}},"Intent":{"type":"object","required":["id","owner","sellType","buyType","sellAmount","minAmountOut","targetEpoch","deadlineMs","status","createdAt","updatedAt"],"properties":{"id":{"type":"string","description":"Onchain intent object id.","example":"0x0000000000000000000000000000000000000000000000000000000000000001"},"owner":{"type":"string","description":"Intent owner address.","example":"0x0000000000000000000000000000000000000000000000000000000000000001"},"sellType":{"type":"string","description":"Token sold by the user.","example":"0x2::sui::SUI"},"buyType":{"type":"string","description":"Token bought by the user.","example":"0x2::sui::SUI"},"sellAmount":{"type":"string","description":"Sell amount.","pattern":"^[0-9]+$","example":"1000000000"},"minAmountOut":{"type":"string","description":"Protected minimum output.","pattern":"^[0-9]+$","example":"1000000000"},"targetEpoch":{"type":"string","description":"Auction epoch.","pattern":"^[0-9]+$","example":"1000000000"},"deadlineMs":{"type":"string","description":"Unix deadline in milliseconds.","pattern":"^[0-9]+$","example":"1000000000"},"status":{"type":"string","enum":["open","cancelled","settled"]},"createdAt":{"type":"string","format":"date-time","example":"2026-06-08T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-06-08T00:00:00.000Z"}}},"OrderbookGroup":{"type":"object","required":["pairKey","sellType","buyType","targetEpoch","intents"],"properties":{"pairKey":{"type":"string","example":"0x2::sui::SUI|0x...::DBUSDC::DBUSDC|1"},"sellType":{"type":"string","description":"Sell token type.","example":"0x2::sui::SUI"},"buyType":{"type":"string","description":"Buy token type.","example":"0x2::sui::SUI"},"targetEpoch":{"type":"string","description":"Auction epoch.","pattern":"^[0-9]+$","example":"1000000000"},"intents":{"type":"array","items":{"$ref":"#/components/schemas/Intent"}}}},"OrderbookSnapshot":{"type":"object","required":["intents","groups"],"properties":{"intents":{"type":"array","items":{"$ref":"#/components/schemas/Intent"}},"groups":{"type":"array","items":{"$ref":"#/components/schemas/OrderbookGroup"}}}},"AuctionRound":{"type":"object","required":["id","pairKey","sellType","buyType","targetEpoch","deadlineMs","status","intentIds","createdAt","updatedAt"],"properties":{"id":{"type":"string","example":"auction-1"},"pairKey":{"type":"string"},"sellType":{"type":"string","description":"Sell token type.","example":"0x2::sui::SUI"},"buyType":{"type":"string","description":"Buy token type.","example":"0x2::sui::SUI"},"targetEpoch":{"type":"string","description":"Auction epoch.","pattern":"^[0-9]+$","example":"1000000000"},"deadlineMs":{"type":"string","description":"Unix deadline in milliseconds.","pattern":"^[0-9]+$","example":"1000000000"},"status":{"type":"string","enum":["collecting","solving","solved","settling","settled","expired","failed"]},"intentIds":{"type":"array","items":{"type":"string"}},"winnerSolutionId":{"type":"string"},"createdAt":{"type":"string","format":"date-time","example":"2026-06-08T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-06-08T00:00:00.000Z"}}},"FeeConfig":{"type":"object","required":["volumeFeePpm","correlatedFeePpm","surplusFeePpm","surplusCapPpm","maxTotalFeePpm","solverFeeSharePpm"],"properties":{"volumeFeePpm":{"type":"integer","minimum":0},"correlatedFeePpm":{"type":"integer","minimum":0},"surplusFeePpm":{"type":"integer","minimum":0},"surplusCapPpm":{"type":"integer","minimum":0},"maxTotalFeePpm":{"type":"integer","minimum":0},"solverFeeSharePpm":{"type":"integer","minimum":0}}},"SolveResponse":{"type":"object","required":["solver","solutionId","sellType","buyType","epoch","intentIds","fills","grossPayouts","protectedMins","score","expiresAtMs"],"properties":{"solver":{"type":"string","description":"Solver address.","example":"0x0000000000000000000000000000000000000000000000000000000000000001"},"solutionId":{"type":"string"},"sellType":{"type":"string","description":"Sell token type.","example":"0x2::sui::SUI"},"buyType":{"type":"string","description":"Buy token type.","example":"0x2::sui::SUI"},"epoch":{"type":"string","description":"Auction epoch.","pattern":"^[0-9]+$","example":"1000000000"},"intentIds":{"type":"array","items":{"type":"string"}},"fills":{"type":"array","items":{"type":"string","description":"Fill amount.","pattern":"^[0-9]+$","example":"1000000000"}},"grossPayouts":{"type":"array","items":{"type":"string","description":"Gross payout amount.","pattern":"^[0-9]+$","example":"1000000000"}},"protectedMins":{"type":"array","items":{"type":"string","description":"Protected minimum output.","pattern":"^[0-9]+$","example":"1000000000"}},"score":{"type":"string","description":"Solution score.","pattern":"^[0-9]+$","example":"1000000000"},"expiresAtMs":{"type":"string","description":"Unix expiry in milliseconds.","pattern":"^[0-9]+$","example":"1000000000"},"metadata":{"type":"object","additionalProperties":true}}},"SolverSolution":{"type":"object","required":["id","auctionId","solverEndpointId","response","score","status","createdAt"],"properties":{"id":{"type":"string"},"auctionId":{"type":"string"},"solverEndpointId":{"type":"string"},"response":{"$ref":"#/components/schemas/SolveResponse"},"score":{"type":"string","description":"Solution score.","pattern":"^[0-9]+$","example":"1000000000"},"status":{"type":"string","enum":["received","valid","invalid","winner","lost"]},"error":{"type":"string"},"createdAt":{"type":"string","format":"date-time","example":"2026-06-08T00:00:00.000Z"}}},"Certificate":{"type":"object","required":["id","auctionId","solutionId","solver","sellType","buyType","epoch","intentIds","fills","grossPayouts","protectedMins","expiresAtMs","signatureHex","messageBcsHex","status","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"auctionId":{"type":"string"},"solutionId":{"type":"string"},"solver":{"type":"string","description":"Solver address.","example":"0x0000000000000000000000000000000000000000000000000000000000000001"},"solverEndpointId":{"type":"string"},"sellType":{"type":"string","description":"Sell token type.","example":"0x2::sui::SUI"},"buyType":{"type":"string","description":"Buy token type.","example":"0x2::sui::SUI"},"epoch":{"type":"string","description":"Auction epoch.","pattern":"^[0-9]+$","example":"1000000000"},"intentIds":{"type":"array","items":{"type":"string"}},"fills":{"type":"array","items":{"type":"string","description":"Fill amount.","pattern":"^[0-9]+$","example":"1000000000"}},"grossPayouts":{"type":"array","items":{"type":"string","description":"Gross payout amount.","pattern":"^[0-9]+$","example":"1000000000"}},"protectedMins":{"type":"array","items":{"type":"string","description":"Protected minimum output.","pattern":"^[0-9]+$","example":"1000000000"}},"expiresAtMs":{"type":"string","description":"Unix expiry in milliseconds.","pattern":"^[0-9]+$","example":"1000000000"},"signatureHex":{"type":"string","example":"0xabcd"},"messageBcsHex":{"type":"string","example":"0xabcd"},"status":{"type":"string","enum":["issued","settling","settled","expired","reissued","failed"]},"createdAt":{"type":"string","format":"date-time","example":"2026-06-08T00:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-06-08T00:00:00.000Z"}}},"AuctionDetails":{"type":"object","required":["auction","intents","solutions"],"properties":{"auction":{"$ref":"#/components/schemas/AuctionRound"},"intents":{"type":"array","items":{"$ref":"#/components/schemas/Intent"}},"solutions":{"type":"array","items":{"$ref":"#/components/schemas/SolverSolution"}},"certificate":{"$ref":"#/components/schemas/Certificate"}}},"EventCursor":{"type":"object","required":["source","indexedEvents","updatedAt"],"properties":{"source":{"type":"string","example":"sui-events"},"txDigest":{"type":"string"},"eventSeq":{"type":"string"},"indexedEvents":{"type":"integer","minimum":0},"updatedAt":{"type":"string","format":"date-time","example":"2026-06-08T00:00:00.000Z"}}},"QuoteRequest":{"type":"object","required":["sellType","buyType","side","amount"],"properties":{"requestId":{"type":"string","description":"Optional idempotency/correlation id."},"sellType":{"type":"string","description":"Token sold by the user.","example":"0x2::sui::SUI"},"buyType":{"type":"string","description":"Token bought by the user.","example":"0x2::sui::SUI"},"side":{"type":"string","enum":["exactIn","exactOut"]},"amount":{"type":"string","description":"For exactIn this is sell amount; for exactOut this is target net buy amount.","pattern":"^[0-9]+$","example":"1000000000"},"targetEpoch":{"type":"string","description":"Optional auction epoch preference.","pattern":"^[0-9]+$","example":"1000000000"},"deadlineMs":{"type":"string","description":"Optional quote deadline in milliseconds.","pattern":"^[0-9]+$","example":"1000000000"},"partialFillAllowed":{"type":"boolean","default":true},"slippageBps":{"type":"string","description":"Optional slippage budget in basis points.","pattern":"^[0-9]+$","example":"1000000000"},"metadata":{"type":"object","additionalProperties":true}}},"SolverQuoteRequest":{"allOf":[{"$ref":"#/components/schemas/QuoteRequest"},{"type":"object","required":["requestId","network","requestedAtMs","partialFillAllowed","feeConfig"],"properties":{"requestId":{"type":"string"},"network":{"type":"string","example":"testnet"},"requestedAtMs":{"type":"string","description":"Unix request timestamp in milliseconds.","pattern":"^[0-9]+$","example":"1000000000"},"partialFillAllowed":{"type":"boolean"},"feeConfig":{"$ref":"#/components/schemas/FeeConfig"}}}]},"QuoteResult":{"type":"object","required":["solver","requestId","sellType","buyType","side","sellAmount","grossBuyAmount","estimatedFeeAmount","netBuyAmount","recommendedMinAmountOut","validUntilMs","confidence"],"properties":{"solver":{"type":"string","description":"Solver address or internal quote partner id.","example":"reiy-internal-deepbook"},"requestId":{"type":"string"},"sellType":{"type":"string","description":"Token sold by the user.","example":"0x2::sui::SUI"},"buyType":{"type":"string","description":"Token bought by the user.","example":"0x2::sui::SUI"},"side":{"type":"string","enum":["exactIn","exactOut"]},"sellAmount":{"type":"string","description":"Amount the user sells.","pattern":"^[0-9]+$","example":"1000000000"},"grossBuyAmount":{"type":"string","description":"Buy amount before protocol fees.","pattern":"^[0-9]+$","example":"1000000000"},"estimatedFeeAmount":{"type":"string","description":"Estimated protocol fee charged from gross buy amount.","pattern":"^[0-9]+$","example":"1000000000"},"netBuyAmount":{"type":"string","description":"Estimated user buy amount after fees.","pattern":"^[0-9]+$","example":"1000000000"},"recommendedMinAmountOut":{"type":"string","description":"Solver-recommended protected minimum output.","pattern":"^[0-9]+$","example":"1000000000"},"priceE9":{"type":"string","description":"Indicative price scaled by 1e9.","pattern":"^[0-9]+$","example":"1000000000"},"validUntilMs":{"type":"string","description":"Unix quote expiry in milliseconds.","pattern":"^[0-9]+$","example":"1000000000"},"confidence":{"type":"string","enum":["indicative","firm"]},"route":{"type":"object","additionalProperties":true,"description":"Execution route metadata. Internal DeepBook quotes use kind=deepbook and feeMode=input-token."},"metadata":{"type":"object","additionalProperties":true}}},"SolverQuoteResult":{"type":"object","required":["solverEndpointId","status","latencyMs"],"properties":{"solverEndpointId":{"type":"string"},"status":{"type":"string","enum":["valid","invalid","failed"]},"latencyMs":{"type":"string","description":"Observed solver response latency in milliseconds.","pattern":"^[0-9]+$","example":"1000000000"},"rank":{"type":"integer","minimum":1},"quote":{"$ref":"#/components/schemas/QuoteResult"},"error":{"type":"string"}}},"QuoteResponse":{"type":"object","required":["request","bestQuote","quotes"],"properties":{"request":{"$ref":"#/components/schemas/SolverQuoteRequest"},"bestQuote":{"oneOf":[{"$ref":"#/components/schemas/SolverQuoteResult"},{"type":"null"}]},"quotes":{"type":"array","items":{"$ref":"#/components/schemas/SolverQuoteResult"}}}},"SolveCommand":{"type":"object","properties":{"auctionId":{"type":"string","description":"When omitted, Fisherman solves the next eligible auction."}}},"RevealCommand":{"type":"object","required":["auctionId"],"properties":{"auctionId":{"type":"string"}}},"SettleCommand":{"type":"object","required":["certificateId"],"properties":{"certificateId":{"type":"string"}}},"NotifyCommand":{"type":"object","properties":{"auctionId":{"type":"string"},"certificateId":{"type":"string"},"solver":{"type":"string"},"kind":{"type":"string","example":"settled"},"txDigest":{"type":"string"}},"additionalProperties":true},"SettlementRecord":{"type":"object","required":["id","auctionId","status","createdAt"],"properties":{"id":{"type":"string"},"auctionId":{"type":"string"},"certificateId":{"type":"string"},"solver":{"type":"string"},"status":{"type":"string"},"txDigest":{"type":"string"},"raw":{},"createdAt":{"type":"string","format":"date-time","example":"2026-06-08T00:00:00.000Z"}}},"IndexerHealth":{"type":"object","required":["buildVersion","uptimeSeconds","dbOk","redisOk","packageId","network"],"properties":{"buildVersion":{"type":"string","example":"0.1.0"},"uptimeSeconds":{"type":"string","description":"Indexer process uptime.","pattern":"^[0-9]+$","example":"1000000000"},"dbOk":{"type":"boolean"},"redisOk":{"type":"boolean"},"packageId":{"type":"string","description":"Indexed Reiy package id.","example":"0x0000000000000000000000000000000000000000000000000000000000000001"},"network":{"type":"string","example":"testnet"}}},"IndexerPageInfo":{"type":"object","required":["hasNextPage"],"properties":{"hasNextPage":{"type":"boolean"},"nextCursor":{"type":"string"}}},"IndexedIntent":{"type":"object","required":["id","owner","sellType","buyType","sellAmount","minAmountOut","originalMinAmountOut","sbboFloor","sbboMidPrice","slippageToleranceBps","partialFillable","targetEpoch","deadlineMs","submitTimestampMs","checkpointSeq","status","updatedCheckpointSeq"],"properties":{"id":{"type":"string","description":"Intent object id.","example":"0x0000000000000000000000000000000000000000000000000000000000000001"},"owner":{"type":"string","description":"Intent owner address.","example":"0x0000000000000000000000000000000000000000000000000000000000000001"},"sellType":{"type":"string","description":"Sell token type.","example":"0x2::sui::SUI"},"buyType":{"type":"string","description":"Buy token type.","example":"0x2::sui::SUI"},"sellAmount":{"type":"string","description":"Sell amount.","pattern":"^[0-9]+$","example":"1000000000"},"minAmountOut":{"type":"string","description":"Current protected minimum output.","pattern":"^[0-9]+$","example":"1000000000"},"originalMinAmountOut":{"type":"string","description":"Original protected minimum output.","pattern":"^[0-9]+$","example":"1000000000"},"sbboFloor":{"type":"string","description":"SBBO floor at submit time.","pattern":"^[0-9]+$","example":"1000000000"},"sbboMidPrice":{"type":"string","description":"SBBO mid price at submit time.","pattern":"^[0-9]+$","example":"1000000000"},"slippageToleranceBps":{"type":"string","description":"Submit-time slippage tolerance.","pattern":"^[0-9]+$","example":"1000000000"},"partialFillable":{"type":"boolean"},"targetEpoch":{"type":"string","description":"Auction epoch.","pattern":"^[0-9]+$","example":"1000000000"},"deadlineMs":{"type":"string","description":"Unix deadline in milliseconds.","pattern":"^[0-9]+$","example":"1000000000"},"submitTimestampMs":{"type":"string","description":"Unix submit timestamp in milliseconds.","pattern":"^[0-9]+$","example":"1000000000"},"checkpointSeq":{"type":"string","description":"Indexed checkpoint sequence.","pattern":"^[0-9]+$","example":"1000000000"},"status":{"type":"string","enum":["open","cancelled","settled"]},"updatedCheckpointSeq":{"type":"string","description":"Last checkpoint that updated this projection.","pattern":"^[0-9]+$","example":"1000000000"},"closeCheckpointSeq":{"type":"string","description":"Checkpoint that closed the intent.","pattern":"^[0-9]+$","example":"1000000000"},"closeTxDigest":{"type":"string"},"closeTsMs":{"type":"string","description":"Close timestamp in milliseconds.","pattern":"^[0-9]+$","example":"1000000000"}}},"IndexedIntentPage":{"type":"object","required":["source","items","page"],"properties":{"source":{"type":"string","enum":["indexer"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/IndexedIntent"}},"page":{"$ref":"#/components/schemas/IndexerPageInfo"}}},"IndexedSettlement":{"type":"object","required":["epoch","intentId","solver","sellAmount","buyAmount","rawSurplus","scoreValue","settlementType","checkpointSeq","txDigest","tsMs"],"properties":{"epoch":{"type":"string","description":"Settlement epoch.","pattern":"^[0-9]+$","example":"1000000000"},"intentId":{"type":"string","description":"Intent id.","example":"0x0000000000000000000000000000000000000000000000000000000000000001"},"solver":{"type":"string","description":"Solver address.","example":"0x0000000000000000000000000000000000000000000000000000000000000001"},"sellAmount":{"type":"string","description":"Sell amount.","pattern":"^[0-9]+$","example":"1000000000"},"buyAmount":{"type":"string","description":"Buy amount.","pattern":"^[0-9]+$","example":"1000000000"},"rawSurplus":{"type":"string","description":"Raw surplus.","pattern":"^[0-9]+$","example":"1000000000"},"scoreValue":{"type":"string","description":"Settlement score.","pattern":"^[0-9]+$","example":"1000000000"},"settlementType":{"type":"integer"},"checkpointSeq":{"type":"string","description":"Indexed checkpoint sequence.","pattern":"^[0-9]+$","example":"1000000000"},"txDigest":{"type":"string"},"tsMs":{"type":"string","description":"Indexed timestamp in milliseconds.","pattern":"^[0-9]+$","example":"1000000000"}}},"IndexedSettlementPage":{"type":"object","required":["source","items","page"],"properties":{"source":{"type":"string","enum":["indexer"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/IndexedSettlement"}},"page":{"$ref":"#/components/schemas/IndexerPageInfo"}}},"IndexerStateSnapshot":{"type":"object","required":["present","payload","payloadJson"],"properties":{"present":{"type":"boolean"},"payload":{},"payloadJson":{"type":"string"}}},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","example":"http.badRequest"},"message":{"type":"string","example":"certificateId is required"}}}}}}}}