# 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
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.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bxinth-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.3 kB
Release files / bxinth-0.1.tar.gz
| Download URL | bxinth-0.1.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d92e37ba081ab0266c1e1136ef8ed0710ee2ca3a6201dcb5c607402ea50c7d53
|
|
BLAKE2b-256 checksum How to use checksums |
af4e65a73834a9a7f54616ece62052352cbf0a94967e7ff0a4338d110424b266
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / bxinth-0.1-py3-none-any.whl
| Download URL | bxinth-0.1-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9bb8eabdd1343a3c7558567f44bb58e268a76e5ff2bf3b3c684cc066191a6f0b
|
|
BLAKE2b-256 checksum How to use checksums |
99596a9c01a587f9b45248de135a2e63e21ab3454195307b6fc71a901bf42ed7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |