본문 바로가기
데이터 분석

1. binance 현재가 조회

by 모아모아 리뷰 2024. 6. 17.
반응형
import ccxt
import pprint

binance = ccxt.binance()

markets = binance.load_markets()
btc = binance.fetch_ticker("BTC/USDT")
pprint.pprint(btc)
print('현재가', btc['last'])
{'ask': 66700.01,
 'askVolume': 11.57938,
 'average': 66454.435,
 'baseVolume': 9860.27188,
 'bid': 66700.0,
 'bidVolume': 6.66904,
 'change': 491.15,
 'close': 66700.01,
 'datetime': '2024-06-17T00:52:18.513Z',
 'high': 66998.7,
 'info': {'askPrice': '66700.01000000',
          'askQty': '11.57938000',
          'bidPrice': '66700.00000000',
          'bidQty': '6.66904000',
          'closeTime': '1718585538513',
          'count': '716926',
          'firstId': '3638072501',
          'highPrice': '66998.70000000',
          'lastId': '3638789426',
          'lastPrice': '66700.01000000',
          'lastQty': '0.00132000',
          'lowPrice': '66034.50000000',
          'openPrice': '66208.86000000',
          'openTime': '1718499138513',
          'prevClosePrice': '66208.87000000',
          'priceChange': '491.15000000',
          'priceChangePercent': '0.742',
          'quoteVolume': '655934284.52393000',
          'symbol': 'BTCUSDT',
          'volume': '9860.27188000',
          'weightedAvgPrice': '66522.94100068'},
 'last': 66700.01,
 'low': 66034.5,
 'open': 66208.86,
 'percentage': 0.742,
 'previousClose': 66208.87,
 'quoteVolume': 655934284.52393,
 'symbol': 'BTC/USDT',
 'timestamp': 1718585538513,
 'vwap': 66522.94100068}
현재가 66700.01​
 

 

 

반응형

최근댓글

최근글

skin by © 2024 ttutta