跳转至

会计故事

原文:https://docs.elrond.com/sdk-and-tools/indices/es-index-accountshistory

## _id

该指标的_id字段是这样构成的:{bech32address}_{timestamp}(例如:erd.._1234)。

字段

描述
地址 地址字段保存 bech32 编码中的地址。
平衡 余额字段保存地址拥有的 EGLD 的数量。它是一个包含小数位数的字符串。例如:“150000000000000000”(相当于 1.5 EGLD)。
微薄的 当余额改变时,如果该地址是发送者,则 isSender 字段为真。
时间戳 时间戳字段表示地址余额改变时的时间戳。

查询示例

获取按时间戳排序的地址的最近 10 个条目

curl --request GET \
  --url ${ES_URL}/accountshistory/_search \
  --header 'Content-Type: application/json' \
  --data '{
    "query": {
        "match": {
            "address": "erd..."
        }
    },
    "sort": [
        {
            "timestamp": {
                "order": "desc"
            }
        }
    ],
    "size":10
}' 


回到顶部