Forex API for Portfolio Valuation: Why Did the Yen Report Fall When the USD Value Stayed Flat?
TickDB Research ·
Forex API for Portfolio Valuation: Why Did the Yen Report Fall When the USD Value Stayed Flat?
When reconciling a multicurrency portfolio, where do you put a drop in the yen report if the USD value did not change? Keep an illustrative USD 10,000 valuation fixed and swap two actual USD/JPY hourly closes. The yen valuation drops by JPY 1,630. Use the worksheet and two-step calculation below to separate the asset move from the FX effect.
Suppose you are reconciling a portfolio report. At the first FX rate the asset translates to JPY 1,593,770. At the second rate it translates to JPY 1,592,140. If both valuations used the same USD 10,000 asset value, would you check the asset price first or the exchange rate?
We held the USD value at 10,000 and changed only the exchange rate. Translation accounts for the entire JPY 1,630 drop in this example. The rates came from actual API responses. The USD amounts are illustrative.

November 25, 2026, Tokyo time. The times are the bar labels returned by the API. Both yen values use actual TickDB USD/JPY hourly bar data and the same illustrative USD asset value.
Check the two FX observations before explaining the difference
USD/JPY is the number of yen per US dollar. When the rate moves from 159.377 to 159.214, each dollar translates into 0.163 fewer yen. At USD 10,000 that accounts for the JPY 1,630 change. This explains why a valuation can fall in yen while the USD asset value stays flat.
| Bar label (Tokyo time) | USD/JPY | JPY valuation |
|---|---|---|
| 13:00 | 159.377 | 1,593,770 |
| 16:00 | 159.214 | 1,592,140 |
For this retrospective calculation, we took the close fields from two completed hourly bars and kept the labels returned by the API, 13:00 and 16:00 Tokyo time. To reconstruct what an intraday screen could show at a specific time, check when you actually received the data. For an end-of-day report with a prescribed fixing source or observation time, follow the report's valuation policy.
If the asset also moves, break the difference into two steps
Keep the same actual FX observations. Now suppose the USD value rises from 10,000 to 10,100. Change the asset value first and then the exchange rate to see how much each contributes.
| What changes | Change in JPY |
|---|---|
| Asset effect. USD 100 × old FX rate of 159.377 | +15,937.70 |
| FX effect. New USD 10,100 value × FX change of −0.163 | −1,646.30 |
| Total | +14,291.40 |
As a check, JPY 1,608,061.40 minus JPY 1,593,770 is also JPY 14,291.40. Now you can say how much of the change came from the asset and how much the FX move offset. This convention changes the asset value first and the exchange rate second. Reversing that order reallocates a small amount between the two effects when both inputs change. The total stays the same. Use a consistent order across reporting periods.
Record the asset time and FX time separately
Copy this worksheet into your own notes. Replace the two USD values and exchange rates, and record the time of each input. Check that the asset and FX effects add up to the change in the report.
| Item | What to save |
|---|---|
| Native asset marks | Both USD values and the actual price time of each |
| FX observations | Both rates, quote direction, source, field and observation time |
| Report policy | Required source, cutoff and rules for missing data. For intraday replay, also save the actual receive time |
| Attribution | Asset effect, FX effect, their total and the direct difference between the two valuations |
If the asset market is closed and FX is still updating, a risk monitor can retain the last asset mark and show how exposure changes at a newer exchange rate. Display both times. For end-of-day valuation, apply the agreed source, cutoff and missing-data rule. If the required rate is unavailable, flag it or use the agreed fallback and record which observation you used.
With TickDB, query historical FX bars by currency pair, interval and date range. Save the price field and time label you used for each check. For an intraday exposure view, use a quote snapshot and record the FX and asset timestamps separately. That gives you one record for the historical calculation and another for checking how recent the price on screen was. TickDB forex market data API
FAQ
Can I use these hourly closes as the fixing?
Check the source and observation time required by the report. This example uses the close of a completed hourly bar. If your policy specifies a different fixing, retain the corresponding source and time.
Can I use the same worksheet for another currency pair?
Check whether the quote gives units of reporting currency per unit of asset currency. Multiply when the rate is quoted that way. If it is quoted the other way round, convert it to the same convention before calculating the two effects.
References
- TickDB official candlestick documentation and Forex API.
- TickDB USD/JPY hourly response for November 25, 2026. USD asset values are illustrative.
This Week's Offer

TickDB Black Friday subscription week ends at 23:59 Beijing time on November 29, 2026. Save 15% on a six-month subscription and receive an additional half month. Save 20% on an annual subscription and receive an additional month. New paid subscriptions and renewals are eligible.
Category coverage
- Forex & metals
- 1,228