def get_detail(symbol): """ :param symbol :return: """ params = {'symbol': symbol} url = Utils.MARKET_URL + '/market/detail' return Utils.http_get_request(url, params)
def get_ticker(symbol): """ :param symbol: :return: """ params = {'symbol': symbol} url = Utils.MARKET_URL + '/market/detail/merged' return Utils.http_get_request(url, params)
def get_depth(symbol, type): """ :param symbol :param type: 可选值:{ percent10, step0, step1, step2, step3, step4, step5 } :return: """ params = {'symbol': symbol, 'type': type} url = Utils.MARKET_URL + '/market/depth' return Utils.http_get_request(url, params)
def get_kline(symbol, period, size=150): """ :param symbol :param period: 可选值:{1min, 5min, 15min, 30min, 60min, 1day, 1mon, 1week, 1year } :param size: 可选值: [1,2000] :return: """ params = {'symbol': symbol, 'period': period, 'size': size} url = Utils.MARKET_URL + '/market/history/kline' return Utils.http_get_request(url, params)