save trade record to database