Ejemplo n.º 1
0
        /// <summary>
        /// Create a new order book instance
        /// </summary>
        /// <param name="symbol">The symbol the order book is for</param>
        /// <param name="precisionLevel">The precision level of the order book</param>
        /// <param name="limit">The limit of entries in the order book, either 25 or 100</param>
        /// <param name="options">Options for the order book</param>
        public BitfinexSymbolOrderBook(string symbol, Precision precisionLevel, int limit, BitfinexOrderBookOptions options = null) : base(symbol, options ?? new BitfinexOrderBookOptions())
        {
            socketClient = options?.SocketClient ?? new BitfinexSocketClient();

            this.limit = limit;
            precision  = precisionLevel;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create a new order book instance
        /// </summary>
        /// <param name="symbol">The symbol the order book is for</param>
        /// <param name="precisionLevel">The precision level of the order book</param>
        /// <param name="limit">The limit of entries in the order book, either 25 or 100</param>
        /// <param name="options">Options for the order book</param>
        public BitfinexSymbolOrderBook(string symbol, Precision precisionLevel, int limit, BitfinexOrderBookOptions?options = null) : base(symbol, options ?? new BitfinexOrderBookOptions())
        {
            symbol.ValidateBitfinexSymbol();
            socketClient = options?.SocketClient ?? new BitfinexSocketClient();

            Levels    = limit;
            precision = precisionLevel;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Create a new order book instance
        /// </summary>
        /// <param name="symbol">The symbol the order book is for</param>
        /// <param name="options">Options for the order book</param>
        public BitfinexSymbolOrderBook(string symbol, BitfinexOrderBookOptions?options = null) : base("Bitfinex", symbol, options ?? new BitfinexOrderBookOptions())
        {
            symbol.ValidateBitfinexSymbol();
            socketClient = options?.SocketClient ?? new BitfinexSocketClient(new BitfinexSocketClientOptions
            {
                LogLevel = options?.LogLevel ?? LogLevel.Information
            });
            _socketOwner = options?.SocketClient == null;

            Levels    = options?.Limit ?? 25;
            precision = options?.Precision ?? Precision.PrecisionLevel0;
        }
 /// <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 BitfinexOrderBookOptions(IBitfinexSocketClient client = null) : base("Bitfinex", false)
 {
     SocketClient = client;
 }