Skip to content

Commit

Permalink
v0.8.11
Browse files Browse the repository at this point in the history
  • Loading branch information
erdewit committed Nov 19, 2017
1 parent 84a6ff4 commit 241116e
Show file tree
Hide file tree
Showing 38 changed files with 550 additions and 60 deletions.
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ This project is not affiliated with Interactive Brokers Group, Inc.'s.
Changelog
---------

Version 0.8.11
^^^^^^^^^^^^^^

* FlexReport added

Version 0.8.10
^^^^^^^^^^^^^^

Expand Down
5 changes: 5 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,8 @@ Utilities
---------

.. automodule:: ib_insync.util

FlexReport
----------

.. automodule:: ib_insync.flexreport
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
# The short X.Y version.
version = '0.8'
# The full version, including alpha/beta/rc tags.
release = '0.8.10'
release = '0.8.11'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
Binary file modified docs/doctrees/api.doctree
Binary file not shown.
Binary file modified docs/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/doctrees/readme.doctree
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/html/_modules/ib_insync/client.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ib_insync.client &#8212; IB-insync 0.8.10 documentation</title>
<title>ib_insync.client &#8212; IB-insync 0.8.11 documentation</title>
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
VERSION: '0.8.10',
VERSION: '0.8.11',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand Down
4 changes: 2 additions & 2 deletions docs/html/_modules/ib_insync/clientqt.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ib_insync.clientqt &#8212; IB-insync 0.8.10 documentation</title>
<title>ib_insync.clientqt &#8212; IB-insync 0.8.11 documentation</title>
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
VERSION: '0.8.10',
VERSION: '0.8.11',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand Down
4 changes: 2 additions & 2 deletions docs/html/_modules/ib_insync/contract.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ib_insync.contract &#8212; IB-insync 0.8.10 documentation</title>
<title>ib_insync.contract &#8212; IB-insync 0.8.11 documentation</title>
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
VERSION: '0.8.10',
VERSION: '0.8.11',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand Down
4 changes: 2 additions & 2 deletions docs/html/_modules/ib_insync/ib.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ib_insync.ib &#8212; IB-insync 0.8.10 documentation</title>
<title>ib_insync.ib &#8212; IB-insync 0.8.11 documentation</title>
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
VERSION: '0.8.10',
VERSION: '0.8.11',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand Down
4 changes: 2 additions & 2 deletions docs/html/_modules/ib_insync/object.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ib_insync.object &#8212; IB-insync 0.8.10 documentation</title>
<title>ib_insync.object &#8212; IB-insync 0.8.11 documentation</title>
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
VERSION: '0.8.10',
VERSION: '0.8.11',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand Down
15 changes: 13 additions & 2 deletions docs/html/_modules/ib_insync/objects.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ib_insync.objects &#8212; IB-insync 0.8.10 documentation</title>
<title>ib_insync.objects &#8212; IB-insync 0.8.11 documentation</title>
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
VERSION: '0.8.10',
VERSION: '0.8.11',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand Down Expand Up @@ -186,6 +186,17 @@ <h1>Source code for ib_insync.objects</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">nonDefaults</span></div></div>


<span class="k">class</span> <span class="nc">DynamicObject</span><span class="p">:</span>

<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="vm">__dict__</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">kwargs</span><span class="p">)</span>

<span class="k">def</span> <span class="nf">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="n">clsName</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="vm">__name__</span>
<span class="n">kwargs</span> <span class="o">=</span> <span class="s1">&#39;, &#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">f</span><span class="s1">&#39;</span><span class="si">{k}</span><span class="s1">=</span><span class="si">{v!r}</span><span class="s1">&#39;</span> <span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__dict__</span><span class="o">.</span><span class="n">items</span><span class="p">())</span>
<span class="k">return</span> <span class="n">f</span><span class="s1">&#39;</span><span class="si">{clsName}</span><span class="s1">(</span><span class="si">{kwargs}</span><span class="s1">)&#39;</span>


<div class="viewcode-block" id="ContractDetails"><a class="viewcode-back" href="../../api.html#ib_insync.objects.ContractDetails">[docs]</a><span class="k">class</span> <span class="nc">ContractDetails</span><span class="p">(</span><span class="n">Object</span><span class="p">):</span>
<span class="n">defaults</span> <span class="o">=</span> <span class="n">ibapi</span><span class="o">.</span><span class="n">contract</span><span class="o">.</span><span class="n">ContractDetails</span><span class="p">()</span><span class="o">.</span><span class="vm">__dict__</span>
<span class="n">defaults</span><span class="p">[</span><span class="s1">&#39;summary&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span>
Expand Down
6 changes: 3 additions & 3 deletions docs/html/_modules/ib_insync/order.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ib_insync.order &#8212; IB-insync 0.8.10 documentation</title>
<title>ib_insync.order &#8212; IB-insync 0.8.11 documentation</title>
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
VERSION: '0.8.10',
VERSION: '0.8.11',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand Down Expand Up @@ -83,7 +83,7 @@ <h1>Source code for ib_insync.order</h1><div class="highlight"><pre>

<span class="kn">import</span> <span class="nn">ibapi</span>

<span class="kn">from</span> <span class="nn">ib_insync.objects</span> <span class="k">import</span> <span class="n">Object</span>
<span class="kn">from</span> <span class="nn">.objects</span> <span class="k">import</span> <span class="n">Object</span>

<span class="n">__all__</span> <span class="o">=</span> <span class="p">(</span><span class="s1">&#39;Trade OrderStatus Order &#39;</span>
<span class="s1">&#39;LimitOrder MarketOrder StopOrder StopLimitOrder&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">split</span><span class="p">()</span>
Expand Down
4 changes: 2 additions & 2 deletions docs/html/_modules/ib_insync/ticker.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ib_insync.ticker &#8212; IB-insync 0.8.10 documentation</title>
<title>ib_insync.ticker &#8212; IB-insync 0.8.11 documentation</title>
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
VERSION: '0.8.10',
VERSION: '0.8.11',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand Down
13 changes: 10 additions & 3 deletions docs/html/_modules/ib_insync/util.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ib_insync.util &#8212; IB-insync 0.8.10 documentation</title>
<title>ib_insync.util &#8212; IB-insync 0.8.11 documentation</title>
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
VERSION: '0.8.10',
VERSION: '0.8.11',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand Down Expand Up @@ -87,7 +87,7 @@ <h1>Source code for ib_insync.util</h1><div class="highlight"><pre>
<span class="kn">import</span> <span class="nn">asyncio</span>
<span class="kn">import</span> <span class="nn">time</span>

<span class="kn">from</span> <span class="nn">ib_insync.objects</span> <span class="k">import</span> <span class="n">Object</span>
<span class="kn">from</span> <span class="nn">ib_insync.objects</span> <span class="k">import</span> <span class="n">Object</span><span class="p">,</span> <span class="n">DynamicObject</span>


<div class="viewcode-block" id="df"><a class="viewcode-back" href="../../api.html#ib_insync.util.df">[docs]</a><span class="k">def</span> <span class="nf">df</span><span class="p">(</span><span class="n">objs</span><span class="p">,</span> <span class="n">labels</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
Expand All @@ -103,6 +103,8 @@ <h1>Source code for ib_insync.util</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="n">Object</span><span class="p">):</span>
<span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="o">.</span><span class="n">from_records</span><span class="p">(</span><span class="n">o</span><span class="o">.</span><span class="n">tuple</span><span class="p">()</span> <span class="k">for</span> <span class="n">o</span> <span class="ow">in</span> <span class="n">objs</span><span class="p">)</span>
<span class="n">df</span><span class="o">.</span><span class="n">columns</span> <span class="o">=</span> <span class="n">obj</span><span class="o">.</span><span class="vm">__class__</span><span class="o">.</span><span class="n">defaults</span>
<span class="k">elif</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="n">DynamicObject</span><span class="p">):</span>
<span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="o">.</span><span class="n">from_records</span><span class="p">(</span><span class="n">o</span><span class="o">.</span><span class="vm">__dict__</span> <span class="k">for</span> <span class="n">o</span> <span class="ow">in</span> <span class="n">objs</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="o">.</span><span class="n">from_records</span><span class="p">(</span><span class="n">objs</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">)</span> <span class="ow">and</span> <span class="nb">hasattr</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="s1">&#39;_fields&#39;</span><span class="p">):</span>
Expand Down Expand Up @@ -245,6 +247,7 @@ <h1>Source code for ib_insync.util</h1><div class="highlight"><pre>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Context manager for timing.</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">title</span><span class="o">=</span><span class="s1">&#39;Run&#39;</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">title</span> <span class="o">=</span> <span class="n">title</span>

Expand All @@ -265,6 +268,7 @@ <h1>Source code for ib_insync.util</h1><div class="highlight"><pre>
<span class="n">asyncio</span><span class="o">.</span><span class="n">Future</span> <span class="o">=</span> <span class="n">asyncio</span><span class="o">.</span><span class="n">futures</span><span class="o">.</span><span class="n">_CFuture</span> <span class="o">=</span> <span class="n">asyncio</span><span class="o">.</span><span class="n">futures</span><span class="o">.</span><span class="n">Future</span> <span class="o">=</span> \
<span class="n">asyncio</span><span class="o">.</span><span class="n">futures</span><span class="o">.</span><span class="n">_PyFuture</span></div>


<div class="viewcode-block" id="syncAwait"><a class="viewcode-back" href="../../api.html#ib_insync.util.syncAwait">[docs]</a><span class="k">def</span> <span class="nf">syncAwait</span><span class="p">(</span><span class="n">future</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Synchronously wait until future is done, accounting for the possibility</span>
Expand All @@ -286,6 +290,7 @@ <h1>Source code for ib_insync.util</h1><div class="highlight"><pre>
<span class="n">result</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">run_until_complete</span><span class="p">(</span><span class="n">future</span><span class="p">)</span>
<span class="k">return</span> <span class="n">result</span></div>


<span class="k">def</span> <span class="nf">_syncAwaitAsyncio</span><span class="p">(</span><span class="n">future</span><span class="p">):</span>
<span class="k">assert</span> <span class="n">asyncio</span><span class="o">.</span><span class="n">Task</span> <span class="ow">is</span> <span class="n">asyncio</span><span class="o">.</span><span class="n">tasks</span><span class="o">.</span><span class="n">_PyTask</span>
<span class="n">loop</span> <span class="o">=</span> <span class="n">asyncio</span><span class="o">.</span><span class="n">get_event_loop</span><span class="p">()</span>
Expand All @@ -305,6 +310,7 @@ <h1>Source code for ib_insync.util</h1><div class="highlight"><pre>
<span class="n">current_tasks</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="n">loop</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
<span class="k">return</span> <span class="n">future</span><span class="o">.</span><span class="n">result</span><span class="p">()</span>


<span class="k">def</span> <span class="nf">_syncAwaitQt</span><span class="p">(</span><span class="n">future</span><span class="p">):</span>
<span class="kn">import</span> <span class="nn">PyQt5.Qt</span> <span class="k">as</span> <span class="nn">qt</span>

Expand All @@ -325,6 +331,7 @@ <h1>Source code for ib_insync.util</h1><div class="highlight"><pre>
<span class="n">register_integration</span><span class="p">(</span><span class="s1">&#39;asyncio&#39;</span><span class="p">)(</span><span class="n">_ipython_loop_asyncio</span><span class="p">)</span>
<span class="n">enable_gui</span><span class="p">(</span><span class="s1">&#39;asyncio&#39;</span><span class="p">)</span></div>


<span class="k">def</span> <span class="nf">_ipython_loop_asyncio</span><span class="p">(</span><span class="n">kernel</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;</span>
<span class="sd"> Use asyncio event loop for the given IPython kernel.</span>
Expand Down
4 changes: 2 additions & 2 deletions docs/html/_modules/ib_insync/wrapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ib_insync.wrapper &#8212; IB-insync 0.8.10 documentation</title>
<title>ib_insync.wrapper &#8212; IB-insync 0.8.11 documentation</title>
<link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
VERSION: '0.8.10',
VERSION: '0.8.11',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand Down
5 changes: 3 additions & 2 deletions docs/html/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Overview: module code &#8212; IB-insync 0.8.10 documentation</title>
<title>Overview: module code &#8212; IB-insync 0.8.11 documentation</title>
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.8.10',
VERSION: '0.8.11',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand Down Expand Up @@ -82,6 +82,7 @@ <h1>All modules for which code is available</h1>
<ul><li><a href="ib_insync/client.html">ib_insync.client</a></li>
<li><a href="ib_insync/clientqt.html">ib_insync.clientqt</a></li>
<li><a href="ib_insync/contract.html">ib_insync.contract</a></li>
<li><a href="ib_insync/flexreport.html">ib_insync.flexreport</a></li>
<li><a href="ib_insync/ib.html">ib_insync.ib</a></li>
<li><a href="ib_insync/object.html">ib_insync.object</a></li>
<li><a href="ib_insync/objects.html">ib_insync.objects</a></li>
Expand Down
5 changes: 5 additions & 0 deletions docs/html/_sources/api.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,8 @@ Utilities
---------

.. automodule:: ib_insync.util

FlexReport
----------

.. automodule:: ib_insync.flexreport
Loading

0 comments on commit 241116e

Please sign in to comment.