Skip to main content
PATCH
/
vault
/
accounts
/
{vaultAccountId}
/
virtual_asset_wallet
/
usdc_gateway
/
deposit_automation
/
{automationId}
TypeScript
const response: Promise<FireblocksResponse<AutomationSettingsResponse>> = fireblocks.vaults.updateUsdcGatewayDepositAutomationBeta(vaultsApiUpdateUsdcGatewayDepositAutomationBetaRequest);
CompletableFuture<ApiResponse<AutomationSettingsResponse>> response = fireblocks.vaults().updateUsdcGatewayDepositAutomationBeta(updateAutomationSettingsRequest, vaultAccountId, automationId, idempotencyKey);
response = fireblocks.vaults.update_usdc_gateway_deposit_automation_beta(update_automation_settings_request, vault_account_id, automation_id, idempotency_key);
curl --request PATCH \
--url https://api.fireblocks.io/v1/vault/accounts/{vaultAccountId}/virtual_asset_wallet/usdc_gateway/deposit_automation/{automationId} \
--header 'Content-Type: application/json' \
--data '
{
"timeBased": {
"intervalValue": 60,
"intervalUnit": "MINUTES",
"balanceThreshold": "1000"
}
}
'
const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
timeBased: {intervalValue: 60, intervalUnit: 'MINUTES', balanceThreshold: '1000'}
})
};

fetch('https://api.fireblocks.io/v1/vault/accounts/{vaultAccountId}/virtual_asset_wallet/usdc_gateway/deposit_automation/{automationId}', 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.fireblocks.io/v1/vault/accounts/{vaultAccountId}/virtual_asset_wallet/usdc_gateway/deposit_automation/{automationId}",
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([
'timeBased' => [
'intervalValue' => 60,
'intervalUnit' => 'MINUTES',
'balanceThreshold' => '1000'
]
]),
CURLOPT_HTTPHEADER => [
"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://api.fireblocks.io/v1/vault/accounts/{vaultAccountId}/virtual_asset_wallet/usdc_gateway/deposit_automation/{automationId}"

payload := strings.NewReader("{\n \"timeBased\": {\n \"intervalValue\": 60,\n \"intervalUnit\": \"MINUTES\",\n \"balanceThreshold\": \"1000\"\n }\n}")

req, _ := http.NewRequest("PATCH", url, payload)

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))

}
require 'uri'
require 'net/http'

url = URI("https://api.fireblocks.io/v1/vault/accounts/{vaultAccountId}/virtual_asset_wallet/usdc_gateway/deposit_automation/{automationId}")

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

request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"timeBased\": {\n \"intervalValue\": 60,\n \"intervalUnit\": \"MINUTES\",\n \"balanceThreshold\": \"1000\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "automationId": "b68a9e08-b59c-4ff9-893f-52d4f78c21e6",
  "vaultAccountId": "42",
  "automationType": "USDC_GATEWAY_DEPOSIT",
  "timeBased": {
    "intervalValue": 60,
    "intervalUnit": "MINUTES",
    "balanceThreshold": "1000"
  },
  "assetId": "USDC_ETH"
}
{
"message": "<string>",
"code": 123
}

Headers

Idempotency-Key
string

A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.

Path Parameters

vaultAccountId
string<numeric>
required

The ID of the vault account

automationId
string<uuid>
required

The ID of the deposit automation, returned when it was created or read

Body

application/json

Request body for changing an existing USDC Gateway deposit automation.

timeBased
object
required

The schedule for this deposit automation.

Response

Deposit automation updated

automationId
string<uuid>
required

The ID of this deposit automation.

Example:

"b68a9e08-b59c-4ff9-893f-52d4f78c21e6"

vaultAccountId
string<numeric>
required

The vault account this deposit automation applies to.

Example:

"42"

automationType
enum<string>
required

The type of this automation.

Available options:
USDC_GATEWAY_DEPOSIT
Example:

"USDC_GATEWAY_DEPOSIT"

timeBased
object
required

The schedule for this deposit automation.

assetId
string

The Fireblocks asset ID this automation applies to, if scoped to one.

Example:

"USDC_ETH"