namespace StockSharp.BusinessEntities
{
	using System;
	using System.Collections.Generic;

	using StockSharp.Messages;

	/// <summary>
	/// Èíòåðôåéñ ïîñòàâùèêà ìàðêåò-äàííûõ ïî èíñòðóìåíòó.
	/// </summary>
	public interface IMarketDataProvider
	{
		/// <summary>
		/// Ñîáûòèå èçìåíåíèÿ èíñòðóìåíòà.
		/// </summary>
		event Action<Security, IEnumerable<KeyValuePair<Level1Fields, object>>, DateTimeOffset, DateTime> ValuesChanged;

		/// <summary>
		/// Ïîëó÷èòü ñòàêàí êîòèðîâîê.
		/// </summary>
		/// <param name="security">Èíñòðóìåíò, ïî êîòîðîìó íóæíî ïîëó÷èòü ñòàêàí.</param>
		/// <returns>Ñòàêàí êîòèðîâîê.</returns>
		MarketDepth GetMarketDepth(Security security);

		/// <summary>
		/// Ïîëó÷èòü çíà÷åíèå ìàðêåò-äàííûõ äëÿ èíñòðóìåíòà.
		/// </summary>
		/// <param name="security">Èíñòðóìåíò.</param>
		/// <param name="field">Ïîëå ìàðêåò-äàííûõ.</param>
		/// <returns>Çíà÷åíèå ïîëÿ. Åñëè äàííûõ íåò, òî áóäåò âîçâðàùåíî <see langword="null"/>.</returns>
		object GetSecurityValue(Security security, Level1Fields field);

		/// <summary>
		/// Ïîëó÷èòü íàáîð äîñòóïíûõ ïîëåé <see cref="Level1Fields"/>, äëÿ êîòîðûõ åñòü ìàðêåò-äàííûå äëÿ èíñòðóìåíòà.
		/// </summary>
		/// <param name="security">Èíñòðóìåíò.</param>
		/// <returns>Íàáîð äîñòóïíûõ ïîëåé.</returns>
		IEnumerable<Level1Fields> GetLevel1Fields(Security security);
	}
}