implement the new earning API call