Print Bitcoin price by getting JSON data using CoinDesk API In this code in Python, I used an API called CoinDesk to get the Bitcoin price as JSON.
I'm trying to follow the best practices in coding, so, I've used logging and I'm using a code formatter in my editor.
Kindly, any enhancements on this code will be appreciated.

# Project Idea: Bitcoin price program using CoinDesk API with Python.

# Importing libraries
import requests as rq
from datetime import datetime
import logging
import objectpath  # Read the library doc: http://objectpath.org/


def get_api_data():

    LOG_FORMAT = '%(levelname)s : %(asctime)s - %(message)s'
    logging.basicConfig(level=logging.DEBUG,
                        format=LOG_FORMAT, filemode='w')  # , datefmt='%d-%b-%y %H:%M:%S'
    logger = logging.getLogger()

    try:
        API_LINK = 'https://api.coindesk.com/v1/bpi/currentprice.json'   # CoinDesk API Link
        API_Data = rq.get(API_LINK)
        logger.debug("Getting API data - Done")

        api_data = API_Data.json()
        logger.debug("Converting API data to JSON - Done")
        return api_data

    except Exception as e:
        print("Exception occurred: ", e)
        logger.debug("Exception occurred.")


def main():

    # Getting the data from API
    data = get_api_data()
    tree_data = objectpath.Tree(data)

    time = tuple(tree_data.execute('$..updated'))

    usd = list((tree_data.execute('$..USD')))
    price = dict(usd[0])
    price_usd = price["rate"]
    price_description = price["description"] + ' - USD'

    print(f"The price in {price_description}: {price_usd}")
    print(f"Time of the price: {time}")


if __name__ == '__main__':
    main()
In general you should be more especific on the management of the exceptions, my only contribution will be to be more specific on them on the requests component. For example your code on:

def get_api_data(url):
    try:
        response = rq.get(url)
        response.raise_for_status()
        ...    
    except Exception as e:
        logger.debug("Exception occurred.", exc_info=True)


With more specific exception management

def get_api_data(url):
    try:
        response = rq.get(url)
        response.raise_for_status()
        ...    
    except requests.exceptions.RequestException as _:
        logger.debug("Exception occurred on request.", exc_info=True)
    except json.decoder.JSONDecodeError as _:
        logger.debug("Exception occurred on json decoder.", exc_info=True)