Python lib for bx.in.th market
Project description
# Library for bx.in.th
## Description
Python library for bx.in.th api.
## Requirements
- [python 3.6+](https://www.python.org/download/releases/3.6.0/)
- [pyotp](https://github.com/pyotp/pyotp)
- [requests](https://github.com/requests/requests/)
## Installation
```bash
$ pip install bxinth
```
## Usage
```python
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
```python
API_KEY = 'api_key'
API_SECRET = 'api_secret'
OTP = 'otp'
```
and run
```bash
$ python -m unittest
```
## Description
Python library for bx.in.th api.
## Requirements
- [python 3.6+](https://www.python.org/download/releases/3.6.0/)
- [pyotp](https://github.com/pyotp/pyotp)
- [requests](https://github.com/requests/requests/)
## Installation
```bash
$ pip install bxinth
```
## Usage
```python
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
```python
API_KEY = 'api_key'
API_SECRET = 'api_secret'
OTP = 'otp'
```
and run
```bash
$ python -m unittest
```
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
bxinth-0.1.tar.gz
(3.2 kB
view hashes)
Built Distribution
bxinth-0.1-py3-none-any.whl
(4.1 kB
view hashes)