diff --git a/snippets/error-codes-cn.mdx b/snippets/error-codes-cn.mdx index dbe15e49..c4281ba1 100644 --- a/snippets/error-codes-cn.mdx +++ b/snippets/error-codes-cn.mdx @@ -10,7 +10,7 @@ | 1003, 2003 | 请求中缺少一个或多个必填参数。 | 提供所有必填参数。 | | 1006, 2006 | 一个或多个参数格式无效或包含不支持的值。 | 以预期格式提供有效参数。 | | 12002 | Cobo 不支持指定的代币。 | 选择支持的代币。调用 [List supported tokens](/v2/api-references/wallets/list-supported-tokens) 接口获取完整的支持代币列表。 | -| 12007, 30012 | 余额不足,无法执行请求的操作。 | 确保源地址有足够的余额支付转账金额。 | +| 12007, 30012 | 余额不足,无法执行请求的操作。 | Cobo 会按可用余额或可花费余额校验请求,而不只是看当前余额或总余额。待处理、锁定、冻结或处于合规筛查中的资金会减少可用余额,因此即使当前余额或总余额看起来充足,也仍可能触发此错误。请使用必填路径参数 `wallet_id` 和 `address` 调用 [List token balances by address](/v2/api-references/wallets/list-token-balances-by-address),无需提供查询参数。
curl --location --request GET 'https://api.dev.cobo.com/v2/wallets/{wallet_id}/addresses/{address}/tokens' \\
--header 'Biz-Api-Key: {YOUR_API_KEY}' \\
--header 'Biz-Api-Nonce: {NONCE}' \\
--header 'Biz-Api-Signature: {YOUR_API_SIGNATURE}'响应为列表。请找到 `token_id` 与提币代币匹配的 `data[]` 条目,并读取其中的 `balance.available` 值(即 `data[].balance.available`)。如果提币代币也是费用代币(例如链的原生代币),请将 `balance.available` 与提币金额加上预期交易费用进行比较。如果提币代币与费用代币不同,请将提币代币的 `balance.available` 与提币金额进行比较,然后使用费用代币的 `token_id` 再次调用同一接口,并将其 `balance.available` 与预期费用单独进行比较。对于全托管钱包,此地址级检查可用于排查问题,但最终余额评估在钱包级别进行,并会计入任何可用授信额度,因此结果可能与单个地址的余额不同。在 Cobo Portal 中,您也可以打开源地址,检查待处理、锁定或冻结的资金是否导致可用余额低于当前余额。有关详情,请参见 [MPC 钱包的余额和交易金额](/v2_cn/guides/mpc-wallets/balance-amounts)。如果金额非常小,它可能会以错误 `30010`(低于尘埃阈值)被拒绝。 |
| 12009, 30001 | 重复的请求 ID。 | 使用唯一的请求 ID。 |
| 12025 | 在 `included_utxos` 或 `excluded_utxos` 中指定的 UTXO 无效。 | 验证 `included_utxos` 或 `excluded_utxos` 中指定的 UTXO。 |
| 2000 | 处理过程中发生内部错误。 | 请稍后重试。 |
@@ -24,7 +24,7 @@
| 2051 | 当前套餐已过期。 | 续订您的套餐以继续使用服务。更多信息,请参见[账单和付款介绍](https://manuals.cobo.com/cn/portal/bills-and-payments/introduction)。 |
| 30007 | 金额无效。该值不是有效数字或不符合所需格式或范围。 | 提供符合预期格式和范围的有效金额。 |
| 30008 | 绝对金额无效。金额的绝对值太小、太大,或在需要非零值时为零。 | 确保金额的绝对值满足所需条件。 |
-| 30010 | 提供的金额低于尘埃阈值。金额太小,无法处理或转账。 | 增加金额以超过尘埃阈值。 |
+| 30010 | 提供的金额低于尘埃阈值。金额太小,无法处理或转账。 | 此错误表示转账金额本身太小而无法处理,与错误 `12007`(余额不足)不同。请使用必填路径参数 `token_id`(例如 `ETH_USDT`)调用 [Get token information](/v2/api-references/wallets/get-token-information),无需提供查询参数。curl --location --request GET 'https://api.dev.cobo.com/v2/wallets/tokens/{token_id}' \\
--header 'Biz-Api-Key: {YOUR_API_KEY}' \\
--header 'Biz-Api-Nonce: {NONCE}' \\
--header 'Biz-Api-Signature: {YOUR_API_SIGNATURE}'读取响应字段 `dust_threshold`。该字段使用代币的显示单位,例如 BTC 而非聪。转账金额必须大于或等于 `dust_threshold`。如果金额低于 `dust_threshold`,请将金额提高到至少等于该值后再重试。对于 UTXO 链,您也可以先归集小额 UTXO 后再重试。背景说明请参见 [MPC 钱包的余额和交易金额](/v2_cn/guides/mpc-wallets/balance-amounts)。 |
| 30011 | 提供的金额低于最低充币阈值。 | 增加充币金额以满足最低阈值。 |
| 30013 | 余额不足以支付所需的交易费用。 | 确保源地址有足够的余额支付交易费用。 |
| 30014 | 目标地址无效。 | 提供有效的目标地址。 |
@@ -49,4 +49,3 @@
| 500 | 内部服务器错误。此错误可能由多个问题引起,包括 [Org Access Tokens](/v2/apps/org-access-tokens) 过期。 | 检查您的服务器配置设置,包括 Org Access Tokens 是否已过期,然后稍后重试。 |
| 502 | 错误网关。 | 检查连接并稍后重试。 |
| 503 | 服务不可用。 | 稍后重试。 |
-
diff --git a/snippets/error-codes.mdx b/snippets/error-codes.mdx
index f69d8555..d29b1080 100644
--- a/snippets/error-codes.mdx
+++ b/snippets/error-codes.mdx
@@ -8,7 +8,7 @@ This article explains the common error codes and HTTP status codes you may encou
| 1003, 2003 | One or more required parameters are missing in the request. | Provide all required parameters. |
| 1006, 2006 | One or more parameters are in an invalid format or contain unsupported values. | Provide valid parameters in the expected format. |
| 12002 | The specified token is not supported by Cobo. | Choose a supported token. Call the [List supported tokens](/v2/api-references/wallets/list-supported-tokens) operation to get the full list of supported tokens. |
-| 12007, 30012 | Insufficient balance to perform the requested operation. | Ensure the source address has sufficient balance to cover the transferred amount. |
+| 12007, 30012 | Insufficient balance to perform the requested operation. | Cobo validates the request against the available or spendable balance, not just the current or total balance. Pending, locked, frozen, or compliance-screened funds reduce the available balance, so the error can occur even when the current or total balance looks sufficient. Call [List token balances by address](/v2/api-references/wallets/list-token-balances-by-address) with the required `wallet_id` and `address` path parameters; no query parameter is required.curl --location --request GET 'https://api.dev.cobo.com/v2/wallets/{wallet_id}/addresses/{address}/tokens' \\
--header 'Biz-Api-Key: {YOUR_API_KEY}' \\
--header 'Biz-Api-Nonce: {NONCE}' \\
--header 'Biz-Api-Signature: {YOUR_API_SIGNATURE}'The response is a list. Locate the `data[]` entry whose `token_id` matches the withdrawal token and read its `balance.available` value (`data[].balance.available`). If the withdrawal token is also the fee token, such as the chain's native token, compare `balance.available` with the withdrawal amount plus the expected transaction fee. If the withdrawal token and fee token differ, compare the withdrawal token's `balance.available` with the withdrawal amount, then call the same operation for the fee token's `token_id` and separately compare its `balance.available` with the expected fee. For Custodial Wallets, this address-level check is a useful diagnostic, but the final balance evaluation occurs at the wallet level and includes any available credit, so it can differ from a single address's balance. In Cobo Portal, you can also open the source address and check whether pending, locked, or frozen funds make the available balance lower than the current balance. For details, see [Balances and transaction amounts for MPC Wallets](/v2/guides/mpc-wallets/balance-amounts). If the amount is very small, it may instead be rejected with error `30010` (below the dust threshold). |
| 12009, 30001 | Duplicate request ID. | Use a unique request ID. |
| 12025 | The UTXOs specified in `included_utxos` or `excluded_utxos` are invalid. | Verify the UTXOs specified in `included_utxos` or `excluded_utxos`. |
| 2000 | Internal error occurred during processing. | Please try again later. |
@@ -22,7 +22,7 @@ This article explains the common error codes and HTTP status codes you may encou
| 2051 | The current pricing plan has expired. | Renew your pricing plan to continue using the service. For more information, see [Introduction to Bills & Payments](https://manuals.cobo.com/en/portal/bills-and-payments/introduction). |
| 30007 | Invalid amount. The value is not a valid number or does not meet the required format or range. | Provide a valid amount that meets the expected format and range. |
| 30008 | Invalid absolute amount. The absolute value of the amount is either too small, too large, or zero when a non-zero value is required. | Ensure the absolute value of the amount meets the required conditions. |
-| 30010 | The provided amount is below the dust threshold. It is too small to be processed or transferred. | Increase the amount to exceed the dust threshold. |
+| 30010 | The provided amount is below the dust threshold. It is too small to be processed or transferred. | This error means the transfer amount itself is too small to be processed and is distinct from error `12007` (insufficient balance). Call [Get token information](/v2/api-references/wallets/get-token-information) with the required `token_id` path parameter, such as `ETH_USDT`; no query parameter is required.curl --location --request GET 'https://api.dev.cobo.com/v2/wallets/tokens/{token_id}' \\
--header 'Biz-Api-Key: {YOUR_API_KEY}' \\
--header 'Biz-Api-Nonce: {NONCE}' \\
--header 'Biz-Api-Signature: {YOUR_API_SIGNATURE}'Read the response field `dust_threshold`, which is expressed in the token's display unit, such as BTC rather than satoshis. The transfer amount must be greater than or equal to `dust_threshold`. If it is lower, increase it to at least `dust_threshold` before retrying. On UTXO chains, you can also consolidate small UTXOs before retrying. For background, see [Balances and transaction amounts for MPC Wallets](/v2/guides/mpc-wallets/balance-amounts). |
| 30011 | The provided amount is below the minimum deposit threshold. | Increase the deposit amount to meet the minimum threshold. |
| 30013 | Insufficient balance to cover the required transaction fee. | Ensure the source address has enough balance to cover transaction fees. |
| 30014 | The destination address is invalid. | Provide a valid destination address. |
@@ -47,4 +47,3 @@ This article explains the common error codes and HTTP status codes you may encou
| 500 | Internal Server Error. This error can be caused by several issues including expired [Org Access Tokens](/v2/apps/org-access-tokens). | Check your server configuration settings, including whether your Org Access Token has expired, and try again later. |
| 502 | Bad Gateway. | Check the connectivity and try again later. |
| 503 | Service Unavailable. | Try again later. |
-
diff --git a/v2/guides/mpc-wallets/balance-amounts.mdx b/v2/guides/mpc-wallets/balance-amounts.mdx
index f077f1db..cb52a831 100644
--- a/v2/guides/mpc-wallets/balance-amounts.mdx
+++ b/v2/guides/mpc-wallets/balance-amounts.mdx
@@ -24,6 +24,22 @@ This diagram illustrates the relationship between these values: