bro-n-bro / spacebox-api

Flask api for services on top of spacebox
MIT License
4 stars 0 forks source link

Add restake_token_amount #82

Closed bro-n-bro-0 closed 1 year ago

bro-n-bro-0 commented 1 year ago

The amount of restaked tokens in range by restake operators

bro-n-bro-0 commented 1 year ago

Blocked by https://github.com/bro-n-bro/spacebox-crawler/issues/96

bro-n-bro-0 commented 1 year ago

Here we are

SELECT height, toUInt256OrZero(JSONExtractString(JSONExtractString(_t, 'amount'), 'amount'))  FROM (
    SELECT height, JSONExtractString(arrayJoin(JSONExtractArrayRaw(JSONExtractString(msgs)))) as _t FROM spacebox.exec_message FINAL
)
iljagrabar14 commented 1 year ago

can implement

iljagrabar14 commented 1 year ago

@bro-n-bro-0 please check API /statistics/restake_token_amount

if it's ok, we can close issue

bro-n-bro-2 commented 1 year ago

Please, add static endpoint as well.

bro-n-bro-0 commented 1 year ago

Please, add static endpoint as well.

What kind of data should be provided in the static endpoint? Sum of all, last day, our?

bro-n-bro-2 commented 1 year ago

Last day please.

iljagrabar14 commented 1 year ago

@bro-n-bro-0 @bro-n-bro-2 please check both: historical and actual. if everything is ok, close issue please

bro-n-bro-2 commented 1 year ago

@prevetal , please, proceed.