U 잔고조회 » 이력 » 버전 1
이태훈, 2025/02/10 01:38
| 1 | 1 | 이태훈 | h1. 잔고조회 |
|---|---|---|---|
| 2 | |||
| 3 | h3. 소스코드 |
||
| 4 | |||
| 5 | <pre> |
||
| 6 | import pyupbit |
||
| 7 | |||
| 8 | access_key = "" # 본인 key값 |
||
| 9 | secret_key = "" # 본인 key값 |
||
| 10 | |||
| 11 | upbit = pyupbit.Upbit(access_key, secret_key) |
||
| 12 | print(upbit.get_balances()) |
||
| 13 | </pre> |
||
| 14 | |||
| 15 | h3. 결과 |
||
| 16 | |||
| 17 | <pre> |
||
| 18 | [{'currency': 'KRW', 'balance': '150000.2', 'locked': '0', 'avg_buy_price': '0', 'avg_buy_price_modified': True, 'unit_currency': 'KRW'}, {'currency': 'BTC', 'balance': '0.00009524', 'locked': '0', 'avg_buy_price': '69722000', 'avg_buy_price_modified': False, 'unit_currency': 'KRW'}] |
||
| 19 | </pre> |