Skip to content

Orchestrator API Reference ​

Base URL: https://api.sweepster.xyz

The orchestrator handles quote generation, intent submission, and status polling.


POST /quote ​

Request a sweep quote. This locks in the fee breakdown and returns the unsigned SweepOrder the user will sign.

Auth: None (rate-limited at 100 req/min per IP)

Rate limit: 100 requests per 60 seconds per IP

Request body ​

FieldTypeRequiredDescription
ownerstring (hex address)YesUser's wallet address (0x... 40 hex digits)
tokenInstring (hex address)YesSource token contract address
amountInstring (decimal)YesAmount in token's smallest unit, e.g. "1000000" for 1 USDC
tokenOutstring (hex address)YesDestination token contract address
destinationstring (hex address)YesRecipient address on destination chain
destChainIdnumber (integer)YesDestination chain ID (e.g. 42161 for Arbitrum)
tier"tier1" | "tier2" | "tier3"YesToken risk tier (caller's hint; orchestrator may adjust)
routestringNoRoute hint, e.g. "base->arbitrum" or "base->base"
subscriptionActivebooleanYesWhether the user has an active subscription (affects fee)
userIdstringYesUnique user identifier for fee policy
apiKeystringNoBuilder API key for off-chain attribution

Response 200 ​

json
{
  "quote": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "crossChain": true,
    "expiresAtMs": 1717340400000,
    "total": "8000000",
    "builderId": "bld_abc123"
  },
  "order": {
    "owner": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
    "tokenIn": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amountIn": "1000000",
    "feeAmount": "5000000",
    "builder": "0xBuilderAddress",
    "builderFee": "3000000",
    "tokenOut": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
    "minAmountOut": "0",
    "destination": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
    "swapTarget": "0xLIFIAddress",
    "swapCalldata": "0x...",
    "deadline": "1717340400",
    "nonce": "12345678",
    "destChainId": "42161"
  }
}

Notes:

  • All uint256 fields in order are decimal strings (bigint-safe JSON)
  • quote.total = feeAmount + builderFee as a decimal string
  • minAmountOut is "0" for cross-chain orders (slippage is in swapCalldata)
  • builderId is present only when builder attribution succeeded

Errors ​

StatusBodyCause
422{ "error": "..." }Invalid input or token declined by risk engine
429Rate limitToo many requests

POST /intents ​

Submit a signed quote. The orchestrator atomically creates an intent and broadcasts (or queues) the source transaction.

Auth: None (rate-limited)

Request body ​

FieldTypeRequiredDescription
quoteIdstringYesThe quote.id from POST /quote
signaturestring (hex bytes)YesThe EIP-712 signature from the user (0x...)

Response 201 ​

json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "submitted",
  "txHash": "0xabc..."
}
FieldTypeDescription
idstringIntent ID (same as quote ID)
statusIntentStatusCurrent status — usually "submitted"
txHashstring?Source tx hash (may be absent if not yet broadcast)

Errors ​

StatusBodyCause
400{ "error": "..." }Unknown quoteId, expired quote, duplicate submission
422{ "error": "..." }Invalid signature format
429Rate limitToo many requests

GET /intents/:id ​

Poll the status of a submitted intent.

Auth: None

Path param: id — the intent ID (from POST /intents response)

Response 200 ​

json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "delivered",
  "txHash": "0xabc...",
  "crossChain": true
}
FieldTypeDescription
idstringIntent ID
statusIntentStatusCurrent status
txHashstring?Source tx hash
crossChainbooleanWhether this is a cross-chain sweep

Intent status lifecycle ​

quoted → submitted → settled_source → delivered
                                    ↘ failed
StatusMeaning
quotedQuote created, not yet submitted
submittedSignature accepted; source tx broadcast
settled_sourceSource settlement confirmed; delivery in progress
deliveredDestination delivery confirmed
failedUnrecoverable failure

Errors ​

StatusBodyCause
404{ "error": "not found" }Unknown intent ID

Rate limits ​

Public endpoints (/quote, /intents, GET /intents/:id) are rate-limited at 100 requests per 60 seconds per IP address by default.

Rate limit responses return HTTP 429.

Non-custodial · Atomic · Audit + bug bounty planned before mainnet value.