curl --request POST \
--url https://api.blockradar.co/v1/wallets/{walletId}/auto-settlements/rules/copy \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"rules": [
{
"type": "withdraw",
"name": "Sweep USDC to treasury",
"isActive": true,
"slippageTolerance": "0",
"source": {
"assets": [
"USDC"
],
"minAmount": "1",
"maxAmount": "-1"
},
"destination": {
"blockchain": "base",
"asset": "USDC",
"address": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22"
}
}
],
"targetWalletIds": [
"3f6c9a11-9a7e-4a3c-8f2b-0d51e6c4a7b2",
"c81e7d40-5b6a-4f9e-9c3d-2a7f10b8e654"
]
}
'import requests
url = "https://api.blockradar.co/v1/wallets/{walletId}/auto-settlements/rules/copy"
payload = {
"rules": [
{
"type": "withdraw",
"name": "Sweep USDC to treasury",
"isActive": True,
"slippageTolerance": "0",
"source": {
"assets": ["USDC"],
"minAmount": "1",
"maxAmount": "-1"
},
"destination": {
"blockchain": "base",
"asset": "USDC",
"address": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22"
}
}
],
"targetWalletIds": ["3f6c9a11-9a7e-4a3c-8f2b-0d51e6c4a7b2", "c81e7d40-5b6a-4f9e-9c3d-2a7f10b8e654"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rules: [
{
type: 'withdraw',
name: 'Sweep USDC to treasury',
isActive: true,
slippageTolerance: '0',
source: {assets: ['USDC'], minAmount: '1', maxAmount: '-1'},
destination: {
blockchain: 'base',
asset: 'USDC',
address: '0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22'
}
}
],
targetWalletIds: ['3f6c9a11-9a7e-4a3c-8f2b-0d51e6c4a7b2', 'c81e7d40-5b6a-4f9e-9c3d-2a7f10b8e654']
})
};
fetch('https://api.blockradar.co/v1/wallets/{walletId}/auto-settlements/rules/copy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.blockradar.co/v1/wallets/{walletId}/auto-settlements/rules/copy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'rules' => [
[
'type' => 'withdraw',
'name' => 'Sweep USDC to treasury',
'isActive' => true,
'slippageTolerance' => '0',
'source' => [
'assets' => [
'USDC'
],
'minAmount' => '1',
'maxAmount' => '-1'
],
'destination' => [
'blockchain' => 'base',
'asset' => 'USDC',
'address' => '0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22'
]
]
],
'targetWalletIds' => [
'3f6c9a11-9a7e-4a3c-8f2b-0d51e6c4a7b2',
'c81e7d40-5b6a-4f9e-9c3d-2a7f10b8e654'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.blockradar.co/v1/wallets/{walletId}/auto-settlements/rules/copy"
payload := strings.NewReader("{\n \"rules\": [\n {\n \"type\": \"withdraw\",\n \"name\": \"Sweep USDC to treasury\",\n \"isActive\": true,\n \"slippageTolerance\": \"0\",\n \"source\": {\n \"assets\": [\n \"USDC\"\n ],\n \"minAmount\": \"1\",\n \"maxAmount\": \"-1\"\n },\n \"destination\": {\n \"blockchain\": \"base\",\n \"asset\": \"USDC\",\n \"address\": \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\"\n }\n }\n ],\n \"targetWalletIds\": [\n \"3f6c9a11-9a7e-4a3c-8f2b-0d51e6c4a7b2\",\n \"c81e7d40-5b6a-4f9e-9c3d-2a7f10b8e654\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.blockradar.co/v1/wallets/{walletId}/auto-settlements/rules/copy")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"rules\": [\n {\n \"type\": \"withdraw\",\n \"name\": \"Sweep USDC to treasury\",\n \"isActive\": true,\n \"slippageTolerance\": \"0\",\n \"source\": {\n \"assets\": [\n \"USDC\"\n ],\n \"minAmount\": \"1\",\n \"maxAmount\": \"-1\"\n },\n \"destination\": {\n \"blockchain\": \"base\",\n \"asset\": \"USDC\",\n \"address\": \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\"\n }\n }\n ],\n \"targetWalletIds\": [\n \"3f6c9a11-9a7e-4a3c-8f2b-0d51e6c4a7b2\",\n \"c81e7d40-5b6a-4f9e-9c3d-2a7f10b8e654\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockradar.co/v1/wallets/{walletId}/auto-settlements/rules/copy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rules\": [\n {\n \"type\": \"withdraw\",\n \"name\": \"Sweep USDC to treasury\",\n \"isActive\": true,\n \"slippageTolerance\": \"0\",\n \"source\": {\n \"assets\": [\n \"USDC\"\n ],\n \"minAmount\": \"1\",\n \"maxAmount\": \"-1\"\n },\n \"destination\": {\n \"blockchain\": \"base\",\n \"asset\": \"USDC\",\n \"address\": \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\"\n }\n }\n ],\n \"targetWalletIds\": [\n \"3f6c9a11-9a7e-4a3c-8f2b-0d51e6c4a7b2\",\n \"c81e7d40-5b6a-4f9e-9c3d-2a7f10b8e654\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"summary": {
"walletsTargeted": 2,
"rulesRequested": 1,
"applied": 1,
"skipped": 1,
"failed": 0
},
"results": [
{
"walletId": "3f6c9a11-9a7e-4a3c-8f2b-0d51e6c4a7b2",
"walletName": "Base Mainnet Wallet",
"chain": "base",
"applied": [
{
"name": "Sweep USDC to treasury"
}
],
"skipped": []
},
{
"walletId": "c81e7d40-5b6a-4f9e-9c3d-2a7f10b8e654",
"walletName": "Optimism Mainnet Wallet",
"chain": "optimism",
"applied": [],
"skipped": [
{
"name": "Sweep USDC to treasury",
"reason": "A settlement rule for USDC already exists on the optimism wallet"
}
]
}
]
},
"message": "Settlement rules copied",
"statusCode": 200
}{
"message": "No valid target wallets provided",
"statusCode": 400
}Master Wallet Copy Rules
This endpoint copies a set of auto-settlement rules onto one or more other master wallets in a single call. Use it to roll one settlement strategy out across every chain you operate on without recreating each rule by hand.
The rules are sent by value, not by ID, so the source can be any rule list you already hold — a master wallet’s rules, a child address’s rules, or a payload you composed yourself. Each rule is re-validated against the target wallet before it is written, and source.blockchain is rewritten to the target wallet’s own blockchain.
Copying is per-wallet atomic: each target wallet is locked and updated in its own transaction, so a failure on one target never leaves another half-written. The call still returns 200 when some targets fail or some rules are skipped — always read summary and the per-wallet results rather than relying on the status code.
Applying at least one rule to a target also switches auto-settlement on for that wallet.
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| rules | array of objects | Yes | The settlement rules to copy, in the same shape as the create-rule body. Must not be empty. Each entry is fully validated, so a malformed rule fails the whole request with 400. |
| targetWalletIds | array of strings | Yes | IDs of the master wallets to copy the rules into. Must not be empty. The source wallet is silently removed from this list; if nothing remains, the request fails with 400. |
Why a rule gets skipped
A rule is reported under skipped (rather than failing the request) when:
- a source asset is not enabled on the target wallet
- the target wallet already has a rule covering one of the source assets on that blockchain
- the rule fails validation for that specific target, for example a gateway destination that the target’s chain does not support
curl --request POST \
--url https://api.blockradar.co/v1/wallets/{walletId}/auto-settlements/rules/copy \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"rules": [
{
"type": "withdraw",
"name": "Sweep USDC to treasury",
"isActive": true,
"slippageTolerance": "0",
"source": {
"assets": [
"USDC"
],
"minAmount": "1",
"maxAmount": "-1"
},
"destination": {
"blockchain": "base",
"asset": "USDC",
"address": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22"
}
}
],
"targetWalletIds": [
"3f6c9a11-9a7e-4a3c-8f2b-0d51e6c4a7b2",
"c81e7d40-5b6a-4f9e-9c3d-2a7f10b8e654"
]
}
'import requests
url = "https://api.blockradar.co/v1/wallets/{walletId}/auto-settlements/rules/copy"
payload = {
"rules": [
{
"type": "withdraw",
"name": "Sweep USDC to treasury",
"isActive": True,
"slippageTolerance": "0",
"source": {
"assets": ["USDC"],
"minAmount": "1",
"maxAmount": "-1"
},
"destination": {
"blockchain": "base",
"asset": "USDC",
"address": "0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22"
}
}
],
"targetWalletIds": ["3f6c9a11-9a7e-4a3c-8f2b-0d51e6c4a7b2", "c81e7d40-5b6a-4f9e-9c3d-2a7f10b8e654"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rules: [
{
type: 'withdraw',
name: 'Sweep USDC to treasury',
isActive: true,
slippageTolerance: '0',
source: {assets: ['USDC'], minAmount: '1', maxAmount: '-1'},
destination: {
blockchain: 'base',
asset: 'USDC',
address: '0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22'
}
}
],
targetWalletIds: ['3f6c9a11-9a7e-4a3c-8f2b-0d51e6c4a7b2', 'c81e7d40-5b6a-4f9e-9c3d-2a7f10b8e654']
})
};
fetch('https://api.blockradar.co/v1/wallets/{walletId}/auto-settlements/rules/copy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.blockradar.co/v1/wallets/{walletId}/auto-settlements/rules/copy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'rules' => [
[
'type' => 'withdraw',
'name' => 'Sweep USDC to treasury',
'isActive' => true,
'slippageTolerance' => '0',
'source' => [
'assets' => [
'USDC'
],
'minAmount' => '1',
'maxAmount' => '-1'
],
'destination' => [
'blockchain' => 'base',
'asset' => 'USDC',
'address' => '0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22'
]
]
],
'targetWalletIds' => [
'3f6c9a11-9a7e-4a3c-8f2b-0d51e6c4a7b2',
'c81e7d40-5b6a-4f9e-9c3d-2a7f10b8e654'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.blockradar.co/v1/wallets/{walletId}/auto-settlements/rules/copy"
payload := strings.NewReader("{\n \"rules\": [\n {\n \"type\": \"withdraw\",\n \"name\": \"Sweep USDC to treasury\",\n \"isActive\": true,\n \"slippageTolerance\": \"0\",\n \"source\": {\n \"assets\": [\n \"USDC\"\n ],\n \"minAmount\": \"1\",\n \"maxAmount\": \"-1\"\n },\n \"destination\": {\n \"blockchain\": \"base\",\n \"asset\": \"USDC\",\n \"address\": \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\"\n }\n }\n ],\n \"targetWalletIds\": [\n \"3f6c9a11-9a7e-4a3c-8f2b-0d51e6c4a7b2\",\n \"c81e7d40-5b6a-4f9e-9c3d-2a7f10b8e654\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.blockradar.co/v1/wallets/{walletId}/auto-settlements/rules/copy")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"rules\": [\n {\n \"type\": \"withdraw\",\n \"name\": \"Sweep USDC to treasury\",\n \"isActive\": true,\n \"slippageTolerance\": \"0\",\n \"source\": {\n \"assets\": [\n \"USDC\"\n ],\n \"minAmount\": \"1\",\n \"maxAmount\": \"-1\"\n },\n \"destination\": {\n \"blockchain\": \"base\",\n \"asset\": \"USDC\",\n \"address\": \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\"\n }\n }\n ],\n \"targetWalletIds\": [\n \"3f6c9a11-9a7e-4a3c-8f2b-0d51e6c4a7b2\",\n \"c81e7d40-5b6a-4f9e-9c3d-2a7f10b8e654\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.blockradar.co/v1/wallets/{walletId}/auto-settlements/rules/copy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rules\": [\n {\n \"type\": \"withdraw\",\n \"name\": \"Sweep USDC to treasury\",\n \"isActive\": true,\n \"slippageTolerance\": \"0\",\n \"source\": {\n \"assets\": [\n \"USDC\"\n ],\n \"minAmount\": \"1\",\n \"maxAmount\": \"-1\"\n },\n \"destination\": {\n \"blockchain\": \"base\",\n \"asset\": \"USDC\",\n \"address\": \"0x2455eC6700092991Ce0782365A89d5Cd89c8Fa22\"\n }\n }\n ],\n \"targetWalletIds\": [\n \"3f6c9a11-9a7e-4a3c-8f2b-0d51e6c4a7b2\",\n \"c81e7d40-5b6a-4f9e-9c3d-2a7f10b8e654\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"summary": {
"walletsTargeted": 2,
"rulesRequested": 1,
"applied": 1,
"skipped": 1,
"failed": 0
},
"results": [
{
"walletId": "3f6c9a11-9a7e-4a3c-8f2b-0d51e6c4a7b2",
"walletName": "Base Mainnet Wallet",
"chain": "base",
"applied": [
{
"name": "Sweep USDC to treasury"
}
],
"skipped": []
},
{
"walletId": "c81e7d40-5b6a-4f9e-9c3d-2a7f10b8e654",
"walletName": "Optimism Mainnet Wallet",
"chain": "optimism",
"applied": [],
"skipped": [
{
"name": "Sweep USDC to treasury",
"reason": "A settlement rule for USDC already exists on the optimism wallet"
}
]
}
]
},
"message": "Settlement rules copied",
"statusCode": 200
}{
"message": "No valid target wallets provided",
"statusCode": 400
}Authorizations
Path Parameters
"{{walletId}}"

