Swap API

Intent Solver settle#

POST /settle#

  • The winning solver executes the previously solved auction on-chain.
  • The auction to be executed is identified by its ID, which is returned by the solver's /solve endpoint.

Notes:

  • Once a solver accepts a /settle request, it commits to executing the solution on-chain within the required number of blocks.
POST /settle
Content-Type: application/json

Request Parameters (SettleRequest)

ParameterTypeRequiredDescriptionExample
chainIndexStringYesChain ID1
auctionIdStringYesAuction ID123
submissionDeadlineLatestBlockStringYesThe latest block height by which the solution transaction must be included in a block.12345678
settleInfosArray<SettleInfo>YesContains multiple IDs: the Solution ID (returned by the /solve endpoint) and the Settle ID (emitted via a contract event for business correlation).
> solutionIdStringYesSolution ID (returned by the /solve endpoint)1
> settleIdStringYesSettle ID (emitted via a contract event for business correlation)456

POST /settle Request Example:

json
{
  "chainIndex": "1",
  "auctionId": "16911293074615936",
  "settleInfos": [
    {
      "settleId": "16911293081366144",
      "solutionId": "1"
    }
  ],
  "submissionDeadlineLatestBlock": "24596909"
}

POST /settle Response Example:

json
{
  "code": 0,
  "msg": "success",
  "error_code": "0",
  "error_message": "",
  "detailMsg": ""
}