def trades(currency, tid=None, since=None): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name c = "" if currency == constants.BTC: c = "" if currency == constants.LTC: c = "_litecoin" # IMPROVE # viz dokumentace # nelze kombinovat since & tid # neni to uplne jeste je mozne nastavovat time_inicial ... params = {} if tid: params["tid"] = tid if since: params["since"] = since # complete request cr = core.request(s, r).replace(constants.CURRENCY_PATTERN, c) + urllib.parse.urlencode(params) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def ticker(id): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name # complete request cr = core.request(s, r).replace(constants.SYMBOL_PATTERN, id) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def orderbook(currency): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name # complete request cr = core.request(s, r).replace(constants.CURRENCY_PATTERN, currency) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def tickers(): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name # complete request cr = core.request(s, r) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def funds(): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name # complete request cr = core.request(s, r) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def all(cur1, cur2=constants.USD): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name symbol = cur1 + cur2 # complete request cr = core.request(s, r).replace(constants.SYMBOL_PATTERN, symbol) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def graph1m(cur1, cur2): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name symbol = cur1.upper().strip() + cur2.upper().strip() # complete request cr = core.request(s, r).replace(constants.SYMBOL_PATTERN, symbol) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def ticker(cur1, cur2): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name symbol = cur1.capitalize() + cur2.capitalize() # complete request cr = core.request(s, r).replace(constants.SYMBOL_PATTERN, symbol) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def trades(pair): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name params = {} params["pair"] = pair # complete request cr = core.request(s, r) + urllib.parse.urlencode(params) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def tick(cur1, cur2): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name # complete request cr = core.request(s, r).replace(constants.CUR1_PATTERN, cur1.strip().upper()) cr = cr.replace(constants.CUR2_PATTERN, cur2.strip().upper()) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def orderbook(cur1, cur2=constants.USD): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name symbol = cur1 + cur2 # complete request cr = core.request(s, r).replace(constants.SYMBOL_PATTERN, symbol) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def orderbook(symbol="btcusd"): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name params = {} if symbol: params["symbol"] = symbol # complete request cr = core.request(s, r) + urllib.parse.urlencode(params) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def xticker(callback=None): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name params = {} if callback: params["callback"] = callback # complete request cr = core.request(s, r) + urllib.parse.urlencode(params) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def trades(symbol, since=None): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name params = {} if since: params["since"] = since # complete request cr = core.request(s, r).replace(constants.SYMBOL_PATTERN, symbol) + urllib.parse.urlencode(params) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def order_book(pair, limit=None): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name params = {} params["pair"] = pair if limit: params["limit"] = limit # complete request cr = core.request(s, r) + urllib.parse.urlencode(params) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def trades(cur1, cur2,since=None): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name symbol = cur1.capitalize() + cur2.capitalize() params = {} if since: params["since"] = since # complete request cr = core.request(s, r).replace(constants.SYMBOL_PATTERN, symbol) + urllib.parse.urlencode(params) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def graph1y(cur1, cur2): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name symbol = cur1.upper().strip() + cur2.upper().strip() # complete request cr = core.request(s, r).replace(constants.SYMBOL_PATTERN, symbol) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s)) # IMPROVE # CTRANSFER DODELAT NEBO NEJAK VYRESIT
def ticker(currency): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name c = "" if currency == constants.BTC: c = "" if currency == constants.LTC: c = "_litecoin" # complete request cr = core.request(s, r).replace(constants.CURRENCY_PATTERN, c) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def detail(cur1, cur2): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name # IMPROVE # strip() # lower() cur2_translation = "" if cur2 == "cny": cur2_translation = "static" if cur2 == "usd": cur2_translation = cur2 # complete request cr = core.request(s, r).replace(constants.CUR1_PATTERN, cur1) cr = cr.replace(constants.CUR2_PATTERN, cur2_translation) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))
def trades(cur1, cur2=constants.USD, since=None, sort=None): s = __name__.split(".")[1] r = sys._getframe().f_code.co_name symbol = cur1 + cur2 # sort = # "desc" - returns the transactions in the order of newest to oldest # "asc" - for the return transaction in reverse params = {} if since: params["since"] = since # complete request cr = core.request(s, r).replace(constants.SYMBOL_PATTERN, symbol) + urllib.parse.urlencode(params) return core.get(core.hostname(s), cr, core.header(s), core.compression(s), core.timeout(s))