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 most recent history with .get()
import pandas as pd
from tradingfeatures import bitfinex, bitstamp, binance, bitmex
bitfinex = bitfinex()
df = bitfinex.get()
This is useful to get most recent history. But limit is 10000 for Bitfinex and 1000 for others.
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
tradingfeatures-0.5.0.tar.gz
(9.7 kB
view hashes)
Built Distribution
Close
Hashes for tradingfeatures-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1421a2d8e011a1494a3558fe8498097eeb0b6edc43554ccc6f75d110734dd648 |
|
MD5 | fbedd388e23235e43c48e1d4a1a6dee2 |
|
BLAKE2b-256 | c70c25f94da44dadbe84e95b39061c7bb51a7362bb7a1fb1e70803fe90d92d12 |