ctp: add lovelylain's api

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
ctp: update ctpapi.py and testctp.py

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>