Added API and market handler