Skip to main content
POST

授权

x-api-key
string
header
必填

路径参数

walletId
string
必填
示例:

"{{walletId}}"

请求体

application/json
destination
object
必填
source
object
必填
type
enum<string>

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

可用选项:
withdraw,
swap,
gateway,
earn
示例:

"swap"

isActive
boolean
示例:

true

isGateway
boolean

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

示例:

true

isReward
boolean

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

示例:

false

rewardProvider
enum<string>

Earn provider. Required when isReward is true.

可用选项:
aave
示例:

"aave"

rewardType
enum<string>

Earn strategy class. Only defi is currently offered.

可用选项:
defi
示例:

"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.

示例:

false

deductionPercentage
string

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

示例:

"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
示例:

"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.

可用选项:
FASTEST,
CHEAPEST,
RECOMMENDED,
NO_SLIPPAGE
示例:

"FASTEST"

slippageTolerance
string

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

示例:

"5"

响应

200 - application/json

Regular 200 / Gateway 200

data
object
message
string
示例:

"Auto settlement rule created successfully"

statusCode
number
示例:

201