Feat: Adds multi currency support (#88)

This commit is contained in:
hackerESQ
2025-04-09 19:25:15 -05:00
committed by GitHub
parent 6d6f968f42
commit eae345f243
100 changed files with 17735 additions and 35761 deletions
@@ -18,9 +18,10 @@ class FallbackInterface
foreach ($providers as $provider) {
$provider = trim($provider);
$symbol = $arguments[0];
try {
Log::warning("Calling method {$method} ({$provider})");
Log::info("Calling method {$method} for {$symbol} ({$provider})");
if (! in_array($provider, array_keys(config('investbrain.interfaces', [])))) {
@@ -35,17 +36,17 @@ class FallbackInterface
$this->latest_error = $e->getMessage();
Log::warning("Failed calling method {$method} ({$provider}): {$this->latest_error}");
Log::error("Failed calling method {$method} for {$symbol} ({$provider}): {$this->latest_error}");
}
}
// don't need to throw error if calling exists
// don't need to throw error if calling exists method...
if ($method == 'exists') {
// symbol prob just doesn't exist
return false;
}
throw new \Exception("Could not get market data: {$this->latest_error}");
throw new \Exception("Could not get market data calling method {$method}: {$this->latest_error}");
}
}