Skip to main content
POST

Authorizations

x-api-key
string
header
required

Path Parameters

walletId
string
required
Example:

"{{walletId}}"

addressId
string
required
Example:

"534e0480-f444-40c0-bc2e-2ef17bf7999e"

Body

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

Settlement rule type. Send it on every create — without it the extended fields below are discarded.

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. Requires type earn, and is discarded when type is omitted. 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. Discarded when type is omitted.

Example:

false

deductionPercentage
string

Percentage withheld from the settled amount before execution. Defaults to "0". Discarded when type is omitted.

Example:

"0"

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:

200