Python wrapper for Coinex APIs
Project description
coinexpy - Python wrapper for Coinex APIs
Through coinexpy you can simply buy or sell crypto in your Coinex account
Features
- place limit order
- place market order
- get balance
- get price
Install
pip install coinexpy
Example
You can create API key and get your access_id & secret_key here
import coinexpy
coinex = coinexpy.Coinex('<your_access_id>', '<your_secret_key>')
balance = coinex.get_balance()
usdt_balance = coinex.get_available('USDT')
btc_price = coinex.get_last_price('BTCUSDT')
coinex.limit_buy('BTCUSDT', 100, 50000) # place a limit buy order on bitcoin on 50000$ with amount=100$
coinex.limit_sell('BTCUSDT', 0.01, 50000)
coinex.market_buy('BTCUSDT', 100) # buy 100$ worth of bitcoin with market price
coinex.market_sell('BTCUSDT', 0.01) # sell 0.01BTC
good luck
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
coinexpy-0.2.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for coinexpy-0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4a603033e1e8296bdb985f4cefecdbd22e3efd8ed47ec2c672c06aa18499308 |
|
MD5 | 0a1416c385860da521bb941e4d12799e |
|
BLAKE2b-256 | 74a59907f889ce648fc06d402b021e78cc9325db905b9d738132d94b2e354d0b |