Skip to content

AHAPX/bxin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library for bx.in.th

Description

Python library for bx.in.th api.

Requirements

Installation

$ pip install bxinth

Usage

from bxinth import BxIn, pairs


bx = BxIn('api_key', 'api_secret', 'otp')
# get orderbook
book = bx.orderbook(pairs.THBBTC)
bids = book['bids']
asks = book['asks']

# make order
order_id = bx.order(pairs.THBBTC, 1, 33000)['order_id']

# cancel order
bx.cancel(pairs.THBBTC, order_id)

Testing

Add src/config_test.py file with

API_KEY = 'api_key'
API_SECRET = 'api_secret'
OTP = 'otp'

and run

$ python -m unittest

About

python library for bx.in.th

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages