Oddbean new post about | logout
 # BTC USD
btc_usd = [from your node]

# Price of the product in USD.
product_usd = 15.00

# Convert to sats
product_sats = (product_usd / btc_usd) * 100000000

# Format price to display with commas at hundreds place and sats units
product_sats_label = format(round(product_sats), ',') + " sats"