<commit_before>"""
Task:
Descripion of script here.
"""

# Import Built-Ins
import logging

# Import Third-Party

# Import Homebrew
from bitex.api.rest import BitstampREST

# Init Logging Facilities
log = logging.getLogger(__name__)


class Bitstamp(BitstampREST):
    def __init__(self, key='', secret='', key_file=''):
        super(Bitstamp, self).__init__(key, secret)
        if key_file:
            self.load_key(key_file)

    def public_query(self, endpoint, **kwargs):
        return self.query('GET', endpoint, **kwargs)

    def private_query(self, endpoint, **kwargs):
        return self.query('POST', endpoint, authenticate=True, **kwargs)

    def ticker(self, pair):
        return self.public_query('v2/ticker/%s/' % pair).json()

    def hourly_ticker(self, pair):
        return self.public_query('v2/ticker_hour/%s' % pair).json()

    def order_book(self, pair):
        return self.public_query('v2/order_book/%s' % pair).json()

    def trades(self, pair, **kwargs):
        return self.public_query('v2/transactions/%s' % pair, params=kwargs).json()

    def eurusd_rate(self):
        return self.public_query('eur_usd').json()

<commit_msg>added custom pairs method to bitstamp<commit_after>"""
Task:
Descripion of script here.
"""

# Import Built-Ins
import logging

# Import Third-Party

# Import Homebrew
from bitex.api.rest import BitstampREST

# Init Logging Facilities
log = logging.getLogger(__name__)


class Bitstamp(BitstampREST):
    def __init__(self, key='', secret='', key_file=''):
        super(Bitstamp, self).__init__(key, secret)
        if key_file:
            self.load_key(key_file)

    def public_query(self, endpoint, **kwargs):
        return self.query('GET', endpoint, **kwargs)

    def private_query(self, endpoint, **kwargs):
        return self.query('POST', endpoint, authenticate=True, **kwargs)

    def ticker(self, pair):
        return self.public_query('v2/ticker/%s/' % pair).json()

    def hourly_ticker(self, pair):
        return self.public_query('v2/ticker_hour/%s' % pair).json()

    def order_book(self, pair):
        return self.public_query('v2/order_book/%s' % pair).json()

    def trades(self, pair, **kwargs):
        return self.public_query('v2/transactions/%s' % pair, params=kwargs).json()

    def eurusd_rate(self):
        return self.public_query('eur_usd').json()

    def pairs(self):
        return ['btcusd', 'btceur', 'eurusd']

{'fraction_non_alphanumeric': 0.14309278350515464, 'fraction_numerical': 0.0032989690721649486, 'mean_word_length': 3.5946969696969697, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '63065', 'n_tokens_mistral': 812, 'n_tokens_neox': 777, 'n_words': 177}