/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections.Generic;
using System.Linq;
namespace QuantConnect.Brokerages
{
///
/// Represents an orderbook updater interface for a security.
/// Provides the ability to update orderbook price level and to be alerted about updates
///
/// Price level identifier
/// Size at the price level
public interface IOrderBookUpdater
{
///
/// Event fired each time BestBidPrice or BestAskPrice are changed
///
event EventHandler BestBidAskUpdated;
///
/// Updates or inserts a bid price level in the order book
///
/// The bid price level to be inserted or updated
/// The new size at the bid price level
void UpdateBidRow(K price, V size);
///
/// Updates or inserts an ask price level in the order book
///
/// The ask price level to be inserted or updated
/// The new size at the ask price level
void UpdateAskRow(K price, V size);
///
/// Removes a bid price level from the order book
///
/// The bid price level to be removed
void RemoveBidRow(K price);
///
/// Removes an ask price level from the order book
///
/// The ask price level to be removed
void RemoveAskRow(K price);
}
}