模拟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 RFID不完整输出?   java如何构造一个for循环来查找每个数组的第一个索引的总和   java Eclipse AST解析器正在删除我的规则   安卓如何在java中创建“可重写”配置?   java每次我向应用程序添加图像时,它都会崩溃   Java 8流到文件   EntityNotFoundException的java可能原因   java多线程为什么下面的程序表现得如此怪异?   java footprint soap api+mavenjaxb2plugin   java MongoDB锁定,直到找到结果   java重写Jtable选项卡行为转到下一个可编辑单元格   java关于方法和创建另一个方法   java将人脸与图像分离   java复制Spring批处理作业实例   java TextView不会更改为新设置的文本