Update wallet strategy
curl --request PATCH \
--url https://sandbox.groundtech.co/v3/wallets/{id}/strategy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requestId": "c3d4e5f6-0000-4000-8000-000000000001",
"allocations": {
"usdt:ethereum": [
{
"kind": "cash",
"targetWeightPct": 100
}
]
}
}
'import requests
url = "https://sandbox.groundtech.co/v3/wallets/{id}/strategy"
payload = {
"requestId": "c3d4e5f6-0000-4000-8000-000000000001",
"allocations": { "usdt:ethereum": [
{
"kind": "cash",
"targetWeightPct": 100
}
] }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requestId: 'c3d4e5f6-0000-4000-8000-000000000001',
allocations: {'usdt:ethereum': [{kind: 'cash', targetWeightPct: 100}]}
})
};
fetch('https://sandbox.groundtech.co/v3/wallets/{id}/strategy', 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://sandbox.groundtech.co/v3/wallets/{id}/strategy",
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([
'requestId' => 'c3d4e5f6-0000-4000-8000-000000000001',
'allocations' => [
'usdt:ethereum' => [
[
'kind' => 'cash',
'targetWeightPct' => 100
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://sandbox.groundtech.co/v3/wallets/{id}/strategy"
payload := strings.NewReader("{\n \"requestId\": \"c3d4e5f6-0000-4000-8000-000000000001\",\n \"allocations\": {\n \"usdt:ethereum\": [\n {\n \"kind\": \"cash\",\n \"targetWeightPct\": 100\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://sandbox.groundtech.co/v3/wallets/{id}/strategy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"requestId\": \"c3d4e5f6-0000-4000-8000-000000000001\",\n \"allocations\": {\n \"usdt:ethereum\": [\n {\n \"kind\": \"cash\",\n \"targetWeightPct\": 100\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.groundtech.co/v3/wallets/{id}/strategy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"requestId\": \"c3d4e5f6-0000-4000-8000-000000000001\",\n \"allocations\": {\n \"usdt:ethereum\": [\n {\n \"kind\": \"cash\",\n \"targetWeightPct\": 100\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"strategyAllocations": {
"usdc:crosschain": [
{
"assetId": "03389041-80ad-4dcf-8fe2-3536bcfe92db",
"targetWeightPct": 40
},
{
"assetId": "80f900d0-a4b8-4c97-bdc2-8e2ab5228e19",
"targetWeightPct": 30
},
{
"assetId": "6c6c676a-4111-472b-b29c-3e7e00d1a49c",
"targetWeightPct": 30
}
],
"usdt:ethereum": [
{
"kind": "cash",
"targetWeightPct": 100
}
],
"usdt:tron": [
{
"kind": "cash",
"targetWeightPct": 100
}
]
}
}
Wallets
Update wallet strategy
Updates selected token strategies. Open rebalances keep their reservations; new plans use unreserved funds. Open withdrawals block edits.
PATCH
/
v3
/
wallets
/
{id}
/
strategy
Update wallet strategy
curl --request PATCH \
--url https://sandbox.groundtech.co/v3/wallets/{id}/strategy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"requestId": "c3d4e5f6-0000-4000-8000-000000000001",
"allocations": {
"usdt:ethereum": [
{
"kind": "cash",
"targetWeightPct": 100
}
]
}
}
'import requests
url = "https://sandbox.groundtech.co/v3/wallets/{id}/strategy"
payload = {
"requestId": "c3d4e5f6-0000-4000-8000-000000000001",
"allocations": { "usdt:ethereum": [
{
"kind": "cash",
"targetWeightPct": 100
}
] }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requestId: 'c3d4e5f6-0000-4000-8000-000000000001',
allocations: {'usdt:ethereum': [{kind: 'cash', targetWeightPct: 100}]}
})
};
fetch('https://sandbox.groundtech.co/v3/wallets/{id}/strategy', 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://sandbox.groundtech.co/v3/wallets/{id}/strategy",
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([
'requestId' => 'c3d4e5f6-0000-4000-8000-000000000001',
'allocations' => [
'usdt:ethereum' => [
[
'kind' => 'cash',
'targetWeightPct' => 100
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://sandbox.groundtech.co/v3/wallets/{id}/strategy"
payload := strings.NewReader("{\n \"requestId\": \"c3d4e5f6-0000-4000-8000-000000000001\",\n \"allocations\": {\n \"usdt:ethereum\": [\n {\n \"kind\": \"cash\",\n \"targetWeightPct\": 100\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://sandbox.groundtech.co/v3/wallets/{id}/strategy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"requestId\": \"c3d4e5f6-0000-4000-8000-000000000001\",\n \"allocations\": {\n \"usdt:ethereum\": [\n {\n \"kind\": \"cash\",\n \"targetWeightPct\": 100\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.groundtech.co/v3/wallets/{id}/strategy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"requestId\": \"c3d4e5f6-0000-4000-8000-000000000001\",\n \"allocations\": {\n \"usdt:ethereum\": [\n {\n \"kind\": \"cash\",\n \"targetWeightPct\": 100\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"strategyAllocations": {
"usdc:crosschain": [
{
"assetId": "03389041-80ad-4dcf-8fe2-3536bcfe92db",
"targetWeightPct": 40
},
{
"assetId": "80f900d0-a4b8-4c97-bdc2-8e2ab5228e19",
"targetWeightPct": 30
},
{
"assetId": "6c6c676a-4111-472b-b29c-3e7e00d1a49c",
"targetWeightPct": 30
}
],
"usdt:ethereum": [
{
"kind": "cash",
"targetWeightPct": 100
}
],
"usdt:tron": [
{
"kind": "cash",
"targetWeightPct": 100
}
]
}
}
Wallets created with
autoRebalance: false use
Preview wallet allocation and
Allocate wallet funds instead of percentage targets.Authorizations
Body
application/json