From 72ad02de4b75e0aa1dec14f8d33c2ca36f0728f2 Mon Sep 17 00:00:00 2001 From: hackerESQ Date: Sat, 13 Sep 2025 22:13:15 -0500 Subject: [PATCH] fix: standardize currency --- app/Interfaces/MarketData/Types/Quote.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Interfaces/MarketData/Types/Quote.php b/app/Interfaces/MarketData/Types/Quote.php index 6113a2c..c7805ab 100644 --- a/app/Interfaces/MarketData/Types/Quote.php +++ b/app/Interfaces/MarketData/Types/Quote.php @@ -38,6 +38,14 @@ class Quote extends MarketDataType public function setCurrency(string $currency): self { + // need to standardize to ISO 4217 + $currency = match ($currency) { + 'US' => 'USD', + 'CA' => 'CAD', + 'GBp' => 'GBX', + default => $currency + }; + $this->items['currency'] = strtoupper((string) $currency); return $this;