yearn / yearn-api-archived

Collection of serverless API
23 stars 24 forks source link

Historical tvl #68

Closed miguel567 closed 3 years ago

miguel567 commented 3 years ago

all work is on /tvl and (new) /tvl/save endpoints

  1. Created a /tvl/save endpoint which stores in a new table the values from final TVL calculation.
  2. Modified /tvl so it reads from DB the most recent TVL stored.
  3. Added a param "?historic=true" which delivers not only the latest TVL, but the full list of TVLs stored in DB.

Task: /tvl/save should be called daily right after /holdings/save