Skip to main content

Python SDK for OKX

Project description

Overview

Forked from https://github.com/okxapi/python-okx/ This is an unofficial Python wrapper for the OKX exchange v5 API

If you came here looking to purchase cryptocurrencies from the OKX exchange, please go here.

Source code

https://gitea.nicosanchez.com.ar/nicolas/python-okx

Features

  • Implementation of all Rest API endpoints.
  • Private and Public Websocket implementation
  • Testnet support
  • Websocket handling with reconnection and multiplexed connections

Quick start

Prerequisites

python version:>=3.9

WebSocketAPI: websockets package advise version 6.0

Step 1: register an account on OKX and apply for an API key

Step 2: install python-okx

pip install python-okx-earn

Step 3: Run examples

  • Fill in API credentials in the corresponding examples
api_key = ""
secret_key = ""
passphrase = ""

Note

  • To learn more about OKX API, visit official OKX API documentation

  • If you face any questions when using WebSocketAPI,you can consult the following links

    • asynciowebsockets document/github

      https://docs.python.org/3/library/asyncio-dev.html
      https://websockets.readthedocs.io/en/stable/intro.html
      https://github.com/aaugustin/websockets
      
    • About code=1006

      https://github.com/Rapptz/discord.py/issues/1996
      https://github.com/aaugustin/websockets/issues/587
      

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

python-okx-earn-0.3.5.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

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

python_okx_earn-0.3.5-py3-none-any.whl (32.6 kB view details)

Uploaded Python 3

File details

Details for the file python-okx-earn-0.3.5.tar.gz.

File metadata

  • Download URL: python-okx-earn-0.3.5.tar.gz
  • Upload date:
  • Size: 23.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.9

File hashes

Hashes for python-okx-earn-0.3.5.tar.gz
Algorithm Hash digest
SHA256 5d7bbed4cf7b2be70584283ad7f346cf1e64991549f7a628be996520199377bf
MD5 9ccef2fe5c02cbb892953f4556b808c6
BLAKE2b-256 ee5b825fce4b7fa8727a5b80ef7d4c44c7686deca660ea62b255d4fbc8ec1f81

See more details on using hashes here.

File details

Details for the file python_okx_earn-0.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for python_okx_earn-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c1e058546c9303157ed37ef3ee7403bc7c1e14a75cc412a68c9f3794be928b9a
MD5 8bd63e777545a97b987a3fedca48a0ab
BLAKE2b-256 1562e4fa7fc246b2fcff1f7213d6a57076b56823427d0965e7c742399666dab3

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