Ejemplo n.º 1
0
    def parse_detail(self):
        tickers = pybithumb.get_tickers()

        for ticker in tickers:
            # price = pybithumb.get_current_price(ticker)   # 현재가 조회
            detail = pybithumb.get_market_detail(
                ticker)  # 저가, 고가, 평균 거래 금액, 거래량
            print(ticker, detail)

            orderbook = pybithumb.get_orderbook(
                ticker)  # 시점, 거래화폐, 코인명, 매도호가, 매수호가
            print(
                orderbook["order_currency"] + " / " +
                orderbook["payment_currency"],
                datetime.datetime.fromtimestamp(
                    int(orderbook["timestamp"]) / 1000))
            for bid in orderbook['bids']:
                print("매수호가: ", bid['price'], "매수잔량: ", bid['quantity'])
            for ask in orderbook['asks']:
                print("매도호가: ", bid['price'], "매도잔량: ", bid['quantity'])

            time.sleep(0.1)
Ejemplo n.º 2
0

def find_center()
    pass
def find_boundary()
    pass
def process()
    pass


bithumb = bit.Bithumb(con_key, sec_key)
tmp =  int(input("input buy price"))

while True:
    price = bit.get_current_price("XRP")
    print(price)
    detail = bit.get_market_detail("XRP")
    print(detail)
    if type(price) != int:
        time.sleep(1)
        continue
    if(price <= tmp):
        order = bithumb.buy_market_order("XRP", 5)
        print(order)
        print("completed", price)
        break
    time.sleep(1)

    

Ejemplo n.º 3
0
import pybithumb as bt
import datetime

# tickers = bt.get_tickers()
#
# for i in str(1)*3:
#     price = bt.get_current_price("BTC")
#     print(price)
#     time.sleep(1)

detail = bt.get_market_detail("BTC")
print(detail)

# orderbook = bt.get_orderbook("BTC")
# bids = orderbook['bids']
# asks = orderbook['asks']
#
# for bid in bids:
#     price = bid['price']
#     quant = bid['quantity']
#     print("매수호가:", price, "매수잔량:", quant)
#
# for ask in asks:
#     print(ask)
# ms = int(orderbook["timestamp"])
# dt = datetime.datetime.fromtimestamp(ms/1000)
# print(dt)
# for k in orderbook:
#     print(k)
#
# all = bt.get_current_price("ALL")
Ejemplo n.º 4
0
import pybithumb

detail = pybithumb.get_market_detail("BTC")
print(detail)
print(type(detail))
Ejemplo n.º 5
0
import pybithumb
import time

tickers = pybithumb.get_tickers()

# for ticker in tickers:
# price = pybithumb.get_current_price(ticker)
# print(ticker, price)
# time.sleep(0.1)
detail = pybithumb.get_market_detail('BTC')
print(detail)
Ejemplo n.º 6
0
Coins = None

# ----- GUI SET ------#
app = QApplication(sys.argv)

while True:

    # ------- INPUT COIN -------#
    if Resetcnt == 1:
        Coinlist = pybithumb.get_tickers()  # 새로 찍어줘야함 ( 새로운 코인 탄생 )
        Fluclist = []  # 새로 찍을때만 초기화

        while True:
            try:
                for Coin in Coinlist:
                    tickerinfo = pybithumb.get_market_detail(Coin)
                    data = tickerinfo['data']
                    fluctate = data['fluctate_rate_24H']
                    Fluclist.append(fluctate)
                    time.sleep(1 / 90)
                break
            except Exception as e:
                Fluclist.append(None)
                print(e)

        Fluclist = list(map(float, Fluclist))
        series = Series(Fluclist, Coinlist)
        series = series.sort_values(ascending=False)

        # 선별할 코인 개수 : 상승장에 있는 코인들을 선별할 줄 알아야한다.
        series = series[0:CoinVolume]
import pybithumb
import time
import datetime

# 티커를 리스트로 받음
tickers = pybithumb.get_tickers()

#BTC의 현재가
price = pybithumb.get_current_price("BTC")
# 모든 티커의 현재가
all = pybithumb.get_current_price("ALL")
for ticker, data in all.items():
    print(ticker, data['closing_price'])

#한 종목의 정보
detail = pybithumb.get_market_detail("BTC")  # 저가, 고가, 평균 거래 금액, 거래량

#호가창의 정보
orderbook = pybithumb.get_orderbook("BTC")
ms = int(orderbook["timestamp"])
dt = datetime.datetime.fromtimestamp(ms / 1000)  #현재 시간