Refactored GetPriceHistory to accept a context parameter, enabling better control over request lifecycle and cancellation. Updated the main function and deferred body close logic to align with the new context usage. This improves code robustness and readability.