using YLErp.DBModels;
using YLErp.Models;
namespace YLErp.Abstract.DataProviders
{
///
/// 价格提供接口
///
public interface IPriceProvider
{
///
/// 获取价格
///
double GetPrice(string instrumentCode);
///
/// 获取价格
///
bool TryGetPrice(string instrumentCode, out double price);
}
///
/// 日终结算价获取
///
public interface IEodPriceProvider
{
///
/// 获取价格
///
double GetPrice(string instrumentCode, SettlementTypeEnum settlementType);
///
/// 获取价格
///
bool TryGetPrice(string instrumentCode, SettlementTypeEnum settlementType, out double price);
}
///
/// 日终结算价获取
///
public interface IEodPriceProviderV2
{
///
/// 获取标的收盘价或结算价(如果标的在取值日之前已到期,则取标的到期日的收盘价或结算价)
///
bool TryGetEodPrice(string instrumentCode, out EodPrice eodPrice);
}
///
/// 日终价格封装接口
///
public interface IEodPriceProviderWrap : IPriceProvider
{
SettlementTypeEnum SettlementType { get; }
}
///
/// 篮子标的价格提供接口
/// 特别抽出这个接口也是为了防止数据库被恶意配置了篮子标的的死循环引用数据
///
public interface IBasketPriceProvider
{
///
/// 获取篮子的子标的价格
///
bool TryGetSubPrice(string underlyingCode, out double price, out double settlePrice);
}
///
/// 多个价格提供接口聚合提供价格
///
public interface IAggregatePriceProvider : IPriceProvider
{
}
}