Add API funcs to render hats.
Complete trading function.