def get_crypto_info(symbol, info=None): """Gets information about a crpyto currency. :param symbol: The crypto ticker. :type symbol: str :param info: Will filter the results to have a list of the values that correspond to key that matches info. :type info: Optional[str] :returns: [dict] If info parameter is left as None then will return a dictionary of key/value pairs for each ticker. \ Otherwise, it will be a strings representing the value of the key. :Dictionary Keys: * asset_currency * display_only * id * max_order_size * min_order_size * min_order_price_increment * min_order_quantity_increment * name * quote_currency * symbol * tradability """ url = urls.crypto_currency_pairs() data = helper.request_get(url, 'results') data = [x for x in data if x['asset_currency']['code'] == symbol] if len(data) > 0: data = data[0] else: data = None return (helper.filter_data(data, info))
def get_crypto_currency_pairs(info=None): """Gets a list of all the cypto currencies that you can trade :param info: Will filter the results to have a list of the values that correspond to key that matches info. :type info: Optional[str] :returns: If info parameter is left as None then the list will contain a dictionary of key/value pairs for each ticker. \ Otherwise, it will be a list of strings where the strings are the values of the key that corresponds to info. """ url = urls.crypto_currency_pairs() data = helper.request_get(url, 'results') return(helper.filter(data, info))
def get_crypto_info(symbol, info=None): """Gets information about a crpyto currency. :param symbol: The crypto ticker. :type symbol: str :param info: Will filter the results to have a list of the values that correspond to key that matches info. :type info: Optional[str] :returns: If info parameter is left as None then the list will contain a dictionary of key/value pairs for each ticker. \ Otherwise, it will be a list of strings where the strings are the values of the key that corresponds to info. """ url = urls.crypto_currency_pairs() data = helper.request_get(url, 'results') data = [x for x in data if x['asset_currency']['code'] == symbol] if len(data) > 0: data = data[0] else: data = None return(helper.filter(data, info))
def get_crypto_currency_pairs(info=None): """Gets a list of all the cypto currencies that you can trade. :param info: Will filter the results to have a list of the values that correspond to key that matches info. :type info: Optional[str] :returns: [list] If info parameter is left as None then the list will contain a dictionary of key/value pairs for each ticker. \ Otherwise, it will be a list of strings where the strings are the values of the key that corresponds to info. :Dictionary Keys: * asset_currency * display_only * id * max_order_size * min_order_size * min_order_price_increment * min_order_quantity_increment * name * quote_currency * symbol * tradability """ url = urls.crypto_currency_pairs() data = helper.request_get(url, 'results') return (helper.filter_data(data, info))