CryptoCoinChartsApi/CryptoCoinChartsApi.py
def tradingpairs(self, pairs):
        '''
        Use this function to query price and volume data for MANY trading pairs.
        Usage: http://api.cryptocoincharts.info/tradingPairs/[currency1_currency2,currency2_currency3,...]
               A example pair: currency1_currency2 = "doge_btc"
                               currency2_currency3 = "btc_eur"
               http://api.cryptocoincharts.info/tradingPairs/"doge_btc,btc_eur"            
        '''
        url = self.API_PATH + 'tradingPairs/'
        data = { 'pairs':pairs }
        
        json_data = json.loads(self._getdata(url, data))
        
        tradingpairs = []
        for entry in json_data:
            tradingpair = TradingPair()
            tradingpair.id = entry['id']
            tradingpair.price = entry['price']
            tradingpair.price_before_24h = entry['price_before_24h']
            tradingpair.volume_first = entry['volume_first']
            tradingpair.volume_second = entry['volume_second']
            tradingpair.volume_btc = entry['volume_btc']
            tradingpair.best_market = entry['best_market']
            tradingpair.latest_trade = entry['latest_trade']
            tradingpairs.append(tradingpair)
        
        return tradingpairs
def tradingpairs(self, pairs):
        '''
        Use this function to query price and volume data for MANY trading pairs.
        Usage: http://api.cryptocoincharts.info/tradingPairs/[currency1_currency2,currency2_currency3,...]
               A example pair: currency1_currency2 = "doge_btc"
                               currency2_currency3 = "btc_eur"
               http://api.cryptocoincharts.info/tradingPairs/"doge_btc,btc_eur"            
        '''
        url = self.API_PATH + 'tradingPairs/'
        data = { 'pairs':pairs }
        
        json_data = json.loads(self._getdata(url, data))
        
        tradingpairs = []
        for entry in json_data:
            tradingpair = TradingPair()
            tradingpair.id = entry['id']
            tradingpair.price = entry['price']
            tradingpair.price_before_24h = entry['price_before_24h']
            tradingpair.volume_first = entry['volume_first']
            tradingpair.volume_second = entry['volume_second']
            tradingpair.volume_btc = entry['volume_btc']
            tradingpair.best_market = entry['best_market']
            tradingpair.latest_trade = entry['latest_trade']
            tradingpairs.append(tradingpair)
        
        return tradingpairs
def tradingpairs ( self , pairs ) : url = self . API_PATH + 'tradingPairs/' data = { 'pairs' : pairs } json_data = json . loads ( self . _getdata ( url , data ) ) tradingpairs = [ ] for entry in json_data : tradingpair = TradingPair ( ) tradingpair . id = entry [ 'id' ] tradingpair . price = entry [ 'price' ] tradingpair . price_before_24h = entry [ 'price_before_24h' ] tradingpair . volume_first = entry [ 'volume_first' ] tradingpair . volume_second = entry [ 'volume_second' ] tradingpair . volume_btc = entry [ 'volume_btc' ] tradingpair . best_market = entry [ 'best_market' ] tradingpair . latest_trade = entry [ 'latest_trade' ] tradingpairs . append ( tradingpair ) return tradingpairs
Use this function to query price and volume data for MANY trading pairs.
        Usage: http://api.cryptocoincharts.info/tradingPairs/[currency1_currency2,currency2_currency3,...]
               A example pair: currency1_currency2 = "doge_btc"
                               currency2_currency3 = "btc_eur"
               http://api.cryptocoincharts.info/tradingPairs/"doge_btc,btc_eur"
Use this function to query price and volume data for MANY trading pairs . Usage : http : // api . cryptocoincharts . info / tradingPairs / [ currency1_currency2 currency2_currency3 ... ] A example pair : currency1_currency2 = doge_btc currency2_currency3 = btc_eur http : // api . cryptocoincharts . info / tradingPairs / doge_btc btc_eur