<commit_before>#!/usr/bin/env python

import urllib, urllib2
import time, json
import hmac, hashlib

# Public methods
class public:
	
	def request(self, endpoint):
    	me = urllib2.urlopen(urllib2.Request(endpoint))
        return json.loads(me.read(), 'UTF-8')

    def returnTicker(self):
    	return self.request('https://poloniex.com/public?command=returnTicker')

    def return24hVolume(self):
        return self.request('https://poloniex.com/public?command=return24hVolume')

    def returnOrderBook (self, currencyPair, depth = 10):
    	return self.request('''
    		https://poloniex.com/public?command=returnOrderBook&currencyPair=%s&depth=%s
            ''' % (currencyPair, depth))

    def returnTradeHistory (self, currencyPair, start = None, end = None):
    	if (start == None or end == None):
    		return self.request('''<commit_msg>Update api.py<commit_after>#!/usr/bin/env python

import urllib, urllib2
import time, json
import hmac, hashlib

# Public methods
class public:
	
    def request(self, endpoint):
    	me = urllib2.urlopen(urllib2.Request(endpoint))
        return json.loads(me.read(), 'UTF-8')

    def returnTicker(self):
    	return self.request('https://poloniex.com/public?command=returnTicker')

    def return24hVolume(self):
        return self.request('https://poloniex.com/public?command=return24hVolume')

    def returnOrderBook (self, currencyPair, depth = 10):
    	return self.request('''
    		https://poloniex.com/public?command=returnOrderBook&currencyPair=%s&depth=%s
            ''' % (currencyPair, depth))

    def returnTradeHistory (self, currencyPair, start = None, end = None):
    	if (start == None or end == None):
    		return self.request('''
{'fraction_non_alphanumeric': 0.136337039204213, 'fraction_numerical': 0.011702750146284377, 'mean_word_length': 3.803370786516854, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5126011', 'n_tokens_mistral': 564, 'n_tokens_neox': 549, 'n_words': 116}