B 매수 호가 » 이력 » 버전 1
이태훈, 2025/02/04 05:01
| 1 | 1 | 이태훈 | h1. 매수 호가 |
|---|---|---|---|
| 2 | |||
| 3 | h3. 소스코드 |
||
| 4 | |||
| 5 | <pre> |
||
| 6 | import pybithumb |
||
| 7 | |||
| 8 | orderbook = pybithumb.get_orderbook("BTC") # 호가 정보 |
||
| 9 | bids = orderbook['bids'] # 매수 호가 정보 |
||
| 10 | |||
| 11 | # 매수 호가 상세출력 |
||
| 12 | for bid in bids: |
||
| 13 | price = bid['price'] |
||
| 14 | quant = bid['quantity'] |
||
| 15 | print("매수호가 : ", price, " 매수잔량 : ", quant) |
||
| 16 | </pre> |
||
| 17 | |||
| 18 | h3. 결과 |
||
| 19 | |||
| 20 | <pre> |
||
| 21 | 매수호가 : 155364000.0 매수잔량 : 0.0012 |
||
| 22 | 매수호가 : 155354000.0 매수잔량 : 0.0012 |
||
| 23 | 매수호가 : 155353000.0 매수잔량 : 0.0001 |
||
| 24 | 매수호가 : 155339000.0 매수잔량 : 0.0004 |
||
| 25 | 매수호가 : 155337000.0 매수잔량 : 0.0205 |
||
| 26 | </pre> |