Skip to main content

sell (SPOT)

his function can only be used in trade().

To put one sell order. Each period can put at max 500# orders.

Input​

exchange: string;
pair: string;
amount: number;
type: OrderType;
price: number;

Check OrderType

Example​

To put one sell order with market price for 0.999 amount. It is not necassery to set price with market price order.

exchange, pair, base, quote = CA.get_exchange_pair()
CA.sell(exchange, pair, 0.999, CA.OrderType.MARKET)

To put one sell order with limit price for 0.999 amount. The limit price is set as close_price.

exchange, pair, base, quote = CA.get_exchange_pair()
close_price = candles[exchange][pair][0]['close']
CA.sell(exchange, pair, 0.999, CA.OrderType.LIMIT, close_price)