AssetManager.API/AssetManager.Infrastructure/Services/IExchangeRateService.cs
OpenClaw Agent 1977dd609d fix: 请求收益曲线时自动回填历史数据
- GetNavHistoryAsync现在会自动检查是否有历史数据
- 无历史数据时自动调用BackfillNavHistoryInternalAsync
- 拆分内部回填方法,避免重复验证权限
2026-03-13 16:21:31 +00:00

25 lines
932 B
C#
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace AssetManager.Infrastructure.Services;
/// <summary>
/// 汇率服务接口(预留,后续实现多币种汇总)
/// </summary>
public interface IExchangeRateService
{
/// <summary>
/// 获取汇率(从源币种转换为目标币种)
/// </summary>
/// <param name="fromCurrency">源币种(如 CNY</param>
/// <param name="toCurrency">目标币种(如 USD</param>
/// <returns>汇率1 单位源币种可兑换的目标币种数量)</returns>
Task<decimal> GetExchangeRateAsync(string fromCurrency, string toCurrency);
/// <summary>
/// 转换金额
/// </summary>
/// <param name="amount">金额</param>
/// <param name="fromCurrency">源币种</param>
/// <param name="toCurrency">目标币种</param>
/// <returns>转换后的金额</returns>
Task<decimal> ConvertAmountAsync(decimal amount, string fromCurrency, string toCurrency);
}