import pykorbit email = "*****@*****.**" password = "******" key = "TVMtMRtcap22CRnFeegege84cNDuTJVmvv9FaGWJTRriY7b8cWKIez7eGGkzan0" secret = "MEasLLFhahGAyUucm7refegEEgpvBfTUe3A2DiMA48o4egegEEv9pBmLUq4e3pM" korbit = pykorbit.Korbit(email, password, key, secret) order = korbit.sell_market_order("XRP", 20) print(order)
def _login(self): self.email = self.lineEdit.text() self.password = self.lineEdit_2.text() self.korbit = pykorbit.Korbit(self.email, self.password, self.key, self.secret) self.login_status = True
def create_korbit(self): self.read_secret() self.korbit = pykorbit.Korbit(self.email, self.password, self.key, self.secret)
#----------------------------------------------------------------------------------------------------------------------- # Public API #----------------------------------------------------------------------------------------------------------------------- print(pykorbit.get_current_price("BTC")) print(pykorbit.get_market_detail("BTC")) print(pykorbit.get_orderbook("BTC")) print(pykorbit.get_transaction_data("BTC")) print(pykorbit.get_constants()) #----------------------------------------------------------------------------------------------------------------------- # Private API #----------------------------------------------------------------------------------------------------------------------- f = open("keys.csv") lines = f.readlines() f.close() key = lines[1].split(',')[0] secret = lines[1].split(',')[1] korbit = pykorbit.Korbit("*****@*****.**", "your-pass-word", key, secret) # 주문 제약 조건 print(korbit._get_tick_size("BTC")) print(korbit._get_quantity_min_max("BTC")) print(korbit._get_price_min_max("BTC")) #----------------------------------------------------------------------------------------------------------------------- # history #----------------------------------------------------------------------------------------------------------------------- print(pykorbit.get_ohlc("BTC", start="2018-02-01", end="2018-02-03")) print(pykorbit.get_ohlc("BTC", period=5)) print(pykorbit.get_ohlc("BTC", end="2018-02-03", period=5))