이 페이지는 영어로 된 기계 번역을 사용하므로 오류나 불명확한 언어가 포함될 수 있습니다. 가장 정확한 정보는 영어 원문을 참조하시기 바랍니다. 잦은 업데이트로 인해 일부 콘텐츠는 원래 영어로 되어 있을 수 있습니다. Crowdin에서 이 페이지의 번역을 개선하는 데 동참하여 도움을 주세요. (Crowdin translation page, Contributing guide)
[Account] kaia_getBalance
Returns the balance of the account of given address.
NOTE: In versions earlier than Kaia v1.7.0, only integer block number, the string "earliest" and "latest" are available.`
JSONRPC: kaia_getBalance
Request
- application/json
Body
Array [
- IntegerBlockNumber
- HexadecimalBlockNumber
- BlockTag
- BlockHash
]
params
undefined[]
required
Address 20-byte DATA
Address
BlockNumberOrHashOrTag
object
oneOf
the block number with type integer
number
the block number with type hexadecimal
string
the block tag [latest, pending, earliest]
string
the block hash
string
Responses
- 200
Returns the balance of the account of given address.
- application/json
- Schema
- Example (from schema)
Schema
error
object
result hex
Integer of the current balance in peb.
{
"jsonrpc": "2.0",
"id": 0,
"error": {
"code": -32700,
"message": "Parse error",
"data": "string"
},
"result": 158972490234375000
}
- curl
- python
- nodejs
- java
- Curl
curl -X 'POST' \
'https://public-en-kairos.node.kaia.io/kaia/getBalance' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"method": "kaia_getBalance",
"id": 1,
"jsonrpc": "2.0",
"params": ["0x3111a0577f322e8fb54f78d9982a26ae7ca0f722", "latest"]
}'
- CURL
ResponseClear