tradingfeatures


Nametradingfeatures JSON
Version 0.7.4 PyPI version JSON
download
home_pagehttps://github.com/realiti4/tradingfeatures
SummaryA useful tool to download market history from popular exchanges.
upload_time2024-02-05 10:08:48
maintainer
docs_urlNone
authorOnur Cetinkol
requires_python>=3.6
license
keywords download market history binance bitfinex bitmex bitstamp
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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
- `.get()`: Returns most recent history amount you pass.
- `.get_history()`: Downloads all avaliable history for that api.
- `.update()`: Takes a csv file path and updates it.

You can use `.get()`, `.get_history()` and `.update()` with all avaliable apis. Currently supported:

* `bitfinex`
* `bitstamp`
* `binance`
  * `binance.funding`
* `bitmex`
  * `bitmex.funding`
  * `bitmex.quote`

Supported symbols: `btcusd`, `ethusd`, `ltcusd`. These are guaranteed to work with every module. You can stil use any symbol that an exchange supports. But same pair is different for each exchange of course. Using an unsupported symbol will give you a warning, but it should work just fine as long as you are using a correct symbol for that api.


### Get history with .get()

    import pandas as pd
    from tradingfeatures import bitfinex, bitstamp, binance, bitmex

    bitfinex = bitfinex()

    df = bitfinex.get(2000)
    
    df2 = bitfinex.get(2000, symbol='ethusd')   # Default is btcusd, you can pass others in symbol parameter

    df3 = bitfinex.get(20000, interval='1m')    # You can pass any interval that exchange api supports

Just pass how much data you want. It will return the amount in most recent 1h data. 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 avaliable on an exchange, just run `.get_history()`.

### 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('bitstamp.csv')    

Update takes a path variable to csv file and updates it.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/realiti4/tradingfeatures",
    "name": "tradingfeatures",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "download market history binance bitfinex bitmex bitstamp",
    "author": "Onur Cetinkol",
    "author_email": "realiti44@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/22/f4/b9fc364c5cfff784a583e418daa3d1aee5afabcabcf199a394268d041573/tradingfeatures-0.7.4.tar.gz",
    "platform": null,
    "description": "# tradingfeatures\nA useful tool to download market history from popular exchanges.\n\n\n## Installation\n\n    pip install tradingfeatures\n\nor\t\n\n    pip install git+https://github.com/realiti4/tradingfeatures.git@master --upgrade\n\n## Example\n- `.get()`: Returns most recent history amount you pass.\n- `.get_history()`: Downloads all avaliable history for that api.\n- `.update()`: Takes a csv file path and updates it.\n\nYou can use `.get()`, `.get_history()` and `.update()` with all avaliable apis. Currently supported:\n\n* `bitfinex`\n* `bitstamp`\n* `binance`\n  * `binance.funding`\n* `bitmex`\n  * `bitmex.funding`\n  * `bitmex.quote`\n\nSupported symbols: `btcusd`, `ethusd`, `ltcusd`. These are guaranteed to work with every module. You can stil use any symbol that an exchange supports. But same pair is different for each exchange of course. Using an unsupported symbol will give you a warning, but it should work just fine as long as you are using a correct symbol for that api.\n\n\n### Get history with .get()\n\n    import pandas as pd\n    from tradingfeatures import bitfinex, bitstamp, binance, bitmex\n\n    bitfinex = bitfinex()\n\n    df = bitfinex.get(2000)\n    \n    df2 = bitfinex.get(2000, symbol='ethusd')   # Default is btcusd, you can pass others in symbol parameter\n\n    df3 = bitfinex.get(20000, interval='1m')    # You can pass any interval that exchange api supports\n\nJust pass how much data you want. It will return the amount in most recent 1h data. 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 avaliable on an exchange, just run `.get_history()`.\n\n### Download all available history with .get_history()\nThe tool will download all avaliable history while respecting request per minute limits. Using it easy, and it takes couple of minutes for 1h data.\n\n    import pandas as pd\n    from tradingfeatures import bitfinex, bitstamp, binance, bitmex\n\n    bitstamp = bitstamp()\n    \n    df = bitstamp.get_hist()\n    df.to_csv('bitstamp_1h.csv') \n\n### Updating a csv file with .update()\n\n    import pandas as pd\n    from tradingfeatures import bitfinex, bitstamp, binance, bitmex\n\n    bitstamp = bitstamp()\n    \n    bitstamp.update('bitstamp.csv')    \n\nUpdate takes a path variable to csv file and updates it.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A useful tool to download market history from popular exchanges.",
    "version": "0.7.4",
    "project_urls": {
        "Homepage": "https://github.com/realiti4/tradingfeatures"
    },
    "split_keywords": [
        "download",
        "market",
        "history",
        "binance",
        "bitfinex",
        "bitmex",
        "bitstamp"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "875d14a2077ae948a9ec1c74c620404e61ab912f006f8183344a9ece5481458c",
                "md5": "96fbea686fb6365f36c467173a773622",
                "sha256": "4592e453b5ad64b15f74697604cde29b02311a2d6715a48782a8b7db359c7553"
            },
            "downloads": -1,
            "filename": "tradingfeatures-0.7.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "96fbea686fb6365f36c467173a773622",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 22679,
            "upload_time": "2024-02-05T10:08:47",
            "upload_time_iso_8601": "2024-02-05T10:08:47.209127Z",
            "url": "https://files.pythonhosted.org/packages/87/5d/14a2077ae948a9ec1c74c620404e61ab912f006f8183344a9ece5481458c/tradingfeatures-0.7.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "22f4b9fc364c5cfff784a583e418daa3d1aee5afabcabcf199a394268d041573",
                "md5": "3a9e7a8dc215a0c3ca819586f9ebbbee",
                "sha256": "0a154f5747a58f4e8d5557ab2d8abbd2e69c9eba0c156d24996be36601f25bf8"
            },
            "downloads": -1,
            "filename": "tradingfeatures-0.7.4.tar.gz",
            "has_sig": false,
            "md5_digest": "3a9e7a8dc215a0c3ca819586f9ebbbee",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 14114,
            "upload_time": "2024-02-05T10:08:48",
            "upload_time_iso_8601": "2024-02-05T10:08:48.479814Z",
            "url": "https://files.pythonhosted.org/packages/22/f4/b9fc364c5cfff784a583e418daa3d1aee5afabcabcf199a394268d041573/tradingfeatures-0.7.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-05 10:08:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "realiti4",
    "github_project": "tradingfeatures",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tradingfeatures"
}
        
Elapsed time: 0.36426s