模拟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使用ContentExchange设置请求属性   java Spark/Hdfs/Hdfsclient兼容性   java springcloudstreamkafka配置:instanceCount和instanceIndex   Java中web服务序列化日期   java用动态数据替换占位符   java git gc似乎覆盖了一个packfile,留下了一个打开的文件描述符,其中包含对“oldxxx.pack”的引用   为什么Apache项目对Java版本敏感?   java Anylogic帮助如何在导入的3dobject通过输送机上的多个“站”时更改其颜色?   JavaEclipseNeonM2E可以导入一个大型项目,但似乎不能自动解决依赖关系   java@FindBy搜索具有满足条件的子元素的元素   java如何将ActionEvent e与键绑定一起使用?   java转换以集中方式从外部库抛出的异常   java中用户文件/数据文件与系统/程序文件的区别   java使用变量字符串或字符作为对象名   字体使用Java图形操纵字符串中每个字符的形状   JavaFX图表移动数据   java RandomAccessFile:将所有项设置为相同的字节数?   java Google Play inapp Billing onPurchasesUpdated()错误响应代码1   java在不知道属性名和属性数的情况下处理json对象   java是否可以一次从HazelcastInstance(映射和列表)中删除所有数据?