-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathclient.py
74 lines (62 loc) · 1.88 KB
/
client.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
from . import models
class Upbit:
"""
Upbit Client
Please read the official Upbit Client document.
Documents: https://ujhin.github.io/upbit-client-docs/
- Base URL: https://api.upbit.com
- Base Path: /v1
- Upbit OPEN API Version: 1.3.4
- Author: ujhin
- Email: [email protected]
- GitHub: https://github.com/uJhin
- Official OPEN API Documents: https://docs.upbit.com
- Official Support Email: [email protected]
"""
def __init__(
self,
access_key: str = None,
secret_key: str = None,
**kwargs
):
self.__client = models.ClientModel(
access_key=access_key,
secret_key=secret_key,
**kwargs
).SWGClient
self.__APIKey = models.APIKey(self.__client)
self.__Account = models.Account(self.__client)
self.__Candle = models.Candle(self.__client)
self.__Deposit = models.Deposit(self.__client)
self.__Market = models.Market(self.__client)
self.__Order = models.Order(self.__client)
self.__Trade = models.Trade(self.__client)
self.__Withdraw = models.Withdraw(self.__client)
@property
def APIKey(self):
return self.__APIKey
@property
def Account(self):
return self.__Account
@property
def Candle(self):
return self.__Candle
@property
def Deposit(self):
return self.__Deposit
@property
def Market(self):
return self.__Market
@property
def Order(self):
return self.__Order
@property
def Trade(self):
return self.__Trade
@property
def Withdraw(self):
return self.__Withdraw
def __str__(self):
return self.__repr__()
def __repr__(self):
return f"UpbitClient({models.HOST})"