莫名其妙的卡殼到ccxt庫了,pycharm和Anaconda都不搜索不到ccxt庫,折騰了半天,終于搞定,記錄下處理問題的順序
1.pytharm搜索不到

2.anaconda也搜索不到

3.查看https://github.com/ccxt/ccxt/wiki的安裝說明

Python
ccxt algotrading library in PyPI
pip install ccxt
importccxtprint(ccxt.exchanges)#print a list of all available exchange classes
The library supports concurrent asynchronous mode with asyncio and async/await in Python 3.5.3+
importccxt.async_supportasccxt#link against the asynchronous version of ccxt
4.pip install ccxt失敗,手動(dòng)下載了wheel文件,安裝wheel文件也失敗,總是下載到某一步出錯(cuò),報(bào)錯(cuò)n次后放棄

5.最后用Anaconda prompt工具 pip install ccxt,下載安裝成功了。補(bǔ)充兩點(diǎn):1.pip是在cmd模式下直接運(yùn)行的,2.網(wǎng)速低的情況下會(huì)出現(xiàn)安裝失敗,需要保證網(wǎng)速是ok的

6.刷新下anaconda 發(fā)現(xiàn)安裝成功了

7.刷新下pycharm,發(fā)現(xiàn)也導(dǎo)入成功了

8.幣安申請(qǐng)好api,代碼中輸入apikey和secret,ccxt接口返回成功

9.調(diào)用api掛單成功


11.等待輸出交易策略了,下一篇文章更新交易策略和回測結(jié)果