kaziro


Namekaziro JSON
Version 1.0.6 PyPI version JSON
download
home_pagehttps://github.com/kazirocom/package
SummaryKaziro API Client
upload_time2024-11-11 05:21:54
maintainerNone
docs_urlNone
authorKaziro Engineering Team
requires_python<4.0,>=3.8
licenseLICENSE
keywords openapi openapi-generator fastapi kaziro
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Kaziro Python API Client

Kaziro is a Python client for interacting with the Kaziro API. It provides a simple and intuitive interface for accessing various endpoints related to users, markets, orders, positions, and wallets.

## Quick Start

### Installation

Install the Kaziro package using pip:

```bash
pip install kaziro
```

### Basic Usage

```python
import os
from kaziro import Kaziro

# Initialize the Kaziro client
api_key = os.environ.get("KAZIRO_API_KEY")
kaziro = Kaziro(api_key=api_key)

# Retrieve user profile
user_profile = kaziro.user.retrieve()
print(f"User profile: {user_profile}")

# Retrieve markets
markets = kaziro.market.retrieve()
print(f"Markets: {markets}")

# Place an order
orders = [{"request_id": "some_id", "probability": 0.7}]
placed_orders = kaziro.order.create(orders)
print(f"Placed orders: {placed_orders}")

# Connect to WebSocket
kaziro.connect_websocket()
kaziro.subscribe_websocket("public:all")
print("WebSocket connected and subscribed to 'public:all'")
```

## Features

-   User management (retrieve)
-   Market operations (create, retrieve)
-   Order management (create, retrieve, accept)
-   Position tracking (open positions, history)
-   Wallet information retrieval
-   WebSocket support for real-time updates
-   Bot templates for automated trading

## Detailed Usage

### User Operations

```python
# Retrieve user profile
user_profile = kaziro.user.retrieve()
```

### Market Operations

```python
# Create a new market
market_details = [{"detail": "Market description", "size": 100}]
created_markets = kaziro.market.create(market_details)

# Retrieve markets
all_markets = kaziro.market.retrieve()
specific_markets = kaziro.market.retrieve(market_ids=["market_id_1", "market_id_2"])
open_markets = kaziro.market.retrieve(status="OPEN")
```

### Order Operations

```python
# Create orders
orders = [
    {"request_id": "id_1", "probability": 0.7},
    {"request_id": "id_2", "probability": 0.3}
]
placed_orders = kaziro.order.create(orders)

# Retrieve open orders
all_open_orders = kaziro.order.retrieve()
user_open_orders = kaziro.order.retrieve(filter_user=True)

# Accept orders
accepted_orders = kaziro.order.accept(["order_id_1", "order_id_2"])

# Request default replies
default_replies = kaziro.order.request_default_replies(["order_id_1", "order_id_2"])
```

### Position Operations

```python
# Get open positions
open_positions = kaziro.position.retrieve(status="ACTIVE")

# Get position history
position_history = kaziro.position.retrieve(status="CLOSED")
```

### Wallet Operations

```python
# Retrieve wallet information
wallet_info = kaziro.wallet.retrieve()
```

### WebSocket Usage

```python
# Connect to WebSocket
kaziro.connect_websocket()

# Subscribe to a channel
kaziro.subscribe_websocket("public:all")

```

### Bot Templates

```python
# Use the base market maker bot
kaziro.template.base_market_maker()
```

## Configuration

The Kaziro client can be configured with custom API and WebSocket URLs:

```python
kaziro = Kaziro(api_key="your_api_key")
```

## Development

To set up the development environment:

1. Clone the repository:

    ```
    git clone https://github.com/kazirocom/package.git
    cd package
    ```

2. Install development dependencies:

    ```
    pip install -e ".[dev]"
    ```

3. Run tests:
    ```
    pytest tests/
    ```

## Contributing

We welcome contributions to the Kaziro package. Please feel free to submit issues, fork the repository and send pull requests!

## License

This project is licensed under the terms of the license specified in the project repository.

## Support

For support, please contact the Kaziro team at support@kaziro.xyz or open an issue on the GitHub repository.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kazirocom/package",
    "name": "kaziro",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "OpenAPI, OpenAPI-Generator, FastAPI, Kaziro",
    "author": "Kaziro Engineering Team",
    "author_email": "engineering@kaziro.xyz",
    "download_url": "https://files.pythonhosted.org/packages/16/fa/0ae21774cce06b42c7e1cc4f05209513efc912f7b8c860a8d48ffaa3b061/kaziro-1.0.6.tar.gz",
    "platform": null,
    "description": "# Kaziro Python API Client\n\nKaziro is a Python client for interacting with the Kaziro API. It provides a simple and intuitive interface for accessing various endpoints related to users, markets, orders, positions, and wallets.\n\n## Quick Start\n\n### Installation\n\nInstall the Kaziro package using pip:\n\n```bash\npip install kaziro\n```\n\n### Basic Usage\n\n```python\nimport os\nfrom kaziro import Kaziro\n\n# Initialize the Kaziro client\napi_key = os.environ.get(\"KAZIRO_API_KEY\")\nkaziro = Kaziro(api_key=api_key)\n\n# Retrieve user profile\nuser_profile = kaziro.user.retrieve()\nprint(f\"User profile: {user_profile}\")\n\n# Retrieve markets\nmarkets = kaziro.market.retrieve()\nprint(f\"Markets: {markets}\")\n\n# Place an order\norders = [{\"request_id\": \"some_id\", \"probability\": 0.7}]\nplaced_orders = kaziro.order.create(orders)\nprint(f\"Placed orders: {placed_orders}\")\n\n# Connect to WebSocket\nkaziro.connect_websocket()\nkaziro.subscribe_websocket(\"public:all\")\nprint(\"WebSocket connected and subscribed to 'public:all'\")\n```\n\n## Features\n\n-   User management (retrieve)\n-   Market operations (create, retrieve)\n-   Order management (create, retrieve, accept)\n-   Position tracking (open positions, history)\n-   Wallet information retrieval\n-   WebSocket support for real-time updates\n-   Bot templates for automated trading\n\n## Detailed Usage\n\n### User Operations\n\n```python\n# Retrieve user profile\nuser_profile = kaziro.user.retrieve()\n```\n\n### Market Operations\n\n```python\n# Create a new market\nmarket_details = [{\"detail\": \"Market description\", \"size\": 100}]\ncreated_markets = kaziro.market.create(market_details)\n\n# Retrieve markets\nall_markets = kaziro.market.retrieve()\nspecific_markets = kaziro.market.retrieve(market_ids=[\"market_id_1\", \"market_id_2\"])\nopen_markets = kaziro.market.retrieve(status=\"OPEN\")\n```\n\n### Order Operations\n\n```python\n# Create orders\norders = [\n    {\"request_id\": \"id_1\", \"probability\": 0.7},\n    {\"request_id\": \"id_2\", \"probability\": 0.3}\n]\nplaced_orders = kaziro.order.create(orders)\n\n# Retrieve open orders\nall_open_orders = kaziro.order.retrieve()\nuser_open_orders = kaziro.order.retrieve(filter_user=True)\n\n# Accept orders\naccepted_orders = kaziro.order.accept([\"order_id_1\", \"order_id_2\"])\n\n# Request default replies\ndefault_replies = kaziro.order.request_default_replies([\"order_id_1\", \"order_id_2\"])\n```\n\n### Position Operations\n\n```python\n# Get open positions\nopen_positions = kaziro.position.retrieve(status=\"ACTIVE\")\n\n# Get position history\nposition_history = kaziro.position.retrieve(status=\"CLOSED\")\n```\n\n### Wallet Operations\n\n```python\n# Retrieve wallet information\nwallet_info = kaziro.wallet.retrieve()\n```\n\n### WebSocket Usage\n\n```python\n# Connect to WebSocket\nkaziro.connect_websocket()\n\n# Subscribe to a channel\nkaziro.subscribe_websocket(\"public:all\")\n\n```\n\n### Bot Templates\n\n```python\n# Use the base market maker bot\nkaziro.template.base_market_maker()\n```\n\n## Configuration\n\nThe Kaziro client can be configured with custom API and WebSocket URLs:\n\n```python\nkaziro = Kaziro(api_key=\"your_api_key\")\n```\n\n## Development\n\nTo set up the development environment:\n\n1. Clone the repository:\n\n    ```\n    git clone https://github.com/kazirocom/package.git\n    cd package\n    ```\n\n2. Install development dependencies:\n\n    ```\n    pip install -e \".[dev]\"\n    ```\n\n3. Run tests:\n    ```\n    pytest tests/\n    ```\n\n## Contributing\n\nWe welcome contributions to the Kaziro package. Please feel free to submit issues, fork the repository and send pull requests!\n\n## License\n\nThis project is licensed under the terms of the license specified in the project repository.\n\n## Support\n\nFor support, please contact the Kaziro team at support@kaziro.xyz or open an issue on the GitHub repository.\n\n",
    "bugtrack_url": null,
    "license": "LICENSE",
    "summary": "Kaziro API Client",
    "version": "1.0.6",
    "project_urls": {
        "Homepage": "https://github.com/kazirocom/package",
        "Repository": "https://github.com/kazirocom/package"
    },
    "split_keywords": [
        "openapi",
        " openapi-generator",
        " fastapi",
        " kaziro"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3da50cc2523ba6ee7e2ec5a216dde5c666fbdc0c08903c2260372328c3bc2b96",
                "md5": "e64ac002b97a5b34577ae3dd39770307",
                "sha256": "b0dac352964847b42f98df16c598705bf867c7b8ae3c4eb431f69241081153d2"
            },
            "downloads": -1,
            "filename": "kaziro-1.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e64ac002b97a5b34577ae3dd39770307",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 190779,
            "upload_time": "2024-11-11T05:21:52",
            "upload_time_iso_8601": "2024-11-11T05:21:52.990768Z",
            "url": "https://files.pythonhosted.org/packages/3d/a5/0cc2523ba6ee7e2ec5a216dde5c666fbdc0c08903c2260372328c3bc2b96/kaziro-1.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "16fa0ae21774cce06b42c7e1cc4f05209513efc912f7b8c860a8d48ffaa3b061",
                "md5": "62ff33d4d571828e29fe9ad4a8243305",
                "sha256": "c2a7c020d5e2a8c174e4971339cbdd11eaf4163e0de49db8d9a60508618382cb"
            },
            "downloads": -1,
            "filename": "kaziro-1.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "62ff33d4d571828e29fe9ad4a8243305",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 70161,
            "upload_time": "2024-11-11T05:21:54",
            "upload_time_iso_8601": "2024-11-11T05:21:54.833355Z",
            "url": "https://files.pythonhosted.org/packages/16/fa/0ae21774cce06b42c7e1cc4f05209513efc912f7b8c860a8d48ffaa3b061/kaziro-1.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-11 05:21:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kazirocom",
    "github_project": "package",
    "github_not_found": true,
    "lcname": "kaziro"
}
        
Elapsed time: 2.36464s