模拟bitfinex模块

mooquant_silver的Python项目详细描述


#[bitfinex](https://www.bitfinex.com/)[mooquant](http://gbeced.github.io/pyalgotrade/)模块

这是该模块的早期版本。live trading尚未实现。现在,我只实现了livefeed(extends`barfeed.BaseBarFeed`)。实时数据从bitfinex的trades和order book api端点获取。希望在不久的将来,会实现一个实时代理类

livefeed类可以像mookant中的任何其他bar feed一样插入。要订阅出价和要价,只需从livefeed实例调用`getOrderBookUpdateEvent().subscribe(<your_callback_function>)`。请参阅sample.py上的示例。

喜欢我的工作?给我留个小费@32dzqmkn4rgchsfzemwdyykj85pcsvmp6e

样本转储: ` 2015-08-10 07:56:02,672 strategy [INFO] Order book updated. Best bid: 265.83. Best ask: 265.89 2015-08-10 07:56:10,800 strategy [INFO] Order book updated. Best bid: 265.83. Best ask: 265.93 2015-08-10 07:56:24,272 strategy [INFO] Order book updated. Best bid: 265.83. Best ask: 265.94 2015-08-10 07:56:29,269 strategy [INFO] Price: 265.91. Volume: 0.94. 2015-08-10 07:56:33,044 strategy [INFO] Order book updated. Best bid: 265.83. Best ask: 265.92 2015-08-10 07:56:43,051 strategy [INFO] Order book updated. Best bid: 265.65. Best ask: 265.8 2015-08-10 07:56:48,124 strategy [INFO] Price: 265.83. Volume: 2.91549425. 2015-08-10 07:56:48,125 strategy [INFO] Price: 265.83. Volume: 0.419. 2015-08-10 07:56:48,125 strategy [INFO] Price: 265.83. Volume: 0.38. 2015-08-10 07:56:48,125 strategy [INFO] Exit signal. Sell at 265.65 2015-08-10 07:56:48,126 strategy [INFO] Position closed at 265.83 2015-08-10 07:56:48,126 strategy [INFO] Price: 265.83. Volume: 0.634. 2015-08-10 07:56:48,126 strategy [INFO] Price: 265.83. Volume: 0.397. 2015-08-10 07:56:48,127 strategy [INFO] Price: 265.83. Volume: 0.38. 2015-08-10 07:56:48,127 strategy [INFO] Price: 265.83. Volume: 0.424. 2015-08-10 07:56:48,127 strategy [INFO] Price: 265.83. Volume: 7.6751. 2015-08-10 07:56:48,127 strategy [INFO] Price: 265.82. Volume: 0.377. 2015-08-10 07:56:48,127 strategy [INFO] Price: 265.82. Volume: 0.376. 2015-08-10 07:56:48,128 strategy [INFO] Price: 265.78. Volume: 0.07. 2015-08-10 07:56:51,492 strategy [INFO] Order book updated. Best bid: 265.66. Best ask: 265.78 2015-08-10 07:56:59,802 strategy [INFO] Order book updated. Best bid: 265.66. Best ask: 265.79 2015-08-10 07:57:16,524 strategy [INFO] Order book updated. Best bid: 265.68. Best ask: 265.79 2015-08-10 07:57:21,770 strategy [INFO] Price: 265.79. Volume: 0.79. 2015-08-10 07:57:24,932 strategy [INFO] Order book updated. Best bid: 265.71. Best ask: 265.79 2015-08-10 07:57:33,249 strategy [INFO] Order book updated. Best bid: 265.76. Best ask: 265.79 2015-08-10 07:57:41,749 strategy [INFO] Order book updated. Best bid: 265.78. Best ask: 265.79 2015-08-10 07:58:30,414 strategy [INFO] Price: 265.79. Volume: 0.010227. 2015-08-10 07:58:30,415 strategy [INFO] Price: 265.79. Volume: 0.375861. `

这是基于mookant的bitstamp和xignite模块。 #无银

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java为什么加载个人密钥库需要这么多时间?   当我使用main创建Android应用程序UI时,如何通过java修改它。xml文件?   java Tomcat 6和7:WebappClassLoader:尝试为名称org/apache/openjpa/persistence/osgi/BundleUtils复制类定义   java`parseInt()`和`parseDouble()`throw`NumberFormatExeption`   JavaSpringMongoDB填充引用   在LinuxMint中打开Eclipse时发生java错误;OpenJDK 64位服务器VM警告:忽略选项MaxPermSize=512m;支持在8.0中被删除   使用PKCS7Padding的AES CBC加密在Java和Objective中有不同的结果   java为什么Jackson要用一个以类命名的额外层来包装我的对象?   json在Java中使用parallelStream提取值   JavaSpring存储库自动生成方法:按给定的顶部编号+按字段描述排序选择   java是否有可序列化的标准闭包接口?   .NET与Java在初创公司的web应用程序开发   如何修复java。java中的lang.unsatifiedLinkError   JavaFX+Spring Boot+Hibernate应用程序对多个环境的java支持   自定义视图组中的java更改未呈现