1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-05 13:35:21 +02:00

Add security prices provider (Synth integration) (#1039)

* User tickers as primary lookup symbol instead of isin

* Add security price provider

* Fetch security prices in bulk to improve sync performance

* Fetch prices in bulk, better mocking for tests
This commit is contained in:
Zach Gollwitzer 2024-08-01 19:43:23 -04:00 committed by GitHub
parent c70c8b6d86
commit 453a54e5e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 584 additions and 118 deletions

View file

@ -204,7 +204,7 @@ class Account::Entry < ApplicationRecord
current_qty = account.holding_qty(account_trade.security)
if current_qty < account_trade.qty.abs
errors.add(:base, "cannot sell #{account_trade.qty.abs} shares of #{account_trade.security.symbol} because you only own #{current_qty} shares")
errors.add(:base, "cannot sell #{account_trade.qty.abs} shares of #{account_trade.security.ticker} because you only own #{current_qty} shares")
end
end
end