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
from coinexpy.coinex import Coinex
coinex = 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.market_buy('BTCUSDT', 100) # buy 100$ worth of bitcoin with market price
coinex.market_sell('BTCUSDT', 100) # sell 100$ worth of BTC
coinex.limit_buy('BTCUSDT', 100, 50000) # place a limit buy order on bitcoin with amount=100$
result = coinex.limit_sell('BTCUSDT', 100, 50000)
coinex.cancel_order(result['id'], result['market'])
Amount
Field amount should be calculated with the 2nd currency in pair e.g. in BTCUSDT you should calculate amount in USDT
Donate
For additional support you can always donate.
My TRX address:
TKjj4ds7pyRKrLDPa71aCQ9y73kFQPKjX2
BCH:
qrxfzgu5prerumfmzm20jajkp6nvje092yx8n5g0k6
USDT TRC20:
TKjj4ds7pyRKrLDPa71aCQ9y73kFQPKjX2
Contact
If you need another function or found a bug in existing ones submit a new issue Here.
Metadata
Release files for coinexpy 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| coinexpy-0.5.1.tar.gz | 5.1 kB | Details |
Release files / coinexpy-0.5.1.tar.gz
| Download URL | coinexpy-0.5.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2a01a4ea823fa7407e73a932465ae20df8f18c75a0b62fbf62bf4f0326d1b59
|
|
BLAKE2b-256 checksum How to use checksums |
12279c7a54aa2ae627f4c34ab8e70c6e2f75d5ef45473f3021289fbfef8196ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10
|