Added a 'count' parameter to getTradeHistory to reduce the amount of work done if the entire history is not needed.