# 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
```
Metadata
Release files for bxinth 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bxinth-0.1.2.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bxinth-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.6 kB
Release files / bxinth-0.1.2.tar.gz
| Download URL | bxinth-0.1.2.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
530c02470fd4c03683d11546ce4d519ccbc51f3e58176b6d9d86bb961491f6ee
|
|
BLAKE2b-256 checksum How to use checksums |
30ba9c2a8eba2989b7def11c5633ead1f2b73b32307b572fae2c23fd79fde040
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/18.2 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.2
|
Release files / bxinth-0.1.2-py3-none-any.whl
| Download URL | bxinth-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8613f0dc36632126eb32cae27a881d7023c9dc3dabcfb1af8035de18a832b0be
|
|
BLAKE2b-256 checksum How to use checksums |
57d4b670a4f898badcb170eba9624bd379f6b3951d3e8be719ac91924d94dac4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/18.2 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.2
|