deribit-wrapper


Namederibit-wrapper JSON
Version 0.3.3 PyPI version JSON
download
home_pagehttps://github.com/AntonioVentilii/deribit-wrapper
SummaryA Python wrapper for seamless integration with Deribit's trading API, offering easy access to market data, account management, and trading operations.
upload_time2024-04-13 10:43:08
maintainerNone
docs_urlNone
authorAntonio Ventilii
requires_python>=3.7
licenseMIT
keywords deribit api wrapper cryptocurrency trading
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # deribit-wrapper

## Overview

This Python script provides a comprehensive client for interacting with the [Deribit API](https://docs.deribit.com/).
It encapsulates functionality for both public and private endpoints, covering market data, account information, trading
operations, and more.
It supports both the production and test environments, making it suitable for developers at all stages of application
development.

## Features

- **Environment Switching:** Easily switch between the production and test environments.
- **Market Data Retrieval:** Access to market data including contract sizes, currencies, ticker information, book
  summaries, and historical data.
- **Account Management:** Functionality to authenticate, retrieve account summaries, positions, and transaction logs.
- **Trading Operations:** Support for placing buy and sell orders, including market and limit orders, as well as bulk
  ordering.
- **Utility Functions:** Helper functions to convert timestamps, retrieve specific instruments or markets, and calculate
  margins.

## Installation

Install `deribit-wrapper` using pip:

```bash
pip install deribit-wrapper
```

## Configuration

Instantiate the `DeribitClient` class with the appropriate parameters:

- `client_id`: Your Deribit client ID.
- `client_secret`: Your Deribit client secret.
- `simulated`: Set to `True` to use the test environment or `False` to use the production environment.
- `env`: Choose between `'test'` and `'prod'` environments. Defaults to `'prod'`.

Example:

```python
from deribit_wrapper import DeribitClient

client = DeribitClient(client_id='your_client_id', client_secret='your_client_secret')
```

## Usage

### Market Data

- **Get Contract Size:** `get_contract_size(asset)`
- **Get Currencies:** `get_currencies()`
- **Get Ticker Information:** `get_ticker(asset)`
- **Get Book Summary by Currency:** `get_complete_market_book()`
- and more...

### Account Information

- **Authenticate:** Automatically handled during requests to private endpoints.
- **Get Account Summary:** `get_account_summary(currency)`
- **Get Positions:** `get_positions(currency, kind)`
- and more...

### Trading

- **Place an Order:** `order(asset, amount, limit=None, label=None, reduce_only=False)`
- **Place a Market Order:** `market_order(asset, amount, label=None, reduce_only=False)`
- **Bulk Orders:** `bulk_order(orders, label=None)`
- and more...

## Examples

1. **Retrieving Market Data:**

```python
ticker_info = client.get_ticker('BTC-25JUN21')
print(ticker_info)
```

2. **Placing a Market Order:**

```python
order_response = client.market_order('BTC-25JUN21', 1)
print(order_response)
```

3. **Getting Account Summary:**

```python
account_summary = client.get_account_summary('BTC')
print(account_summary)
```

## Getting Help

If you encounter any issues or have questions about using `deribit-wrapper`,
please create an issue in the [GitHub repository](https://github.com/AntonioVentilii/deribit-wrapper/issues).

## Contributing

Contributions to `deribit-wrapper` are welcome!
Whether it's bug reports, feature requests, or code contributions, please feel free to make a contribution. For code
contributions, please:

1. Fork the repository.
2. Create a new branch for your feature or fix.
3. Submit a pull request.

Please ensure your code adheres to the project's coding standards and includes appropriate tests.

## License

`deribit-wrapper` is released under the MIT License. See the LICENSE file for more details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/AntonioVentilii/deribit-wrapper",
    "name": "deribit-wrapper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "deribit api wrapper cryptocurrency trading",
    "author": "Antonio Ventilii",
    "author_email": "antonioventilii@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/77/0b/1363cd0ec791b4e215f48166ce2e471da71738bef99019c1737236ae6408/deribit_wrapper-0.3.3.tar.gz",
    "platform": null,
    "description": "# deribit-wrapper\n\n## Overview\n\nThis Python script provides a comprehensive client for interacting with the [Deribit API](https://docs.deribit.com/).\nIt encapsulates functionality for both public and private endpoints, covering market data, account information, trading\noperations, and more.\nIt supports both the production and test environments, making it suitable for developers at all stages of application\ndevelopment.\n\n## Features\n\n- **Environment Switching:** Easily switch between the production and test environments.\n- **Market Data Retrieval:** Access to market data including contract sizes, currencies, ticker information, book\n  summaries, and historical data.\n- **Account Management:** Functionality to authenticate, retrieve account summaries, positions, and transaction logs.\n- **Trading Operations:** Support for placing buy and sell orders, including market and limit orders, as well as bulk\n  ordering.\n- **Utility Functions:** Helper functions to convert timestamps, retrieve specific instruments or markets, and calculate\n  margins.\n\n## Installation\n\nInstall `deribit-wrapper` using pip:\n\n```bash\npip install deribit-wrapper\n```\n\n## Configuration\n\nInstantiate the `DeribitClient` class with the appropriate parameters:\n\n- `client_id`: Your Deribit client ID.\n- `client_secret`: Your Deribit client secret.\n- `simulated`: Set to `True` to use the test environment or `False` to use the production environment.\n- `env`: Choose between `'test'` and `'prod'` environments. Defaults to `'prod'`.\n\nExample:\n\n```python\nfrom deribit_wrapper import DeribitClient\n\nclient = DeribitClient(client_id='your_client_id', client_secret='your_client_secret')\n```\n\n## Usage\n\n### Market Data\n\n- **Get Contract Size:** `get_contract_size(asset)`\n- **Get Currencies:** `get_currencies()`\n- **Get Ticker Information:** `get_ticker(asset)`\n- **Get Book Summary by Currency:** `get_complete_market_book()`\n- and more...\n\n### Account Information\n\n- **Authenticate:** Automatically handled during requests to private endpoints.\n- **Get Account Summary:** `get_account_summary(currency)`\n- **Get Positions:** `get_positions(currency, kind)`\n- and more...\n\n### Trading\n\n- **Place an Order:** `order(asset, amount, limit=None, label=None, reduce_only=False)`\n- **Place a Market Order:** `market_order(asset, amount, label=None, reduce_only=False)`\n- **Bulk Orders:** `bulk_order(orders, label=None)`\n- and more...\n\n## Examples\n\n1. **Retrieving Market Data:**\n\n```python\nticker_info = client.get_ticker('BTC-25JUN21')\nprint(ticker_info)\n```\n\n2. **Placing a Market Order:**\n\n```python\norder_response = client.market_order('BTC-25JUN21', 1)\nprint(order_response)\n```\n\n3. **Getting Account Summary:**\n\n```python\naccount_summary = client.get_account_summary('BTC')\nprint(account_summary)\n```\n\n## Getting Help\n\nIf you encounter any issues or have questions about using `deribit-wrapper`,\nplease create an issue in the [GitHub repository](https://github.com/AntonioVentilii/deribit-wrapper/issues).\n\n## Contributing\n\nContributions to `deribit-wrapper` are welcome!\nWhether it's bug reports, feature requests, or code contributions, please feel free to make a contribution. For code\ncontributions, please:\n\n1. Fork the repository.\n2. Create a new branch for your feature or fix.\n3. Submit a pull request.\n\nPlease ensure your code adheres to the project's coding standards and includes appropriate tests.\n\n## License\n\n`deribit-wrapper` is released under the MIT License. See the LICENSE file for more details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python wrapper for seamless integration with Deribit's trading API, offering easy access to market data, account management, and trading operations.",
    "version": "0.3.3",
    "project_urls": {
        "Homepage": "https://github.com/AntonioVentilii/deribit-wrapper",
        "Issue Tracker": "https://github.com/AntonioVentilii/deribit-wrapper/issues",
        "Source Code": "https://github.com/AntonioVentilii/deribit-wrapper"
    },
    "split_keywords": [
        "deribit",
        "api",
        "wrapper",
        "cryptocurrency",
        "trading"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "edda6864d14d8ef2a5725bcc61119dd36a55cb6d7bfcfcef2a561da4ae5f0d2d",
                "md5": "ea6fd89870b86f7bc6b7f8c80a116bcd",
                "sha256": "063ac4760ec253ab256c8b3a866b2ede8197f85f6af71d8bdf9379ac015ccd91"
            },
            "downloads": -1,
            "filename": "deribit_wrapper-0.3.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ea6fd89870b86f7bc6b7f8c80a116bcd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 23134,
            "upload_time": "2024-04-13T10:43:06",
            "upload_time_iso_8601": "2024-04-13T10:43:06.330415Z",
            "url": "https://files.pythonhosted.org/packages/ed/da/6864d14d8ef2a5725bcc61119dd36a55cb6d7bfcfcef2a561da4ae5f0d2d/deribit_wrapper-0.3.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "770b1363cd0ec791b4e215f48166ce2e471da71738bef99019c1737236ae6408",
                "md5": "7b34e3818bc2dd7f8ff2372c69d110e5",
                "sha256": "ff9ceaf6db914581fa047fbb3d6b6d8f058878958fcc170b90be6f1308c27e7b"
            },
            "downloads": -1,
            "filename": "deribit_wrapper-0.3.3.tar.gz",
            "has_sig": false,
            "md5_digest": "7b34e3818bc2dd7f8ff2372c69d110e5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 19423,
            "upload_time": "2024-04-13T10:43:08",
            "upload_time_iso_8601": "2024-04-13T10:43:08.335864Z",
            "url": "https://files.pythonhosted.org/packages/77/0b/1363cd0ec791b4e215f48166ce2e471da71738bef99019c1737236ae6408/deribit_wrapper-0.3.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-13 10:43:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AntonioVentilii",
    "github_project": "deribit-wrapper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "deribit-wrapper"
}
        
Elapsed time: 0.22602s