import requests
import json


def get_ccy_pair_stats(ccy_pair: str,
                       base_url: str = 'https://api.pro.coinbase.com/products') -> dict:
    """Method to get the statistics from Coinbase API for desired ccy pair"""
    print(f'Getting CCYPAIR stats for {ccy_pair}')
    conn = requests.get(url=f'{base_url}/{ccy_pair}/stats')
    ccy_content = json.loads(conn.content)
    ccy_content['pair'] = ccy_pair
    return ccy_content