Skip to content

Commit 29d3396

Browse files
committed
[EN-1454] Example partly finished
1 parent 860bd56 commit 29d3396

File tree

2 files changed

+129
-2
lines changed

2 files changed

+129
-2
lines changed

dxfeed/core/listeners/listener.pyx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ cdef void underlying_default_listener(int event_type,
270270
underlying[i].back_volatility,
271271
underlying[i].put_call_ratio])
272272

273-
SERIES_COLUMNS = ['Symbol', 'EventFlags', 'Index', 'Time', 'Sequence', 'Sequence', 'Expiration', 'Volatility',
273+
SERIES_COLUMNS = ['Symbol', 'EventFlags', 'Index', 'Time', 'Sequence', 'Expiration', 'Volatility',
274274
'PutCallRatio', 'ForwardPrice', 'Dividend', 'Interest']
275275
cdef void series_default_listener(int event_type,
276276
dxf_const_string_t symbol_name,
@@ -286,7 +286,6 @@ cdef void series_default_listener(int event_type,
286286
series[i].index,
287287
series[i].time,
288288
series[i].sequence,
289-
series[i].sequence,
290289
series[i].expiration,
291290
series[i].volatility,
292291
series[i].put_call_ratio,

examples/AllSubscriptionsExample.ipynb

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,134 @@
233233
"order_sub.get_event_handler().get_dataframe().head(3)"
234234
]
235235
},
236+
{
237+
"cell_type": "markdown",
238+
"metadata": {},
239+
"source": [
240+
"### Greeks\n",
241+
"Details: https://kb.dxfeed.com/display/DS/dxFeed+API+Market+Events#dxFeedAPIMarketEvents-Greeks"
242+
]
243+
},
244+
{
245+
"cell_type": "code",
246+
"execution_count": null,
247+
"metadata": {},
248+
"outputs": [],
249+
"source": [
250+
"greek_sub = endpoint.create_subscription('Greeks', date_time=date_time).add_symbols(symbols)"
251+
]
252+
},
253+
{
254+
"cell_type": "code",
255+
"execution_count": null,
256+
"metadata": {},
257+
"outputs": [],
258+
"source": [
259+
"greek_sub.get_event_handler().get_dataframe().head(3)"
260+
]
261+
},
262+
{
263+
"cell_type": "markdown",
264+
"metadata": {},
265+
"source": [
266+
"### TheoPrice"
267+
]
268+
},
269+
{
270+
"cell_type": "code",
271+
"execution_count": null,
272+
"metadata": {},
273+
"outputs": [],
274+
"source": [
275+
"theo_sub = endpoint.create_subscription('TheoPrice').add_symbols(symbols)"
276+
]
277+
},
278+
{
279+
"cell_type": "code",
280+
"execution_count": null,
281+
"metadata": {},
282+
"outputs": [],
283+
"source": [
284+
"theo_sub.get_event_handler().get_dataframe().head(3)"
285+
]
286+
},
287+
{
288+
"cell_type": "markdown",
289+
"metadata": {},
290+
"source": [
291+
"### Underlying\n",
292+
"Details: https://kb.dxfeed.com/display/DS/dxFeed+API+Market+Events#dxFeedAPIMarketEvents-Underlying"
293+
]
294+
},
295+
{
296+
"cell_type": "code",
297+
"execution_count": null,
298+
"metadata": {},
299+
"outputs": [],
300+
"source": [
301+
"underlying_sub = endpoint.create_subscription('Underlying').add_symbols(symbols)"
302+
]
303+
},
304+
{
305+
"cell_type": "code",
306+
"execution_count": null,
307+
"metadata": {},
308+
"outputs": [],
309+
"source": [
310+
"underlying_sub.get_event_handler().get_dataframe().head(3)"
311+
]
312+
},
313+
{
314+
"cell_type": "markdown",
315+
"metadata": {},
316+
"source": [
317+
"### Series\n",
318+
"Details:"
319+
]
320+
},
321+
{
322+
"cell_type": "code",
323+
"execution_count": null,
324+
"metadata": {},
325+
"outputs": [],
326+
"source": [
327+
"series_sub = endpoint.create_subscription('Series').add_symbols(symbols)"
328+
]
329+
},
330+
{
331+
"cell_type": "code",
332+
"execution_count": null,
333+
"metadata": {},
334+
"outputs": [],
335+
"source": [
336+
"series_sub.get_event_handler().get_dataframe().head(3)"
337+
]
338+
},
339+
{
340+
"cell_type": "markdown",
341+
"metadata": {},
342+
"source": [
343+
"### Configuration"
344+
]
345+
},
346+
{
347+
"cell_type": "code",
348+
"execution_count": null,
349+
"metadata": {},
350+
"outputs": [],
351+
"source": [
352+
"config_sub = endpoint.create_subscription('Configuration').add_symbols(symbols)"
353+
]
354+
},
355+
{
356+
"cell_type": "code",
357+
"execution_count": null,
358+
"metadata": {},
359+
"outputs": [],
360+
"source": [
361+
"config_sub.get_event_handler().get_dataframe().head(3)"
362+
]
363+
},
236364
{
237365
"cell_type": "markdown",
238366
"metadata": {},

0 commit comments

Comments
 (0)