Python code to turn off the buzzer after 5 sec

If the current price is greater than the selling price, the program should trigger the Bolt Cloud API to switch on the buzzer connected to the Bolt module for 5 seconds and then switches it off after 5 seconds

while True:

        bitcoin_price = get_bitcoin_price()
        print('The current bitcoin value in USD is ', bitcoin_price)

        if bitcoin_price > selling_price:
                print('The current price is  greater than selling price')
                print('current price: ' + str(bitcoin_price) + 'and selling price: ' + str(selling_price))
                response = mybolt.digitalWrite('0','HIGH')
                data = json.loads(response)
                print(data)
                time.sleep(5)
                response = mybolt.digitalWrite('0','LOW')
                data = json.loads(response)
                print(data)
        time.sleep(30)