Commit a784f14
committed
fix(fetcher): resolve minor currencies against non-USD bases via inverse pair
Cash positions in less-traded currencies (UAH, in the reported case)
were silently dropping out of every total when the portfolio used a
non-USD base. Yahoo only publishes the major pairs in one direction
-- ``EURUAH=X`` exists but ``UAHEUR=X`` doesn't -- so a portfolio with
UAH cash and an EUR base couldn't be valued at all for that row,
which rendered as ``N/A`` in the table and made the freshly-added
aggregate footer ``N/A`` too.
Falling back to the inverse ticker when the direct one is missing
recovers the rate for every minor currency Yahoo carries against the
base in either direction, without forcing every user to add USD as
an intermediate hop in their YAML. The fallback only fires when the
direct pass leaves something unresolved, so the common case still
costs a single yfinance call.
Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com>1 parent 176bd59 commit a784f14
2 files changed
Lines changed: 81 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
382 | | - | |
383 | | - | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
384 | 388 | | |
385 | 389 | | |
386 | 390 | | |
| |||
396 | 400 | | |
397 | 401 | | |
398 | 402 | | |
399 | | - | |
400 | | - | |
401 | | - | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
402 | 412 | | |
403 | | - | |
404 | | - | |
405 | 413 | | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
410 | 436 | | |
411 | 437 | | |
412 | 438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
| 383 | + | |
| 384 | + | |
384 | 385 | | |
385 | 386 | | |
386 | 387 | | |
387 | 388 | | |
388 | 389 | | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
389 | 431 | | |
390 | 432 | | |
391 | 433 | | |
| |||
0 commit comments