Hello @Arushi Gaur Thank you for reaching out to us on Microsoft Q&A platform. Happy to help!
Based on the details provided in the original post, I see that you are unable to retrieve the pricing for HX-series VM using Azure Retail Prices API. This is because, https://learn.microsoft.com/en-us/answers/questions/1526983/azure-retail-prices-api-missing-prices - HX-series VM is not available in West US 3 region. Same can be verified in the VM pricing page https://azure.microsoft.com/en-in/pricing/details/virtual-machines/windows/#pricing:
Hence, even via the Retail Price API, the response will be empty.
Also B16lsv2 is available in west us 3 region and we are getting the response while calling the Retail Price API: https://prices.azure.com/api/retail/prices?api-version=2023-01-01-preview&$filter=serviceName eq 'Virtual Machines' and armSkuName eq 'Standard_B16ls_v2' and armRegionName eq 'westus3'
Hope this clarifies. Do let us know if you have any questions in this matter!
If the response helped, do "Accept Answer" and up-vote it