<commit_before># -*- coding: utf-8 -*-

import hmac
import json
import hashlib
import time
import base64
import requests
from cryptotik.common import APIError, headers, ExchangeWrapper
from decimal import Decimal


class Cryptopia(ExchangeWrapper):

    url = 'https://www.cryptopia.co.nz/'
    name = 'cryptopia'
    delimiter = "_"
    headers = headers
    taker_fee, maker_fee = 0.00, 0.00

    @classmethod
    def format_pair(cls, pair):
        """format the pair argument to format understood by remote API."""

        pair = pair.replace("-", cls.delimiter)

        if not pair.isupper():
            return pair.upper()
        else:
            return pair

    def __init__(self, apikey=None, secret=None, timeout=None, proxy=None):
        '''initialize class'''

        if apikey and secret:
            self.apikey = apikey
            self.secret = secret

        if proxy:
            assert proxy.startswith('https'), {'Error': 'Only https proxies supported.'}
        self.proxy = {'https': proxy}

        if not timeout:<commit_msg>Cryptopia: implement base_currencies atribute.<commit_after># -*- coding: utf-8 -*-

import hmac
import json
import hashlib
import time
import base64
import requests
from cryptotik.common import APIError, headers, ExchangeWrapper
from decimal import Decimal


class Cryptopia():

    url = 'https://www.cryptopia.co.nz/'
    name = 'cryptopia'
    delimiter = "/"
    headers = headers
    taker_fee, maker_fee = 0.00, 0.00
    quote_order = 0
    base_currencies = ['btc']

    @classmethod
    def format_pair(cls, pair):
        """format the pair argument to format understood by remote API."""

        pair = pair.replace("-", cls.delimiter)

        if not pair.isupper():
            return pair.upper()
        else:
            return pair

    def get_base_currencies(self):
        '''return base markets supported by this exchange.'''
        raise NotImplementedError

    def __init__(self, apikey=None, secret=None, timeout=None, proxy=None):
        '''initialize class'''

        if apikey and secret:
            self.apikey = apikey
            self.secret = secret

        if proxy:
            assert proxy.startswith('https'), {'Error': 'Only https proxies supported.'}
        self.proxy = {'https': proxy}

        if not timeout:
{'fraction_non_alphanumeric': 0.10674157303370786, 'fraction_numerical': 0.008210890233362144, 'mean_word_length': 2.4917043740573153, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '3587667', 'n_tokens_mistral': 686, 'n_tokens_neox': 637, 'n_words': 205}