coinbase-advancedtrade-python


Namecoinbase-advancedtrade-python JSON
Version 0.1.7 PyPI version JSON
download
home_pagehttps://github.com/rhettre/coinbase-advancedtrade-python
SummaryThe unofficial Python client for the Coinbase Advanced Trade API
upload_time2023-12-03 19:15:33
maintainer
docs_urlNone
authorRhett Reisman
requires_python
licenseMIT
keywords gdax gdax-api cbpro cbpro-api orderbook trade bitcoin ethereum btc eth client api wrapper exchange crypto currency trading trading-api coinbase advanced-trade prime coinbaseadvancedtrade coinbase-advanced-trade
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Coinbase Advanced Trade API Python Client

This is the unofficial Python client for the Coinbase Advanced Trade API. It allows users to interact with the API to manage their cryptocurrency trading activities on the Coinbase platform.

## Features

- Easy-to-use Python wrapper for the Coinbase Advanced Trade API
- Supports all endpoints and methods provided by the official API
- Lightweight and efficient wrapper
- Added support for trading strategies covered on the [YouTube channel](https://rhett.blog/youtube)

## Setup

   1. Clone this repository or download the source files by running
         ```bash
            pip install coinbase-advancedtrade-python

   2. Set your API key and secret in config.py. To obtain your API key and secret, follow the steps below:
      - Log in to your Coinbase account.
      - Navigate to API settings.
      - Create a new API key with the appropriate permissions.
      - Copy the API key and secret to config.py.

## Authentication
Here's an example of how to authenticate: 

````python
from coinbase_advanced_trader.config import set_api_credentials

# Set your API key and secret
API_KEY = "ABCD1234"
API_SECRET = "XYZ9876"

# Set the API credentials once, and it updates the CBAuth singleton instance
set_api_credentials(API_KEY, API_SECRET)
````

## Usage of Strategies

Here's an example of how to use the strategies package to buy $20 worth of Bitcoin: 

````python
from coinbase_advanced_trader.strategies.limit_order_strategies import fiat_limit_buy

# Define the trading parameters
product_id = "BTC-USD"  # Replace with your desired trading pair
usd_size = 20  # Replace with your desired USD amount to spend``

# Perform a limit buy
limit_buy_order = fiat_limit_buy(product_id, usd_size)
````

## Usage of Fear and Greed Index
````python
from coinbase_advanced_trader.strategies.fear_and_greed_strategies import trade_based_on_fgi_simple

# Define the product id
product_id = "BTC-USD"

# Implement the strategy
trade_based_on_fgi_simple(product_id, 10)

````

## Usage of Fear and Greed Index (Pro)
````python
from coinbase_advanced_trader.strategies.fear_and_greed_strategies import trade_based_on_fgi_pro

# Define the product id
product_id = "BTC-USD"

# Define the custom schedule
custom_schedule = [
    {"threshold": 20, "factor": 1, "action": "buy"},
    {"threshold": 80, "factor": 0.5, "action": "buy"},
    {"threshold": 100, "factor": 1, "action": "sell"},
]

# Implement the strategy
response = trade_based_on_fgi_pro(product_id, 10, custom_schedule)
````

## Documentation

For more information about the Coinbase Advanced Trader API, consult the [official API documentation](https://docs.cloud.coinbase.com/advanced-trade-api/docs/rest-api-overview/).

## License
    This project is licensed under the MIT License. See the LICENSE file for more information.

## Author
    Rhett Reisman

    Email: rhett@rhett.blog

    GitHub: https://github.com/rhettre/coinbase-advancedtrade-python

## Disclaimer

This project is not affiliated with, maintained, or endorsed by Coinbase. Use this software at your own risk. Trading cryptocurrencies carries a risk of financial loss. The developers of this software are not responsible for any financial losses or damages incurred while using this software. Nothing in this software should be seen as an inducement to trade with a particular strategy or as financial advice.




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/rhettre/coinbase-advancedtrade-python",
    "name": "coinbase-advancedtrade-python",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "gdax,gdax-api,cbpro,cbpro-api,orderbook,trade,bitcoin,ethereum,BTC,ETH,client,api,wrapper,exchange,crypto,currency,trading,trading-api,coinbase,advanced-trade,prime,coinbaseadvancedtrade,coinbase-advanced-trade",
    "author": "Rhett Reisman",
    "author_email": "rhett@rhett.blog",
    "download_url": "https://files.pythonhosted.org/packages/2c/65/3c74abf9ee09b3af5d4c29b67ea0b61dcd739cfcf2ae040a199631aff604/coinbase-advancedtrade-python-0.1.7.tar.gz",
    "platform": null,
    "description": "# Coinbase Advanced Trade API Python Client\n\nThis is the unofficial Python client for the Coinbase Advanced Trade API. It allows users to interact with the API to manage their cryptocurrency trading activities on the Coinbase platform.\n\n## Features\n\n- Easy-to-use Python wrapper for the Coinbase Advanced Trade API\n- Supports all endpoints and methods provided by the official API\n- Lightweight and efficient wrapper\n- Added support for trading strategies covered on the [YouTube channel](https://rhett.blog/youtube)\n\n## Setup\n\n   1. Clone this repository or download the source files by running\n         ```bash\n            pip install coinbase-advancedtrade-python\n\n   2. Set your API key and secret in config.py. To obtain your API key and secret, follow the steps below:\n      - Log in to your Coinbase account.\n      - Navigate to API settings.\n      - Create a new API key with the appropriate permissions.\n      - Copy the API key and secret to config.py.\n\n## Authentication\nHere's an example of how to authenticate: \n\n````python\nfrom coinbase_advanced_trader.config import set_api_credentials\n\n# Set your API key and secret\nAPI_KEY = \"ABCD1234\"\nAPI_SECRET = \"XYZ9876\"\n\n# Set the API credentials once, and it updates the CBAuth singleton instance\nset_api_credentials(API_KEY, API_SECRET)\n````\n\n## Usage of Strategies\n\nHere's an example of how to use the strategies package to buy $20 worth of Bitcoin: \n\n````python\nfrom coinbase_advanced_trader.strategies.limit_order_strategies import fiat_limit_buy\n\n# Define the trading parameters\nproduct_id = \"BTC-USD\"  # Replace with your desired trading pair\nusd_size = 20  # Replace with your desired USD amount to spend``\n\n# Perform a limit buy\nlimit_buy_order = fiat_limit_buy(product_id, usd_size)\n````\n\n## Usage of Fear and Greed Index\n````python\nfrom coinbase_advanced_trader.strategies.fear_and_greed_strategies import trade_based_on_fgi_simple\n\n# Define the product id\nproduct_id = \"BTC-USD\"\n\n# Implement the strategy\ntrade_based_on_fgi_simple(product_id, 10)\n\n````\n\n## Usage of Fear and Greed Index (Pro)\n````python\nfrom coinbase_advanced_trader.strategies.fear_and_greed_strategies import trade_based_on_fgi_pro\n\n# Define the product id\nproduct_id = \"BTC-USD\"\n\n# Define the custom schedule\ncustom_schedule = [\n    {\"threshold\": 20, \"factor\": 1, \"action\": \"buy\"},\n    {\"threshold\": 80, \"factor\": 0.5, \"action\": \"buy\"},\n    {\"threshold\": 100, \"factor\": 1, \"action\": \"sell\"},\n]\n\n# Implement the strategy\nresponse = trade_based_on_fgi_pro(product_id, 10, custom_schedule)\n````\n\n## Documentation\n\nFor more information about the Coinbase Advanced Trader API, consult the [official API documentation](https://docs.cloud.coinbase.com/advanced-trade-api/docs/rest-api-overview/).\n\n## License\n    This project is licensed under the MIT License. See the LICENSE file for more information.\n\n## Author\n    Rhett Reisman\n\n    Email: rhett@rhett.blog\n\n    GitHub: https://github.com/rhettre/coinbase-advancedtrade-python\n\n## Disclaimer\n\nThis project is not affiliated with, maintained, or endorsed by Coinbase. Use this software at your own risk. Trading cryptocurrencies carries a risk of financial loss. The developers of this software are not responsible for any financial losses or damages incurred while using this software. Nothing in this software should be seen as an inducement to trade with a particular strategy or as financial advice.\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The unofficial Python client for the Coinbase Advanced Trade API",
    "version": "0.1.7",
    "project_urls": {
        "Homepage": "https://github.com/rhettre/coinbase-advancedtrade-python"
    },
    "split_keywords": [
        "gdax",
        "gdax-api",
        "cbpro",
        "cbpro-api",
        "orderbook",
        "trade",
        "bitcoin",
        "ethereum",
        "btc",
        "eth",
        "client",
        "api",
        "wrapper",
        "exchange",
        "crypto",
        "currency",
        "trading",
        "trading-api",
        "coinbase",
        "advanced-trade",
        "prime",
        "coinbaseadvancedtrade",
        "coinbase-advanced-trade"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ef1305f127b72894dc8b5dca3a2806897d906c8886f36a60cd4dfe1483824779",
                "md5": "b48051ed06b3b5e0912d63c5921b4945",
                "sha256": "be15e132b208e9113a1621e5e9eae7b2e7ef3020976fe517e641b55d3e36b7d7"
            },
            "downloads": -1,
            "filename": "coinbase_advancedtrade_python-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b48051ed06b3b5e0912d63c5921b4945",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 20430,
            "upload_time": "2023-12-03T19:15:31",
            "upload_time_iso_8601": "2023-12-03T19:15:31.359837Z",
            "url": "https://files.pythonhosted.org/packages/ef/13/05f127b72894dc8b5dca3a2806897d906c8886f36a60cd4dfe1483824779/coinbase_advancedtrade_python-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2c653c74abf9ee09b3af5d4c29b67ea0b61dcd739cfcf2ae040a199631aff604",
                "md5": "530978302c09cf2204ab2643e6f265a6",
                "sha256": "564a72f7e4b3e5170437605ddfe7c527813a59cb5ccb5f147f7b16a1ee173c27"
            },
            "downloads": -1,
            "filename": "coinbase-advancedtrade-python-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "530978302c09cf2204ab2643e6f265a6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16546,
            "upload_time": "2023-12-03T19:15:33",
            "upload_time_iso_8601": "2023-12-03T19:15:33.086880Z",
            "url": "https://files.pythonhosted.org/packages/2c/65/3c74abf9ee09b3af5d4c29b67ea0b61dcd739cfcf2ae040a199631aff604/coinbase-advancedtrade-python-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-03 19:15:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rhettre",
    "github_project": "coinbase-advancedtrade-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "coinbase-advancedtrade-python"
}
        
Elapsed time: 0.14589s