Skip to content

Commit

Permalink
Deploying to gh-pages from @ 7840aaf 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
chipkent committed Sep 11, 2024
1 parent 1302e82 commit 2d11822
Show file tree
Hide file tree
Showing 16 changed files with 122 additions and 57 deletions.
40 changes: 38 additions & 2 deletions _modules/deephaven_ib.html
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,8 @@ <h1>Source code for deephaven_ib</h1><div class="highlight"><pre>
<span class="sd"> * **accounts_summary**: account summary. Automatically populated.</span>
<span class="sd"> * **accounts_positions**: account positions. Automatically populated.</span>
<span class="sd"> * **accounts_pnl**: account PNL. Automatically populated.</span>

<span class="sd"> * **accounts_pnl_single**: single PNL. populated by calling request_single_pnl() on a specific contract.</span>
<span class="sd"> </span>
<span class="sd"> ####</span>
<span class="sd"> # News</span>
<span class="sd"> ####</span>
Expand Down Expand Up @@ -1014,6 +1015,15 @@ <h1>Source code for deephaven_ib</h1><div class="highlight"><pre>
<span class="o">.</span><span class="n">move_columns_up</span><span class="p">([</span><span class="s2">&quot;RequestId&quot;</span><span class="p">,</span> <span class="s2">&quot;ReceiveTime&quot;</span><span class="p">,</span> <span class="s2">&quot;Account&quot;</span><span class="p">,</span> <span class="s2">&quot;ModelCode&quot;</span><span class="p">])</span> \
<span class="o">.</span><span class="n">drop_columns</span><span class="p">(</span><span class="s2">&quot;Note&quot;</span><span class="p">)</span> \
<span class="o">.</span><span class="n">last_by</span><span class="p">(</span><span class="s2">&quot;RequestId&quot;</span><span class="p">),</span>
<span class="s2">&quot;accounts_pnl_single&quot;</span><span class="p">:</span> <span class="n">tables_raw</span><span class="p">[</span><span class="s2">&quot;raw_accounts_pnl_single&quot;</span><span class="p">]</span> \
<span class="o">.</span><span class="n">natural_join</span><span class="p">(</span><span class="n">tables_raw</span><span class="p">[</span><span class="s2">&quot;raw_requests&quot;</span><span class="p">],</span> <span class="n">on</span><span class="o">=</span><span class="s2">&quot;RequestId&quot;</span><span class="p">,</span> <span class="n">joins</span><span class="o">=</span><span class="s2">&quot;Note&quot;</span><span class="p">)</span> \
<span class="o">.</span><span class="n">update</span><span class="p">([</span>
<span class="s2">&quot;Account=(String)deephaven_ib_parse_note(Note,`account`)&quot;</span><span class="p">,</span>
<span class="s2">&quot;ModelCode=(String)deephaven_ib_parse_note(Note,`model_code`)&quot;</span><span class="p">,</span>
<span class="s2">&quot;ConId=(String)deephaven_ib_parse_note(Note,`conid`)&quot;</span><span class="p">])</span> \
<span class="o">.</span><span class="n">move_columns_up</span><span class="p">([</span><span class="s2">&quot;RequestId&quot;</span><span class="p">,</span> <span class="s2">&quot;ReceiveTime&quot;</span><span class="p">,</span> <span class="s2">&quot;Account&quot;</span><span class="p">,</span> <span class="s2">&quot;ModelCode&quot;</span><span class="p">,</span> <span class="s2">&quot;ConId&quot;</span><span class="p">])</span> \
<span class="o">.</span><span class="n">drop_columns</span><span class="p">(</span><span class="s2">&quot;Note&quot;</span><span class="p">)</span> \
<span class="o">.</span><span class="n">last_by</span><span class="p">(</span><span class="s2">&quot;RequestId&quot;</span><span class="p">),</span>
<span class="s2">&quot;contracts_matching&quot;</span><span class="p">:</span> <span class="n">tables_raw</span><span class="p">[</span><span class="s2">&quot;raw_contracts_matching&quot;</span><span class="p">]</span> \
<span class="o">.</span><span class="n">natural_join</span><span class="p">(</span><span class="n">tables_raw</span><span class="p">[</span><span class="s2">&quot;raw_requests&quot;</span><span class="p">],</span> <span class="n">on</span><span class="o">=</span><span class="s2">&quot;RequestId&quot;</span><span class="p">,</span> <span class="n">joins</span><span class="o">=</span><span class="s2">&quot;Pattern=Note&quot;</span><span class="p">)</span> \
<span class="o">.</span><span class="n">move_columns_up</span><span class="p">([</span><span class="s2">&quot;RequestId&quot;</span><span class="p">,</span> <span class="s2">&quot;ReceiveTime&quot;</span><span class="p">,</span> <span class="s2">&quot;Pattern&quot;</span><span class="p">])</span> \
Expand Down Expand Up @@ -1197,6 +1207,27 @@ <h1>Source code for deephaven_ib</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">Request</span><span class="p">(</span><span class="n">request_id</span><span class="o">=</span><span class="n">req_id</span><span class="p">)</span></div>


<div class="viewcode-block" id="IbSessionTws.request_single_pnl">
<a class="viewcode-back" href="../code/deephaven_ib.html#deephaven_ib.IbSessionTws.request_single_pnl">[docs]</a>
<span class="k">def</span> <span class="nf">request_single_pnl</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">contract</span><span class="p">:</span> <span class="n">RegisteredContract</span><span class="p">,</span> <span class="n">account</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">model_code</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Request</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Request PNL updates for a single position. Results are returned in the ``accounts_pnl_single`` table.</span>

<span class="sd"> Args:</span>
<span class="sd"> contract (RegisteredContract): contract data is requested for.</span>
<span class="sd"> account (str): Account to request PNL for.</span>
<span class="sd"> model_code (str): Model portfolio code to request PNL for.</span>

<span class="sd"> Returns:</span>
<span class="sd"> A Request.</span>

<span class="sd"> Raises:</span>
<span class="sd"> Exception: problem executing action.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_assert_connected</span><span class="p">()</span>
<span class="n">req_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_client</span><span class="o">.</span><span class="n">request_single_pnl</span><span class="p">(</span><span class="n">account</span><span class="p">,</span> <span class="n">model_code</span><span class="p">,</span> <span class="n">contract</span><span class="o">.</span><span class="n">contract_details</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">contract</span><span class="o">.</span><span class="n">conId</span><span class="p">)</span>
<span class="k">return</span> <span class="n">Request</span><span class="p">(</span><span class="n">request_id</span><span class="o">=</span><span class="n">req_id</span><span class="p">)</span></div>



<span class="c1">####################################################################################################################</span>
<span class="c1">####################################################################################################################</span>
Expand Down Expand Up @@ -1603,7 +1634,12 @@ <h1>Source code for deephaven_ib</h1><div class="highlight"><pre>
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;RegisteredContracts with multiple contract details are not supported for orders: </span><span class="si">{</span><span class="n">contract</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>

<span class="n">req_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_client</span><span class="o">.</span><span class="n">next_order_id</span><span class="p">()</span>
<span class="k">if</span> <span class="n">order</span><span class="o">.</span><span class="n">orderId</span> <span class="o">==</span> <span class="mi">0</span> <span class="ow">or</span> <span class="n">order</span><span class="o">.</span><span class="n">orderId</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">req_id</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_client</span><span class="o">.</span><span class="n">next_order_id</span><span class="p">()</span>
<span class="n">order</span><span class="o">.</span><span class="n">orderId</span> <span class="o">=</span> <span class="n">req_id</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">req_id</span> <span class="o">=</span> <span class="n">order</span><span class="o">.</span><span class="n">orderId</span>

<span class="n">cd</span> <span class="o">=</span> <span class="n">contract</span><span class="o">.</span><span class="n">contract_details</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_client</span><span class="o">.</span><span class="n">log_request</span><span class="p">(</span><span class="n">req_id</span><span class="p">,</span> <span class="s2">&quot;PlaceOrder&quot;</span><span class="p">,</span> <span class="n">cd</span><span class="o">.</span><span class="n">contract</span><span class="p">,</span> <span class="p">{</span><span class="s2">&quot;order&quot;</span><span class="p">:</span> <span class="sa">f</span><span class="s2">&quot;Order(</span><span class="si">{</span><span class="n">order</span><span class="si">}</span><span class="s2">)&quot;</span><span class="p">})</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_client</span><span class="o">.</span><span class="n">placeOrder</span><span class="p">(</span><span class="n">req_id</span><span class="p">,</span> <span class="n">cd</span><span class="o">.</span><span class="n">contract</span><span class="p">,</span> <span class="n">order</span><span class="p">)</span>
Expand Down
4 changes: 2 additions & 2 deletions code/deephaven.column.html
Original file line number Diff line number Diff line change
Expand Up @@ -371,13 +371,13 @@
<p>An enumeration.</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="deephaven.column.ColumnType.NORMAL">
<span class="sig-name descname"><span class="pre">NORMAL</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">io.deephaven.engine.table.ColumnDefinition$ColumnType(objectRef=0x561e8cb46780)</span></em><a class="headerlink" href="#deephaven.column.ColumnType.NORMAL" title="Link to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">NORMAL</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">io.deephaven.engine.table.ColumnDefinition$ColumnType(objectRef=0x5607dfcf3a00)</span></em><a class="headerlink" href="#deephaven.column.ColumnType.NORMAL" title="Link to this definition"></a></dt>
<dd><p>A regular column.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="deephaven.column.ColumnType.PARTITIONING">
<span class="sig-name descname"><span class="pre">PARTITIONING</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">io.deephaven.engine.table.ColumnDefinition$ColumnType(objectRef=0x561e8cb46788)</span></em><a class="headerlink" href="#deephaven.column.ColumnType.PARTITIONING" title="Link to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">PARTITIONING</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">io.deephaven.engine.table.ColumnDefinition$ColumnType(objectRef=0x5607dfcf3a08)</span></em><a class="headerlink" href="#deephaven.column.ColumnType.PARTITIONING" title="Link to this definition"></a></dt>
<dd><p>A partitioning column.</p>
</dd></dl>

Expand Down
4 changes: 2 additions & 2 deletions code/deephaven.filters.html
Original file line number Diff line number Diff line change
Expand Up @@ -408,13 +408,13 @@
<p>The regex mode to use</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="deephaven.filters.PatternMode.FIND">
<span class="sig-name descname"><span class="pre">FIND</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">io.deephaven.api.filter.FilterPattern$Mode(objectRef=0x561e8cb658d0)</span></em><a class="headerlink" href="#deephaven.filters.PatternMode.FIND" title="Link to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">FIND</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">io.deephaven.api.filter.FilterPattern$Mode(objectRef=0x5607dfd13150)</span></em><a class="headerlink" href="#deephaven.filters.PatternMode.FIND" title="Link to this definition"></a></dt>
<dd><p>Matches any subsequence of the input against the pattern</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="deephaven.filters.PatternMode.MATCHES">
<span class="sig-name descname"><span class="pre">MATCHES</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">io.deephaven.api.filter.FilterPattern$Mode(objectRef=0x561e8cb658d8)</span></em><a class="headerlink" href="#deephaven.filters.PatternMode.MATCHES" title="Link to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">MATCHES</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">io.deephaven.api.filter.FilterPattern$Mode(objectRef=0x5607dfd13158)</span></em><a class="headerlink" href="#deephaven.filters.PatternMode.MATCHES" title="Link to this definition"></a></dt>
<dd><p>Matches the entire input against the pattern</p>
</dd></dl>

Expand Down
8 changes: 4 additions & 4 deletions code/deephaven.plot.font.html
Original file line number Diff line number Diff line change
Expand Up @@ -377,25 +377,25 @@
<p>An enum of predefined font styles.</p>
<dl class="py attribute">
<dt class="sig sig-object py" id="deephaven.plot.font.FontStyle.BOLD">
<span class="sig-name descname"><span class="pre">BOLD</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">io.deephaven.plot.Font$FontStyle(objectRef=0x561e8d2b2e78)</span></em><a class="headerlink" href="#deephaven.plot.font.FontStyle.BOLD" title="Link to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">BOLD</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">io.deephaven.plot.Font$FontStyle(objectRef=0x5607e0421d70)</span></em><a class="headerlink" href="#deephaven.plot.font.FontStyle.BOLD" title="Link to this definition"></a></dt>
<dd><p>Bold text</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="deephaven.plot.font.FontStyle.BOLD_ITALIC">
<span class="sig-name descname"><span class="pre">BOLD_ITALIC</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">io.deephaven.plot.Font$FontStyle(objectRef=0x561e8d2b2e88)</span></em><a class="headerlink" href="#deephaven.plot.font.FontStyle.BOLD_ITALIC" title="Link to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">BOLD_ITALIC</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">io.deephaven.plot.Font$FontStyle(objectRef=0x5607e0421d80)</span></em><a class="headerlink" href="#deephaven.plot.font.FontStyle.BOLD_ITALIC" title="Link to this definition"></a></dt>
<dd><p>Bold and italic text</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="deephaven.plot.font.FontStyle.ITALIC">
<span class="sig-name descname"><span class="pre">ITALIC</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">io.deephaven.plot.Font$FontStyle(objectRef=0x561e8d2b2e80)</span></em><a class="headerlink" href="#deephaven.plot.font.FontStyle.ITALIC" title="Link to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">ITALIC</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">io.deephaven.plot.Font$FontStyle(objectRef=0x5607e0421d78)</span></em><a class="headerlink" href="#deephaven.plot.font.FontStyle.ITALIC" title="Link to this definition"></a></dt>
<dd><p>Italic text</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="deephaven.plot.font.FontStyle.PLAIN">
<span class="sig-name descname"><span class="pre">PLAIN</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">io.deephaven.plot.Font$FontStyle(objectRef=0x561e8d2b2e70)</span></em><a class="headerlink" href="#deephaven.plot.font.FontStyle.PLAIN" title="Link to this definition"></a></dt>
<span class="sig-name descname"><span class="pre">PLAIN</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">io.deephaven.plot.Font$FontStyle(objectRef=0x5607e0421d68)</span></em><a class="headerlink" href="#deephaven.plot.font.FontStyle.PLAIN" title="Link to this definition"></a></dt>
<dd><p>Plain text.</p>
</dd></dl>

Expand Down
Loading

0 comments on commit 2d11822

Please sign in to comment.