Esempio n. 1
0
        /// <summary>
        /// Create a new order book instance
        /// </summary>
        /// <param name="symbol">The symbol the order book is for</param>
        /// <param name="limit">The initial limit of entries in the order book</param>
        /// <param name="options">Options for the order book</param>
        public KrakenSymbolOrderBook(string symbol, int limit, KrakenOrderBookOptions?options = null) : base(symbol, options ?? new KrakenOrderBookOptions())
        {
            socketClient = options?.SocketClient ?? new KrakenSocketClient(new KrakenSocketClientOptions
            {
                LogLevel = options?.LogLevel ?? LogLevel.Information
            });
            _socketOwner = options?.SocketClient == null;

            Levels = limit;
        }
        /// <summary>
        /// Create a new order book instance
        /// </summary>
        /// <param name="symbol">The symbol the order book is for</param>
        /// <param name="limit">The initial limit of entries in the order book</param>
        /// <param name="options">Options for the order book</param>
        public KrakenSymbolOrderBook(string symbol, int limit, KrakenOrderBookOptions?options = null) : base(symbol, options ?? new KrakenOrderBookOptions())
        {
            socketClient = options?.SocketClient ?? new KrakenSocketClient();

            this.limit = limit;
        }
Esempio n. 3
0
 /// <summary>
 /// </summary>
 /// <param name="client">The client to use for the socket connection. When using the same client for multiple order books the connection can be shared.</param>
 public KrakenOrderBookOptions(IKrakenSocketClient client = null) : base("Kraken", false)
 {
     SocketClient = client;
 }