fixed trade service config
fixed some service issues and unittests