Skip to main content

Fundcrunch library

Is a market data streaming and history library built from a core of cross-exchange cryptocurrency assets management system. It amid to reduce efforts in trading and investment management.

  • connect directly to various exchanges
  • connector to Fundcrunch.Tech data streaming socket and REST endpoints

it build on Multiprocessing and Threading and has mudalar structure with streaming over ZeroMQ libaray.

Installation

$ pip install fundcrunch

Install from source

$ git clone git@github.com:fundcrunch-tech/fundcrunch_py.git
$ cd fundcrunch_py
$ python3.7 -m venv .venv
$ source .venv/bin/activate
$ python setup.py install
$ cd examples
$ python feeder.py

Streaming

import json
from fundcrunch import Feeder

feeder_conf = { 'port': [9001, 8010, 7001],
               'addr': '0.0.0.0',
               'exchanges': [{'name': 'binance',
                              'pairs': ['BTC/USDT'],
                              'mode': ['order_book', 'trades', 'ohlc']}]
             }

subscribe = ['ohlc-binance-BTC_USDT',
             'ob-binance-BTC_USDT',
             'trade-binance-BTC_USDT',]
             
feeder = Feeder(config=feeder_conf, subscribe=subscribe)
feeder.start()

while True:
  rcv = feeder.output.get()
  topic, payload = rcv.split(b'@',1)
  print(topic, json.loads(payload).keys())

History

from fundcrunch.utils import History

exhanges = ['binance', 'bittrex']
ohlc = ['1h', '1d']

history = History()

for i in exhanges:
    for j in ohlc:
        history.update_ohlc(i, j, ['BTC/USDT'])

for i in history.exchanges():
    markets = history.exchange_symbols(i)
    print('binance', markets)

symbol =  history.get_symbol('binance', 'BTC/USDT')
print(symbol['ohlc']['1d'].tail())
print(symbol['ohlc']['1h'].tail())

Metadata

Release files for fundcrunch 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fundcrunch 0.1.3
File Size Uploaded Provenance Actions
fundcrunch-0.1.3.tar.gz 23.1 kB Without provenance Details for fundcrunch-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fundcrunch 0.1.3
File Interpreter ABI Platform Actions
fundcrunch-0.1.3-py3.8.egg Legacy Egg format - - Details for fundcrunch-0.1.3-py3.8.egg

Total release size: 82.4 kB

Release files / fundcrunch-0.1.3.tar.gz

Download URL fundcrunch-0.1.3.tar.gz
Size 23.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b9d0a27c014ea7774ef79b17ff5fa4cebdc7211a878a4d27f6d31d7805f7793a
BLAKE2b-256 checksum
How to use checksums
6bdbbe70ee1df914be5c84f939ee924fd79bc72b225d9c5090c188cc178ab447
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.1

Release files / fundcrunch-0.1.3-py3.8.egg

Download URL fundcrunch-0.1.3-py3.8.egg
Size 59.3 kB
Tags Egg
SHA-256 checksum
How to use checksums
a0766808fa918c5752f948f31e750f9af3d3ecdb04b659010a017b8fb3e37730
BLAKE2b-256 checksum
How to use checksums
f2416a7f4eba2e2a1f750e49a8e8eb9a45e013c54f4460342ce1185beffd6b86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.8.1

Security for fundcrunch 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page