Exemplo n.º 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) => { });
        }
Exemplo n.º 2
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("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" }
            };
        }
Exemplo n.º 3
0
 /// <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;
 }