A useful tool to download market history from popular exchanges.
Project description
tradingfeatures
A useful tool to download market history from popular exchanges.
Installation
pip install tradingfeatures
or
pip install git+https://github.com/realiti4/tradingfeatures.git@master --upgrade
Example
You can use .get()
, .get_history()
and .update()
with all avaliable apis. Currently supported:
- Bitfinex
- Bitstamp
- Binance
- Bitmex
Get history with .get()
import pandas as pd
from tradingfeatures import bitfinex, bitstamp, binance, bitmex
bitfinex = bitfinex()
df = bitfinex.get(2000)
Just pass how much data you want. It will return the amount in most recent 1h data. Currently only 1h data is supported. If history amount is above api limit, .get()
will run .get_history()
under the hood, so you don't need to worry about it. But if you want everything and don't want to guess how much data avaliable on each exchange, just run .get_history()
and get everything.
Download all available history with .get_history()
The tool will download all avaliable history while respecting request per minute limits. Using it easy, and it takes couple of minutes for 1h data.
import pandas as pd
from tradingfeatures import bitfinex, bitstamp, binance, bitmex
bitstamp = bitstamp()
df = bitstamp.get_hist()
df.to_csv('bitstamp_1h.csv')
Updating a csv file with .update()
import pandas as pd
from tradingfeatures import bitfinex, bitstamp, binance, bitmex
bitstamp = bitstamp()
bitstamp.update_csv('bitstamp.csv')
Update takes a path variable to csv file and updates it.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for tradingfeatures-0.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db3809709656e9ebf6f889d57da86461b21a414e9efaac1c0e234e2a868f8f72 |
|
MD5 | e5f775b786615b1996a1deff72674e94 |
|
BLAKE2b-256 | efd3135cf4bd3c15d09247e16859c4a5a4bf13324c8e96ea48578889a5f97a11 |