import TradingPair from "../assets/TradingPair.js";
import OrderBookEntry from "../orderbook/OrderBookEntry.js";
import APIEvent from "./APIEvent.js"
import APIEventType from "./APIEventType.js"

export default class OrderBookUpdateEvent extends APIEvent{
    /**
     * @type {TradingPair}
     */
    tradingPair = null;

    /**
     * @type {OrderBookEntry[]}
     */
    asks = [];

    /**
     * @type {OrderBookEntry[]}
     */
    bids = [];

    /**
     * @type {number}
     */
    updateId = 0;

    /**
     * @type {boolean}
     */
    isReset = false;

    /**
     * @param {TradingPair} tradingPair 
     */
    constructor(tradingPair){
        super(APIEventType.ORDER_BOOK_UPDATE);
        this.tradingPair = tradingPair;
    }
}