Implemented trade wrapper (in Java) to circumvent broken Scala compiler.