Metadata-Version: 2.1
Name: pyxt
Version: 0.6.14
Summary: Python3 XT.COM HTTP API Connector
Home-page: https://github.com/kelvinxue/pyxt
Download-URL: https://github.com/kelvinxue/pyxt/archive/refs/tags/v0.6.14.tar.gz
Author: xt
Author-email: xt@xt.com
License: MIT License
Keywords: xt api connector
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE

# pyxt
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

Official Python3 API connector for XT.COM's HTTP APIs.

## Table of Contents

- [About](#about)
- [Installation](#installation)
- [Usage](#usage)
- [Examples](#examples)
- [Contact](#contact)

## About
Put simply, `pyxt` (Python + XT.COM) is the official lightweight one-stop-shop module for the XT.COM HTTP APIs. 

## Installation
`pyxt` requires Python 3.9.1 or higher. The module can be installed manually or via [PyPI](https://pypi.org/project/pyxt/) with `pip`:
```
pip install pyxt
```

## Usage
You can retrieve a specific spot market like so:
```python
from pyxt.spot import Spot
```

Create an HTTP session and connect via WebSocket for Inverse on mainnet:
```python
xt = Spot(host="https://sapi.xt.com", access_key='', secret_key='')
```

Information can be sent to, or retrieved from, the XT.COM APIs:
```python
print(xt.balance("usdt"))
```

You can retrieve a specific future market like so:
```python
from pyxt.perp import Perp
```

Create an HTTP session and connect via WebSocket for Inverse on mainnet:
```python
xt = Perp(host="https://fapi.xt.com", access_key='', secret_key='')
```

Information can be sent to, or retrieved from, the XT.COM APIs:
```python
print(xt.get_account_capital())
```

## Examples
You can find more examples in the project folder /examples/

## Contact
You can reach out for support on the [XTAPI Telegram](https://t.me/XT_api) group chat.
