fix: standardize currency

This commit is contained in:
hackerESQ
2025-09-13 22:13:15 -05:00
parent 50285a3d51
commit 72ad02de4b
@@ -38,6 +38,14 @@ class Quote extends MarketDataType
public function setCurrency(string $currency): self 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); $this->items['currency'] = strtoupper((string) $currency);
return $this; return $this;