You'll want to store the maximum leverage seen each day and record it at the end of the day. Some code for that at this link although it is tough to work with.
An easier way that doesn't provide as much detail yet catches any new maximum is this from https://www.quantopian.com/posts/max-intraday-leverage:
def handle_data(context, data):
if 'mx_lvrg' not in context: # Max leverage
context.mx_lvrg = 0 # Init this instead in initialize() for better efficiency
if context.account.leverage > context.mx_lvrg:
context.mx_lvrg = context.account.leverage
record(mx_lvrg = context.mx_lvrg) # Record maximum leverage encountered
The common practice of doing record(leverage = context.account.leverage) misses 389 of 390 minutes of the trading day.
Look at every minute like above if you want to do well.