Skip to content

kelvinxue/pyxt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages