bug fix in getTrades API