ledger_entry - 获取账本的指定条目
ledger_entry
命令获取账本中的指定条目的数据。
API请求格式
WebSocket请求示例
{
"id": 3,
"command": "ledger_entry",
"type": "account_root",
"account_root": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"ledger_index": "validated"
}
JSON-RPC请求示例
{
"method": "ledger_entry",
"params": [
{
"account_root": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"ledger_index": "validated",
"type": "account_root"
}
]
}
请求命令参数
- index
- account_root
- check
- deposit_preauth
- deposit_preauth.owner
- deposit_preauth.authorized
- directory
- directory.sub_index
- directory.dir_root
- directory.owner
- escrow
- escrow.seq
- offer
- offer.account
- offer.seq
- payment_channel
- ripple_state
- ripple_state.accounts
- ripple_state.currency
- binary
- ledger_hash
- ledger_index
API响应格式
WebSocket响应示例
{
"id": 3,
"result": {
"index": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05",
"ledger_index": 6889347,
"node": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Balance": "27389517749",
"Flags": 0,
"LedgerEntryType": "AccountRoot",
"OwnerCount": 18,
"PreviousTxnID": "B6B410172C0B65575D89E464AF5B99937CC568822929ABF87DA75CBD11911932",
"PreviousTxnLgrSeq": 6592159,
"Sequence": 1400,
"index": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05"
}
},
"status": "success",
"type": "response"
}
JSON-RPC响应示例
200 OK
{
"result": {
"index": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05",
"ledger_index": 8696234,
"node": {
"Account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"Balance": "13176802787",
"Flags": 0,
"LedgerEntryType": "AccountRoot",
"OwnerCount": 17,
"PreviousTxnID": "E5D0235A236F7CD162C1AB87A0325056AE61CFC63D92D1494AB5D826AAD0CDCA",
"PreviousTxnLgrSeq": 8554742,
"Sequence": 1406,
"index": "4F83A2CF7E70F77F79A307E6A472BFC2585B806A70833CCD1C26105BAE0D6E05"
},
"status": "success",
"validated": true
}
}
命令响应参数
- index
- ledger_index:账本序列号,整数
- node
- node_binary