Skip to main content
PATCH
/
v1
/
wallets
/
{walletId}
/
addresses
/
{addressId}
Update Address
curl --request PATCH \
  --url https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "disableAutoSweep": "OPTIONAL_BOOLEAN",
  "enableGaslessWithdraw": "OPTIONAL_BOOLEAN",
  "isActive": "OPTIONAL_BOOLEAN",
  "metadata": "OPTIONAL_METADATA",
  "name": "OPTIONAL_ADDRESS_NAME",
  "showPrivateKey": "OPTIONAL_BOOLEAN"
}
'
import requests

url = "https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}"

payload = {
"disableAutoSweep": "OPTIONAL_BOOLEAN",
"enableGaslessWithdraw": "OPTIONAL_BOOLEAN",
"isActive": "OPTIONAL_BOOLEAN",
"metadata": "OPTIONAL_METADATA",
"name": "OPTIONAL_ADDRESS_NAME",
"showPrivateKey": "OPTIONAL_BOOLEAN"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
disableAutoSweep: 'OPTIONAL_BOOLEAN',
enableGaslessWithdraw: 'OPTIONAL_BOOLEAN',
isActive: 'OPTIONAL_BOOLEAN',
metadata: 'OPTIONAL_METADATA',
name: 'OPTIONAL_ADDRESS_NAME',
showPrivateKey: 'OPTIONAL_BOOLEAN'
})
};

fetch('https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}', 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}/addresses/{addressId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'disableAutoSweep' => 'OPTIONAL_BOOLEAN',
'enableGaslessWithdraw' => 'OPTIONAL_BOOLEAN',
'isActive' => 'OPTIONAL_BOOLEAN',
'metadata' => 'OPTIONAL_METADATA',
'name' => 'OPTIONAL_ADDRESS_NAME',
'showPrivateKey' => 'OPTIONAL_BOOLEAN'
]),
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}/addresses/{addressId}"

payload := strings.NewReader("{\n \"disableAutoSweep\": \"OPTIONAL_BOOLEAN\",\n \"enableGaslessWithdraw\": \"OPTIONAL_BOOLEAN\",\n \"isActive\": \"OPTIONAL_BOOLEAN\",\n \"metadata\": \"OPTIONAL_METADATA\",\n \"name\": \"OPTIONAL_ADDRESS_NAME\",\n \"showPrivateKey\": \"OPTIONAL_BOOLEAN\"\n}")

req, _ := http.NewRequest("PATCH", 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.patch("https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"disableAutoSweep\": \"OPTIONAL_BOOLEAN\",\n \"enableGaslessWithdraw\": \"OPTIONAL_BOOLEAN\",\n \"isActive\": \"OPTIONAL_BOOLEAN\",\n \"metadata\": \"OPTIONAL_METADATA\",\n \"name\": \"OPTIONAL_ADDRESS_NAME\",\n \"showPrivateKey\": \"OPTIONAL_BOOLEAN\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.blockradar.co/v1/wallets/{walletId}/addresses/{addressId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"disableAutoSweep\": \"OPTIONAL_BOOLEAN\",\n \"enableGaslessWithdraw\": \"OPTIONAL_BOOLEAN\",\n \"isActive\": \"OPTIONAL_BOOLEAN\",\n \"metadata\": \"OPTIONAL_METADATA\",\n \"name\": \"OPTIONAL_ADDRESS_NAME\",\n \"showPrivateKey\": \"OPTIONAL_BOOLEAN\"\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "address": "0x3ec2a234DE95cC783291241B7070b19786b25d5b",
    "blockchain": {
      "createdAt": "2024-05-27T08:31:14.966Z",
      "derivationPath": "m/44'/60'/0'/0",
      "id": "74733889-4ecd-403e-9840-94e87c043f24",
      "isActive": true,
      "isEvmCompatible": true,
      "logoUrl": "https://res.cloudinary.com/blockradar/image/upload/v1716800080/crypto-assets/Base_Network_Logo_vqyh7r.png",
      "name": "base",
      "slug": "base",
      "symbol": "eth",
      "tokenStandard": null,
      "updatedAt": "2024-10-27T07:52:16.115Z"
    },
    "configurations": {
      "aml": {
        "message": "Address is not sanctioned",
        "provider": "ofac",
        "status": "success"
      },
      "disableAutoSweep": true,
      "enableGaslessWithdraw": true,
      "showPrivateKey": false
    },
    "createdAt": "2024-11-11T16:48:19.682Z",
    "derivationPath": "m/44'/60'/0'/0/104",
    "id": "4982f18a-e9ec-43e8-b8a7-39de40f45e6f",
    "isActive": true,
    "metadata": null,
    "name": "Customer 2",
    "network": "testnet",
    "type": "INTERNAL",
    "updatedAt": "2024-11-11T16:55:05.320Z"
  },
  "message": "Address updated successfully",
  "statusCode": 200
}

Authorizations

x-api-key
string
header
required

Path Parameters

walletId
string
required
Example:

"YOUR_WALLET_ID"

addressId
string
required
Example:

"ADDRESS_ID"

Body

application/json
disableAutoSweep
string
Example:

"OPTIONAL_BOOLEAN"

enableGaslessWithdraw
string
Example:

"OPTIONAL_BOOLEAN"

isActive
string
Example:

"OPTIONAL_BOOLEAN"

metadata
string
Example:

"OPTIONAL_METADATA"

name
string
Example:

"OPTIONAL_ADDRESS_NAME"

showPrivateKey
string
Example:

"OPTIONAL_BOOLEAN"

Response

200 - application/json

200

data
object
message
string
Example:

"Address updated successfully"

statusCode
number
Example:

200