fetch historical data from dynamic contract