Skip to main content

Connector library for Pionex REST and WS api.

Project description

Pionex to Python

pip install pionex_python

Description

Connector library for Pionex Restful and Websocket api.
Closely resembles https://pionex-doc.gitbook.io/apidocs for intuitive implementation.
All function names are identical to the names in documentation.

Examples

Restful

from pionex_python.restful.Common import Common

commonClient = Common()
market_data = commonClient.market_data()

print(market_data)
from pionex_python.restful.Orders import Orders

key, secret = "XXXXX", "XXXXX"

ordersClient = Orders(key, secret)
response = ordersClient.new_order(
    symbol="BTC_USDT",
    side="BUY",
    type="MARKET",
    amount="16",
)
print(response)

Websocket:

from pionex_python.websocket.PublicStream import PublicStream
from time import sleep

stream = PublicStream()

def onMessage(msg):
    print(msg)

stream.subscribe(callback=onMessage, topic="TRADE",symbol="BTC_USDT")
sleep(5)
stream.unsubscribe(topic="TRADE",symbol="BTC_USDT")

Motivation

  • learn about the python packaging and publishing systems
  • implement a websocket api client from 'scratch'
  • increase experience with python and crypto marketplaces (other than binance)

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

pionex_python-1.0.5.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pionex_python-1.0.5-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file pionex_python-1.0.5.tar.gz.

File metadata

  • Download URL: pionex_python-1.0.5.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.6.44-1-MANJARO

File hashes

Hashes for pionex_python-1.0.5.tar.gz
Algorithm Hash digest
SHA256 23c0c5e14b77e3e465d1ec6e02ce19c86d7216d7d815bbfc6c612db358040d78
MD5 cf5d1b3f37068686840f7b7ff9532916
BLAKE2b-256 4d29878cbff448a503e4078ef06aee3c4a4d2ff1346450da73ca9bb09d61b6ea

See more details on using hashes here.

File details

Details for the file pionex_python-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: pionex_python-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.6.44-1-MANJARO

File hashes

Hashes for pionex_python-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0db64116752863d661e5fe9375254486fdd786ae82cf8ca58aa26bd80177ca11
MD5 2e51aa7f46874790f2bc30c28a2b2853
BLAKE2b-256 9f93149ebad0da3a7d5fa5fc70c904f6855cd9bd24e3e83c9d7d4f4d7707f362

See more details on using hashes here.

Supported by

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