imanmousaei
coinexpy
Python

Python wrapper for Coinex APIs

Last updated Nov 24, 2023
16
Stars
4
Forks
4
Issues
0
Stars/day
Attention Score
8
Language breakdown
Python 100.0%
Files click to expand
README

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 accessid & secretkey here
from coinexpy.coinex import Coinex

coinex = Coinex('<youraccessid>', '<yoursecretkey>')

balance = coinex.get_balance() usdtbalance = coinex.getavailable('USDT') btcprice = coinex.getlast_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.
🔗 More in this category

© 2026 GitRepoTrend · imanmousaei/coinexpy · Updated daily from GitHub