What this does
This plug reads a token's stored sma value at a timestamp days_back before today and adds it to a supplied running total. It asks the caller for the token, today, days_back, and price_running_total. It fires whenever a caller invokes it with those four parameters, computing the window start and looking up the nested sma map in socket storage. Doing this by hand or against a stale stored value risks summing the wrong window and returning an incorrect running total.
Actions · 5





Related plugs · 8