Skip to content

Commit 0aef702

Browse files
authored
Merge pull request #1 from xbklairith/feature/rest-client
Feature/rest client
2 parents 7726a47 + 7e10554 commit 0aef702

13 files changed

Lines changed: 1592 additions & 10 deletions

.flake8

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[flake8]
2+
max-line-length = 99
3+
enable-extensions = G
4+
extend-ignore =
5+
G200, G202,
6+
# black adds spaces around ':'
7+
E203,
8+
# E501 line too long (let black handle line length)
9+
E501
10+
# B305 `.next()` is not a thing on Python 3
11+
B305
12+
13+
14+
per-file-ignores =
15+
# E402 module level import not at top of file
16+
# B011 Do not call assert False since python -O removes these calls
17+
# F405 'Foo' may be undefined, or defined from star imports
18+
# E741 ambiguous variable name
19+
# B007 Loop control variable 'foo' not used within the loop body
20+
# F403 'from foo import *' used; unable to detect undefined names
21+
# B001 Do not use bare `except:`
22+
# E722 do not use bare 'except'
23+
# E731 do not assign a lambda expression, use a def
24+
# F811 redefinition of unused 'foo' from line XXX
25+
# F841 local variable 'foo' is assigned to but never used
26+
tests/*: E402, B011, F405, E741, B007, F403, B001, E722, E731, F811, F841

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,4 @@ cython_debug/
158158
# and can be added to the global gitignore or merged into this file. For a more nuclear
159159
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160160
#.idea/
161+
test.ipynb

README.md

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,53 @@
11
# bitkub-python
2-
A Python wrapper for Bitkub API
2+
A Python client for Bitkub API
3+
4+
## ⚠️ Disclaimer: This is not an official Bitkub library. Use at your own risk.
5+
- This library is not guaranteed to be up-to-date with the latest Bitkub API.
6+
- Before using the library, please check the [API documentation](https://github.com/bitkub/bitkub-official-api-docs) to be informed about the latest updated or possible bugs.
7+
8+
9+
## Features
10+
- Trading support
11+
- General market data and account information
12+
- Handling of authentication
13+
- Deposit and withdrawal of funds
14+
15+
16+
17+
18+
19+
## Getting Started
20+
21+
[Generate an API Key](https://www.bitkub.com/en/api-management) and assign permissions.
22+
23+
### Installation
24+
```bash
25+
pip install bitkub-python
26+
```
27+
28+
29+
### Usage
30+
```python
31+
from bitkub import Client
32+
client = Client("apikey" , "apisecret")
33+
34+
orderbooks = client.fetch_depth(symbol='THB_ETH', limit=10)
35+
36+
# create order
37+
order = client.create_order_buy(symbol='USDT_THB', amount=10, rate=30)
38+
39+
# cancel order
40+
client.cancel_order(order_id=order['id'])
41+
42+
# fetch open orders
43+
client.fetch_open_orders(symbol='BTC_THB')
44+
45+
```
46+
47+
48+
## Buy me a coffee ☕
49+
if you find this library useful, please consider buying me a coffee.
50+
- [Buy me a coffee ☕](https://www.buymeacoffee.com/xbklairith)
51+
52+
Ref :
53+
- [bitkub-official-api-doc](https://github.com/bitkub/bitkub-official-api-docs)

bitkub/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
"""An unofficial Python wrapper for Bitkub API
1+
"""An unofficial Python client library for Bitkub API
22
33
"""
44

55
__version__ = "0.0.1"
6+
7+
from .client import Client # noqa: F401
8+
from .exception import BitkubException # noqa: F401
9+
10+
__all__ = ["Client", "BitkubException"]

0 commit comments

Comments
 (0)