integrate brokerage code