v1

latestOpenAPI 3.0.32026-07-26184851.6 MB
Auto Settlements

Master Wallet Create Rule

This endpoint allows you to create a new auto-settlement rule for a specific wallet. By providing the necessary parameters in the request body, you can define the conditions and actions for the auto-settlement process.

Request Body Parameters

ParameterTypeRequiredDescription
typestringNoThe settlement rule type: withdraw, swap, gateway, or earn. Recommended on every create; rules saved without it keep the legacy inferred behavior. withdraw settles each deposited source asset as-is to destination.address on the source blockchain (address required).
namestringYesThe name of the auto-settlement rule. A descriptive title reflecting its purpose.
orderstringYesThe order in which this rule should be processed. Possible values: FASTEST, CHEAPEST, RECOMMENDED, NO_SLIPPAGE.
slippageTolerancestringYesThe acceptable slippage tolerance (as a percentage). Example: "5" = 5% tolerance.
isGatewaybooleanYesIndicates whether the rule involves a gateway. true if processed through a gateway.
sourceobjectYesDetails about the source of the settlement.
├─ assetsarray of stringsYesList of asset types involved (e.g., ["USDC"]).
├─ minAmountstringYesThe minimum amount required for settlement (e.g., "1").
├─ maxAmountstringYesThe maximum amount that can be settled (e.g., "1000").
destinationobjectYesDetails about the destination of the settlement.
├─ blockchainstringNoThe blockchain network for the destination.
├─ assetstringNoThe asset type to which the settlement is directed.
├─ addressstringNoThe address where the settlement will be sent.
post/v1/wallets/{walletId}/auto-settlements/rules

Request body

type'withdraw' | 'swap' | 'gateway' | 'earn'

Settlement rule type. Recommended on every create; rules saved without it keep the legacy inferred behavior.

destinationobject
isActiveboolean
isGatewayboolean
namestring
orderstring
slippageTolerancestring

Example request

{
  "type": "swap",
  "isActive": true,
  "isGateway": true,
  "name": "Swap from USDC to Gateway",
  "order": "FASTEST",
  "slippageTolerance": "5",
  "source": {
    "assets": [
      "USDC"
    ],
    "maxAmount": "1000",
    "minAmount": "1"
  }
}

Response

Regular 200 / Gateway 200

messagestring
statusCodenumber

Example response

{
  "data": {
    "destination": {
      "address": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22",
      "asset": "USDC",
      "blockchain": "optimism"
    },
    "id": "f2030948-fdb4-4d55-aba6-1e784ddb2e00",
    "isActive": true,
    "isGateway": true,
    "name": "Swap from USDC to Optimism USDC",
    "order": "FASTEST",
    "slippageTolerance": "5",
    "source": {
      "assets": [
        "USDC",
        "USDT"
      ],
      "blockchain": "base",
      "maxAmount": "1000",
      "minAmount": "1"
    }
  },
  "message": "Auto settlement rule created successfully",
  "statusCode": 201
}