Skip to main content

Python3 XT.COM HTTP API Connector

Project description

pyxt

All Contributors

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

Table of Contents

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 with pip:

pip install pyxt

Usage

You can retrieve a specific spot market like so:

from pyxt.spot import Spot

Create an HTTP session and connect via WebSocket for Inverse on mainnet:

xt = Spot(host="https://sapi.xt.com", access_key='', secret_key='')

Information can be sent to, or retrieved from, the XT.COM APIs:

print(xt.balance("usdt"))

You can retrieve a specific future market like so:

from pyxt.perp import Perp

Create an HTTP session and connect via WebSocket for Inverse on mainnet:

xt = Perp(host="https://fapi.xt.com", access_key='', secret_key='')

Information can be sent to, or retrieved from, the XT.COM APIs:

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 group chat.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyxt-0.6.20.tar.gz (16.9 kB view details)

Uploaded Source

File details

Details for the file pyxt-0.6.20.tar.gz.

File metadata

  • Download URL: pyxt-0.6.20.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/6.7.0 keyring/23.13.1 pkginfo/1.9.6 readme-renderer/34.0 requests-toolbelt/1.0.0 requests/2.31.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.12

File hashes

Hashes for pyxt-0.6.20.tar.gz
Algorithm Hash digest
SHA256 f6539fb5f65779cd0f3cb59238253e768f7dbc2bc0ba2875612906cdfcc18307
MD5 ca01a4c4a47f1ecfa628ff86ca1bbec5
BLAKE2b-256 e83bb84ddc64ec2099aa74d662cd07a72d892fa932e27d8006c4da6733a74b01

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page