๐ Get BTC received amount for address
Code samples
GET /api/v1/btc/account/{address}/balance
curl 'https://settla.net/api/v1/btc/account/bc1qay6jxstdwyma44ak8qfu52njqy9ujnfm37hllg/balance' \
-H 'X-API-Key: $SETTLA_API_KEY' \
-H 'Accept: application/json'
Returns the total received by an address via getreceivedbyaddress. The address must belong to the node's wallet, and the production node has no wallet โ so on the live API every address, including valid ones, comes back 500 with Could not connect to BTC node. (the node's real complaint, "address not found in wallet", is collapsed into that generic message). This endpoint is documented for self-hosted deployments that load a wallet. Two further limits worth knowing even there: getreceivedbyaddress counts what an address has received, never what it still holds โ spent outputs are not subtracted โ and it says nothing about addresses the wallet does not track. For balances of addresses you control, use Watch-only addresses.
๐ ๏ธ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| address | path | string | true | Bitcoin address (Base58 or Bech32) managed by the node wallet. |
| minconf | query | integer(int32) | false | Minimum number of confirmations required for payments. |
Example responses
200 Response
{
"address": "bc1qay6jxstdwyma44ak8qfu52njqy9ujnfm37hllg",
"minconf": 1,
"balance": 0.012
}
400 Response
{
"error": "Parameter \"minconf\" must be a non-negative integer"
}
500 Response
{
"error": "Could not connect to BTC node."
}
๐ Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | BTC received amount for the address | Inline |
| 400 | Bad Request | Invalid minconf parameter (negative) | Inline |
| 500 | Internal Server Error | Node unreachable, or โ the usual case in production โ the address is not in the node's wallet | Inline |
๐ Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป address | string | false | none | none |
| ยป minconf | integer(int32) | false | none | none |
| ยป balance | number(double) | false | none | Total amount received by the address in BTC. |
Status Code 400
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป error | string | false | none | Human-readable reason. |
Status Code 500
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| ยป error | string | false | none | Human-readable reason. |