latestOpenAPI 3.0.32026-08-224982,0272.8 MB

e445c15e5bee

Wallet Policy

Add wallet-policy rule

Adds a rule to a wallet's policy. An email notification is sent to wallet users when the policy is updated (except the first time a policy is added).

post/api/v2/{coin}/wallet/{walletId}/policy/rule

Path parameters

coinstring required

A cryptocurrency symbol or token ticker symbol

Example:btc

Coin or token identifier (e.g. eth, talgo, txlm:token)

walletIdstring required
Example:59cd72485007a239fb00282ed480da1f

The wallet ID

Request body

coinstring

If set, the rule applies only to the given coin or ERC20 token in an Ethereum wallet. Generally not recommended for advancedWhitelist, allTx, coinAddressWhitelist, coinAddressBlacklist, or webhook rules.

idstring required

Caller-defined rule identifier, unique within the policy

type'advancedWhitelist' | 'allTx' | 'allTxNoFiat' | 'coinAddressWhitelist' | 'coinAddressBlacklist' | 'velocityLimit' | 'webhook' required

Rule trigger types accepted on POST (create).

Intentionally differs from {@link UpdateRemovePolicyRuleType}: create exposes newer names (e.g. allTxNoFiat, coinAddressWhitelist) while update/delete must accept legacy type strings stored on existing rules (e.g. bitcoinAddressWhitelist, transactionLimit).

lockDatestring date-time

The time at which this rule becomes immutable

generatePolicyboolean

When true or omitted, generates a policy enforcing the whitelist after creation. When false, no policy is generated.

Example request

{
  "coin": "btc"
}

Response

OK

allowBackupKeySigningboolean required
approvalsRequirednumber required
coinstring required

A cryptocurrency symbol or token ticker symbol

deletedboolean required
disableTransactionNotificationsboolean required
hasLargeNumberOfAddressesboolean nullable required
idstring required
isColdboolean required
labelstring required
startDatestring date-time required

Wallet creation time

billingEnterprisestring
custodialWalletIdstring
customerWalletIdstring
enterprisestring
evmKeyRingReferenceWalletIdstring

Reference wallet ID for EVM keyring wallets (child wallets only)

isParentboolean

Indicates if this wallet is a parent wallet in an EVM keyring setup

enabledChildChainsstring[]
archivedChildChainsstring[]
organizationstring
bitgoOrgstring
instantProviderstring
keysstring[]
mnumber

Number of signatures required. This value must be 2 for hot wallets, 1 for ofc wallets, and not specified for custodial wallets.

migratedFromstring
multisigType'onchain' | 'tss'
multisigTypeVersion'MPCv2'
nnumber

Number of keys provided. This value must be 3 for hot wallets, 1 for ofc wallets, and not specified for custodial wallets.

recoverableboolean
tagsstring[]
type'backing' | 'cold' | 'custodial' | 'custodialPaired' | 'hot' | 'advanced' | 'trading'
subType'distributedCustody' | 'pairedCustodial' | 'custodialHot' | 'custodialCold' | 'lightningCustody' | 'lightningSelfCustody' | 'onPrem'
balanceStringstring

The cleared balance of the address in base units (e.g. Satoshis). Guaranteed to not lose precision. The is only returned if the expandBalance query parameter is set to true.

balancenumber

The cleared balance of the address in base units (e.g. Satoshis). The is only returned if the expandBalance query parameter is set to true.

confirmedBalanceStringstring

The total balance of confirmed transactions in base units (e.g. Satoshis). The is only returned if the expandBalance query parameter is set to true. Guaranteed to not lose precision.

confirmedBalancenumber

The total balance of confirmed transactions in base units (e.g. Satoshis). The is only returned if the expandBalance query parameter is set to true.

spendableBalanceStringstring

The total balance in base units (e.g. Satoshis) which may be used as inputs for creating new transactions in string representation. Guaranteed to not lose precision. The is only returned if the expandBalance query parameter is set to true.

spendableBalancenumber

The total balance in base units (e.g. Satoshis) which may be used as inputs for creating new transactions in string representation. The is only returned if the expandBalance query parameter is set to true.

stakingBalanceStringstring

The staked balance in base units. Guaranteed to not lose precision. The is only returned if the includeStakingBalances query parameter is set to true.

rewardBalanceStringstring

The staking reward balance in base units. Guaranteed to not lose precision. The is only returned if the includeStakingBalances query parameter is set to true.

withdrawHoldAmountUsdStringstring

Total USD value (in cents) of active ACH-deposit related withdraw holds on this wallet. Only present for OFC wallets when allTokens=true is passed.

customTagsstring[]
safestring

Public id of the safe that minted this wallet. Absent on non-safe wallets.

Example response

{
  "approvalsRequired": 1,
  "coin": "btc",
  "id": "59cd72485007a239fb00282ed480da1f",
  "label": "My Wallet",
  "admin": {
    "policy": {
      "id": "59cd72485007a239fb00282ed480da1f",
      "rules": [
        {
          "coin": "btc",
          "condition": {
            "amountString": "2000000"
          }
        }
      ],
      "walletId": "59cd72485007a239fb00282ed480da1f"
    }
  },
  "buildDefaults": {
    "minFeeRate": 12000
  },
  "custodialWalletId": "59cd72485007a239fb00282ed480da1f",
  "enterprise": "59cd72485007a239fb00282ed480da1f",
  "evmKeyRingReferenceWalletId": "59cd72485007a239fb00282ed480da1f",
  "isParent": true,
  "enabledChildChains": [
    "tbsc",
    "tpolygon"
  ],
  "archivedChildChains": [
    "tbsc",
    "tpolygon"
  ],
  "keys": [
    "585951a5df8380e0e304a553",
    "585951a5df8380e0e30d645c",
    "585951a5df8380e0e30b6147"
  ],
  "m": 2,
  "n": 3,
  "receiveAddress": {
    "coin": "btc",
    "id": "59cd72485007a239fb00282ed480da1f",
    "address": "2MvrwRYBAuRtPTiZ5MyKg42Ke55W3fZJfZS",
    "balance": {
      "balanceString": "500000",
      "confirmedBalanceString": "400000",
      "spendableBalanceString": "40000",
      "balance": 50000
    },
    "label": "Bob's Hot Wallet Address"
  },
  "safe": "59cd72485007a239fb00282ed480da1f"
}