Skip to main content
POST

Authorizations

x-api-key
string
header
required

Path Parameters

walletId
string
required
Example:

"{{walletId}}"

Body

application/json
destination
object
required
source
object
required
type
enum<string>

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

Available options:
withdraw,
swap,
gateway,
earn
Example:

"swap"

isActive
boolean
Example:

true

isGateway
boolean

Route the settlement through Circle's Gateway. Required to be true when type is gateway.

Example:

true

isReward
boolean

Settle into an Earn position. Required to be true when type is earn. Mainnet only, and cannot be combined with isGateway.

Example:

false

rewardProvider
enum<string>

Earn provider. Required when isReward is true.

Available options:
fija,
aave
Example:

"aave"

rewardType
enum<string>

Earn strategy class. Must be regulated for fija and defi for aave.

Available options:
regulated,
defi
Example:

"defi"

useTransactionAmount
boolean

When false (default) the rule settles the address's current balance of the source asset; when true it settles only the triggering deposit amount.

Example:

false

deductionPercentage
string

Percentage withheld from the settled amount before execution. Defaults to "0".

Example:

"0"

inheritance
object

Controls which child addresses this master-wallet rule cascades to. Omit for the legacy behavior (master wallet plus every child address).

name
string
Example:

"Swap from USDC to Gateway"

order
enum<string>

Routing preference for the swap leg. Defaults to RECOMMENDED and is ignored for gateway and earn rules.

Available options:
FASTEST,
CHEAPEST,
RECOMMENDED,
NO_SLIPPAGE
Example:

"FASTEST"

slippageTolerance
string

Acceptable slippage as a percentage. Defaults to "0"; use "-1" for unlimited.

Example:

"5"

Response

200 - application/json

Regular 200 / Gateway 200

data
object
message
string
Example:

"Auto settlement rule created successfully"

statusCode
number
Example:

201