public CandlesSubscribeRequest(string pair, BitfinexTimeFrame bitfinexTimeFrame) { BfxValidations.ValidateInput(pair, nameof(pair)); Key = $"trade:{TimeFrameToKeyCommand(bitfinexTimeFrame)}:{BitfinexSymbolUtils.FormatPairToTradingSymbol(pair)}"; }
/// <summary> /// Subscribe for L3 order book data (no grouping, every single order) /// </summary> /// <param name="pair">Target symbol/pair (BTCUSD, ETHBTC, etc.)</param> /// <param name="length">Number of orders returned by API ("1", "25", "100") [default="25"]</param> public RawBookSubscribeRequest( string pair, string length = null) { BfxValidations.ValidateInput(pair, nameof(pair)); Symbol = BitfinexSymbolUtils.FormatPairToSymbol(pair); Prec = "R0"; Len = string.IsNullOrWhiteSpace(length) ? "25" : length; }
/// <summary> /// Subscribe for L2 order book data (grouped by price) /// </summary> /// <param name="pair">Target symbol/pair (BTCUSD, ETHBTC, etc.)</param> /// <param name="precision">Level of price aggregation (P0, P1, P2, P3). The default is P0</param> /// <param name="frequency">Frequency of updates (F0, F1). F0=realtime / F1=2sec. The default is F0.</param> /// <param name="length">Number of price points ("25", "100") [default="25"]</param> public BookSubscribeRequest( string pair, BitfinexPrecision precision = BitfinexPrecision.P0, BitfinexFrequency frequency = BitfinexFrequency.Realtime, string length = null) { BfxValidations.ValidateInput(pair, nameof(pair)); Symbol = BitfinexSymbolUtils.FormatPairToSymbol(pair); Prec = precision.GetStringValue(); Freq = frequency.GetStringValue(); Len = string.IsNullOrWhiteSpace(length) ? "25" : length; }
/// <summary> /// Subscribe to trades request /// </summary> /// <param name="pair">Target pair, for example 'BTC/USD', 'ETH/USD', ETHBTC, etc.</param> public TradesSubscribeRequest(string pair) { BfxValidations.ValidateInput(pair, nameof(pair)); Symbol = BitfinexSymbolUtils.FormatPairToTradingSymbol(pair); }
public FundingsSubscribeRequest(string symbol) { BfxValidations.ValidateInput(symbol, nameof(symbol)); Symbol = BitfinexSymbolUtils.FormatSymbolToFunding(symbol); }