How to find the number of times a discount code has been used using Shopify Discount API

Hi Guys,

I’m developing a custom shopify app to fetch discount codes on real time using Shopify Discount API to update the discount values on cart drawer.

I have been able to figure out everything except for “how to find that how many times a discount code has been used in the past” or “if a visiting customer has used the same discount code in the past”.

I can find the max number of usage of a discount code set in admin but not how many times it has already been used.

I’m not able to find any parameter for these 2 conditions, can anyone please help me out here?