Skip to main content
POST

授权

x-api-key
string
header
必填

路径参数

walletId
string
必填
示例:

"{{walletId}}"

addressId
string
必填
示例:

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

请求体

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

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

可用选项:
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. Requires type earn, and is discarded when type is omitted. 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. Discarded when type is omitted.

示例:

false

deductionPercentage
string

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

示例:

"0"

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

200