sammchardy / python-kucoin

Kucoin REST and Websocket API python implementation
https://python-kucoin.readthedocs.io/en/latest/
MIT License
350 stars 148 forks source link

What are the STP options :"self trade protection CN, CO, CB or DC" #101

Closed Sanko777 closed 2 years ago

Sanko777 commented 2 years ago

I could not find what the 4 letter combinations are anywhere. "self trade protection CN, CO, CB or DC" (seams pretty important if i want to submit both buy and sell orders to make sure sure my orders don't cancel each other out or sell/buy from/to myself if that's what its meant to prevent) stp=_____ CN - CO - CB - DC -

Sanko777 commented 2 years ago

Found It: Self-Trade Prevention is an option in advanced settings.It is not selected by default. If you specify STP when placing orders, your order won't be matched by another one which is also yours. On the contrary, if STP is not specified in advanced, your order can be matched by another one of your own orders. It should be noted that only the taker's protection strategy is effective. DECREMENT AND CANCEL(DC) Market orders are currently not supported for DC. When two orders from the same user cross, the smaller order will be canceled and the larger order will be decremented by the size of the smaller order. If the two orders are the same size, both will be canceled. CANCEL OLDEST(CO) Cancel the older (resting) order in full. The new order continues to execute. CANCEL NEWEST(CN) Cancel the newer (taking) order in full. The old resting order remains on the order book. CANCEL BOTH(CB) Immediately cancel both orders.