Exemple #1
0
        /// <summary>
        /// Create a new instance of KrakenSocketClient using provided options
        /// </summary>
        /// <param name="options">The options to use for this client</param>
        public KrakenSocketClient(KrakenSocketClientOptions options) : base(options, options.ApiCredentials == null ? null : new KrakenAuthenticationProvider(options.ApiCredentials))
        {
            Configure(options);

            AddGenericHandler("Connection", (connection, token) => { });
            AddGenericHandler("HeartBeat", (connection, token) => { });
        }
        /// <summary>
        /// Create a new instance of KrakenSocketClient using provided options
        /// </summary>
        /// <param name="options">The options to use for this client</param>
        public KrakenSocketClient(KrakenSocketClientOptions options) : base("Kraken", options, options.ApiCredentials == null ? null : new KrakenAuthenticationProvider(options.ApiCredentials, null))
        {
            AddGenericHandler("HeartBeat", (messageEvent) => { });
            AddGenericHandler("SystemStatus", (messageEvent) => { });
            _authBaseAddress = options.AuthBaseAddress;

            _symbolSynonyms = new Dictionary <string, string>
            {
                { "BTC", "XBT" },
                { "DOGE", "XDG" }
            };
        }
 /// <summary>
 /// Set the default options to be used when creating new socket clients
 /// </summary>
 /// <param name="options">The options to use for new clients</param>
 public static void SetDefaultOptions(KrakenSocketClientOptions options)
 {
     defaultOptions = options;
 }