Interface IMarket
- Namespace
- Sportradar.OddsFeed.SDK.Entities
- Assembly
- Sportradar.OddsFeed.SDK.dll
Represents a betting market
public interface IMarket
Properties
AdditionalInfo
Gets the IReadOnlyDictionary<TKey, TValue> containing additional market information
IReadOnlyDictionary<string, string> AdditionalInfo { get; }
Property Value
Id
Gets a int value specifying the market type
int Id { get; }
Property Value
MarketDefinition
Gets the associated market definition instance
IMarketDefinition MarketDefinition { get; }
Property Value
Specifiers
Gets a IReadOnlyDictionary<TKey, TValue> containing market specifiers
IReadOnlyDictionary<string, string> Specifiers { get; }
Property Value
Remarks
Note that the Id and Specifiers combined uniquely identify the market within the event
Methods
GetMappedMarketIdsAsync()
Asynchronously gets the mapping Ids of the specified market
Task<IEnumerable<IMarketMapping>> GetMappedMarketIdsAsync()
Returns
- Task<IEnumerable<IMarketMapping>>
Returns the mapping Ids of the specified market
Examples
foreach (var marketMapping in mappedIds)
{
if (marketMapping is LcooMarketMapping lcooId)
{
_log.LogInformation($"Market {market.Id} mapping TypeId:{lcooId.TypeId}, Sov:'{lcooId.Sov}'");
}
else if (marketMapping is LoMarketMapping loId)
{
_log.LogInformation($"Market {market.Id} mapping TypeId:{loId.TypeId}, SubTypeId:{loId.SubTypeId}, Sov:'{loId.Sov}'");
}
}
Remarks
The result is LoMarketMapping or LcooMarketMapping
GetNameAsync(CultureInfo)
Asynchronously gets the name of the market in the specified language
Task<string> GetNameAsync(CultureInfo culture)
Parameters
cultureCultureInfoA CultureInfo specifying the language in which to get the name
Returns
- Task<string>
A Task<TResult> representing the async operation