cardano-community / koios-artifacts

Artifacts for https://koios.rest and https://api.koios.rest websites
Creative Commons Attribution 4.0 International
20 stars 25 forks source link

Null Fields in Latest Epoch Response #139

Closed edridudi closed 1 year ago

edridudi commented 1 year ago

During 99% of Epoch Period, Trying to get Latest Epoch

curl --location --request GET 'https://preview.koios.rest/api/v0/epoch_info?limit=1&order=epoch_no.desc' returns:

[
    {
        "epoch_no": 27,
        "out_sum": null,
        "fees": null,
        "tx_count": null,
        "blk_count": null,
        "start_time": 1668988836,
        "end_time": 1669075236,
        "first_block_time": null,
        "last_block_time": null,
        "active_stake": "360508015510377",
        "total_rewards": null,
        "avg_blk_reward": null
    }
]
rdlrt commented 1 year ago

As discussed, the state here is replicable when close to epoch transition. Since active_stake is desired for some clients (eg: for using leaderlogs), might not be wise to exclude this data, but the change could be to enable showing data for the next epoch by an additional boolean parameter

rdlrt commented 1 year ago

Closed via #143