how to sell stocks by API in portfolio