Skip to main content

DXFeed Python API via C API

Project description

dxfeed package

PyPI Documentation Status

This package provides access to dxFeed streaming data. The library is build as a thin wrapper over dxFeed C-API library. We use Cython in this project as it combines flexibility, reliability and usability in writing C extensions.

This package already contains basic C-API functions related to creating connections, subscriptions etc. Moreover default listeners (functions responsible for event processing) are ready to use. The user is also able to write his own custom listener in Cython

Installation

Requirements: python >3.6, pandas

pip3 install pandas

Install package via PyPI

pip3 install dxfeed

Basic usage

All the functions in C API have similar ones in Python with the same name. Not all arguments are supported by now, this work is in progress.

Import dxfeed library:

import dxfeed as dx

Create connection:

con = dx.dxf_create_connection(address='demo.dxfeed.com:7300')

Create one or several subscriptions of certain event types:

sub1 = dx.dxf_create_subscription(con, 'Trade')
sub2 = dx.dxf_create_subscription(con, 'Quote')

'Trade', 'Quote', 'Summary', 'Profile', 'Order', 'TimeAndSale', 'Candle', 'TradeETH', 'SpreadOrder', 'Greeks', 'TheoPrice', 'Underlying', 'Series', 'Configuration' event types are supported.

Attach listeners:

dx.dxf_attach_listener(sub1)
dx.dxf_attach_listener(sub2)

Add tickers you want to get data for:

dx.dxf_add_symbols(sub1, ['AAPL', 'MSFT'])
dx.dxf_add_symbols(sub2, ['AAPL', 'C'])

dxfeed has default listeners for each event type, but you are able to write your custom one. You can find how to do it at example/Custom listener example.ipynb.

Look at the data:

sub1.get_data()
sub2.get_data()

The data is stored in Subscription class. You can also turn dict to pandas DataFrame simply calling sub1.to_dataframe().

Detach the listener, if you want to stop recieving data:

dx.dxf_detach_listener(sub1)
dx.dxf_detach_listener(sub2)

Finally, close your connection:

dx.dxf_close_connection(con)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dxfeed-0.2.1.tar.gz (406.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dxfeed-0.2.1-cp38-cp38m-win_amd64.whl (725.4 kB view details)

Uploaded CPython 3.8mWindows x86-64

dxfeed-0.2.1-cp38-cp38-macosx_10_14_x86_64.whl (733.1 kB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

dxfeed-0.2.1-cp37-cp37m-win_amd64.whl (722.7 kB view details)

Uploaded CPython 3.7mWindows x86-64

dxfeed-0.2.1-cp37-cp37m-macosx_10_14_x86_64.whl (731.3 kB view details)

Uploaded CPython 3.7mmacOS 10.14+ x86-64

dxfeed-0.2.1-cp36-cp36m-win_amd64.whl (722.7 kB view details)

Uploaded CPython 3.6mWindows x86-64

dxfeed-0.2.1-cp36-cp36m-macosx_10_14_x86_64.whl (735.8 kB view details)

Uploaded CPython 3.6mmacOS 10.14+ x86-64

File details

Details for the file dxfeed-0.2.1.tar.gz.

File metadata

  • Download URL: dxfeed-0.2.1.tar.gz
  • Upload date:
  • Size: 406.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.7 Linux/5.3.0-1020-azure

File hashes

Hashes for dxfeed-0.2.1.tar.gz
Algorithm Hash digest
SHA256 4cd2eeb34fc8a4dd2394fcd6b836d185b0ed823a8aace7ca9720b6ea7633a20a
MD5 9b9bf060f886e488c5f46cbebe0d5ba2
BLAKE2b-256 27c491a7dba63c7b70d6d7a9a50cb7bd17db3672bf6dd07b7da8de6fa32d27a1

See more details on using hashes here.

File details

Details for the file dxfeed-0.2.1-cp38-cp38m-win_amd64.whl.

File metadata

  • Download URL: dxfeed-0.2.1-cp38-cp38m-win_amd64.whl
  • Upload date:
  • Size: 725.4 kB
  • Tags: CPython 3.8m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.7 Linux/5.3.0-1020-azure

File hashes

Hashes for dxfeed-0.2.1-cp38-cp38m-win_amd64.whl
Algorithm Hash digest
SHA256 f97a939e306e9f6f7b414599c205e86ad2b057e74164efca3919aae28022408e
MD5 324b48f49cd7f4a5cbaf86caba8e51a3
BLAKE2b-256 ad32e7cfb4cdf63ec06a1bedfba096cad700559033497fb583e183734cf7d72d

See more details on using hashes here.

File details

Details for the file dxfeed-0.2.1-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: dxfeed-0.2.1-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 733.1 kB
  • Tags: CPython 3.8, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.7 Linux/5.3.0-1020-azure

File hashes

Hashes for dxfeed-0.2.1-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 5b32b1a0b59b58dc72d35be6f14cb9b86ac1404e4e62eef7617d1dce8017aca9
MD5 689fe7386536469d25fe3497927ed4e4
BLAKE2b-256 489c746285036a7eed0efd2a89a09d47ca929295bd76ed896b626e13c059df33

See more details on using hashes here.

File details

Details for the file dxfeed-0.2.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: dxfeed-0.2.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 722.7 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.7 Linux/5.3.0-1020-azure

File hashes

Hashes for dxfeed-0.2.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 09b529c71170b8a4bd753e14e326be7c84d9c36efac9ca5161060376af9bdfa5
MD5 42ecac5ad89052b578cd64f7f7c0f163
BLAKE2b-256 ae329e81c7cf447f548357d3aa48530b044f6077136d8cee6c691c08c61e7b90

See more details on using hashes here.

File details

Details for the file dxfeed-0.2.1-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: dxfeed-0.2.1-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 731.3 kB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.7 Linux/5.3.0-1020-azure

File hashes

Hashes for dxfeed-0.2.1-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 f1839e45a81d3309a8920687bc6117c3e11a44753243b3f5ba12218ec0fd0f6c
MD5 06ab3e4d121cc26593f9dce5f73e60c1
BLAKE2b-256 21075a4cc99b9758f6d347c35e82f71d42ec946b8765d2abe7184e29d96faa3b

See more details on using hashes here.

File details

Details for the file dxfeed-0.2.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: dxfeed-0.2.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 722.7 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.7 Linux/5.3.0-1020-azure

File hashes

Hashes for dxfeed-0.2.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 a050d76573ff56f08b80b6a03454464b3bd976a7f868385b50d95b71a8e0f23e
MD5 fa9824a476743bf83ab49ced704599f5
BLAKE2b-256 8bb89df1607a44d9e8926f6dbaa95abf97373477be2fd56632167e94f5ca50ed

See more details on using hashes here.

File details

Details for the file dxfeed-0.2.1-cp36-cp36m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: dxfeed-0.2.1-cp36-cp36m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 735.8 kB
  • Tags: CPython 3.6m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.7 Linux/5.3.0-1020-azure

File hashes

Hashes for dxfeed-0.2.1-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 d63238e11754de88a01d0c9e2cbfece8584cdc36c42d7d779884a4b579d3af7f
MD5 70eaeb835b61609c427a1ae10e539295
BLAKE2b-256 f1fae26be1e0479a88d6e25d4fe79756b0f23cb34d280601ae18a7447e3b8d08

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page