跳转到主要内容
POST
/
v1
/
wallets
/
{walletId}
/
auto-settlements
/
rules
Master Wallet Create Rule
curl --request POST \
  --url https://api.blockradar.co/v1/wallets/{walletId}/auto-settlements/rules \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "destination": {},
  "isActive": true,
  "isGateway": true,
  "name": "Swap from USDC to Gateway",
  "order": "FASTEST",
  "slippageTolerance": "5",
  "source": {
    "assets": [
      "USDC"
    ],
    "maxAmount": "1000",
    "minAmount": "1"
  }
}
'
{ "data": { "destination": { "address": "0x77777777Dcc4d5A8B6E418Fd04D8997ef11000eE", "asset": "USDC", "blockchain": "base" }, "id": "586db9b9-a6d8-4185-af72-395f21254eaf", "isActive": true, "isGateway": true, "name": "Swap from USDC to Gateway", "order": "FASTEST", "slippageTolerance": "5", "source": { "assets": [ "USDC" ], "blockchain": "base", "maxAmount": "1000", "minAmount": "1" } }, "message": "Auto settlement rule created successfully", "statusCode": 201 }

授权

x-api-key
string
header
必填

路径参数

walletId
string
必填
示例:

"{{walletId}}"

请求体

application/json
destination
object
isActive
boolean
示例:

true

isGateway
boolean
示例:

true

name
string
示例:

"Swap from USDC to Gateway"

order
string
示例:

"FASTEST"

slippageTolerance
string
示例:

"5"

source
object

响应

200 - application/json

Regular 200 / Gateway 200

data
object
message
string
示例:

"Auto settlement rule created successfully"

statusCode
number
示例:

201