Skip to content

AD-Ventures/coinex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoinEx Build Status Last Commit Python Version License: MIT

A Python3 wrapper for the CoinEx API

This is an unofficial wrapper with no affiliation with CoinEx, use at your own risk.

Note: no limit on Market calls; generally 200 requests per 10 seconds for other operations. Specific rates can be found in thier respective documentation pages

Installation

pip3 install coinex

Usage

Methods in the coinex package return a CoinExResponse object containing three attributes (success, message, and result) aligning with the coinex API response (code, message, and data). For more information on the success/code, see here

import coinex

coinex = coinex.CoinEx()  #initalize the object

request = coinex.getMarketList()  # use one of the object's methods to make an API call
request.success  # returns 0
request.message  # returns OK
request.result  # returns a list of markets

Common and Market API

The methods in this section do not require additional signature/authentication. An exception will be raised if trying to use the other methods without supplying a AccessID and Secret.

coinex = coinex.CoinEx()  # no AccessID and Secret needed for common and market methods

Common API

Market API

Account and Trading API

The Account and Trading APIs require additional signature/authentication in order to use.

This wrapper handles most of the authentication process, so the only thing that needs to be supplied is an AccessID and Secret with proper permissions. We recommend saving your key and secret as variables (ACCESSID = XXX and SECRET=XXX) in a separate python file named secrets.py and importing it such as the example below.

For more information about acquiring an AccessID and Secret, refer to the CoinEx API documentation

from secrets import ACCESSID, SECRET  # import api id and secret

coinex = coinex.CoinEx(ACCESSID, SECRET)

Account API

Trading API

Websocket API

Using the Websocket API is currently not supported. Supported is planned in future updates.

Support

For any help or questions, please open an issue on GitHub.

License

MIT