Skip to content

Commit 315fcd9

Browse files
author
Ivan Mishalkin
committed
[EN-1335] rst docs edited
1 parent 551d491 commit 315fcd9

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

docs/basic_usage.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ create. One connection may have several subscriptions.
3131
'Trade', 'Quote', 'Summary', 'Profile', 'Order', 'TimeAndSale', 'Candle', 'TradeETH', 'SpreadOrder',
3232
'Greeks', 'TheoPrice', 'Underlying', 'Series', 'Configuration' event types are supported.
3333

34-
Each subscription should be provided with tickers to get events for:
35-
36-
.. code-block:: python
37-
38-
dx.dxf_add_symbols(sub1, ['AAPL', 'MSFT'])
39-
dx.dxf_add_symbols(sub2, ['AAPL', 'C'])
40-
4134
Special function called listener should be attached to the subscription to start receiving
4235
events. There are default listeners already implemented in dxpyfeed, but you
4336
can write your own with cython: :ref:`custom_listener`. To attach
@@ -48,6 +41,13 @@ default listener just call `dxf_attach_listener`
4841
dx.dxf_attach_listener(sub1)
4942
dx.dxf_attach_listener(sub2)
5043
44+
Each subscription should be provided with tickers to get events for:
45+
46+
.. code-block:: python
47+
48+
dx.dxf_add_symbols(sub1, ['AAPL', 'MSFT'])
49+
dx.dxf_add_symbols(sub2, ['AAPL', 'C'])
50+
5151
The data can be extracted with `get_data()` method. It is stored as dict with list of columns and list
5252
of events. Note that `get_data` extracts the data and then clean the field. To look at data call this property:
5353

docs/custom_listener.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,19 +127,19 @@ You can either import extension built on previous step or install your extension
127127
128128
con = dx.dxf_create_connection()
129129
sub = dx.dxf_create_subscription(con, 'Trade')
130-
dx.dxf_add_symbols(sub, ['AAPL', 'MSFT'])
131130
132131
Attach custom listener, specifying the columns
133132

134133
.. code:: ipython3
135134
136135
dx.dxf_attach_custom_listener(sub, cust.tc, ['Symbol', 'Price'])
136+
dx.dxf_add_symbols(sub, ['AAPL', 'MSFT'])
137137
138138
After some time you will get the data.
139139

140140
.. code:: ipython3
141141
142-
sub.gat_data()
142+
sub.get_data()
143143
144144
.. code:: ipython3
145145

0 commit comments

Comments
 (0)