示例#1
0
 /// <summary>
 /// Initialises a new instance of the class
 /// </summary>
 public GdaxKeysControl()
 {
     InitializeComponent();
     _apiParams         = SecureStorage.GetEncryptedData <GdaxAPIParams>(SecuredDataKeys.GdaxAPI);
     txtPassphrase.Text = _apiParams.Passphrase;
     txtKey.Text        = _apiParams.APIKey;
     txtSecret.Text     = _apiParams.APISecret;
 }
        /// <summary>
        /// Initialises a new instance of the class
        /// </summary>
        public CryptsyKeysControl()
        {
            InitializeComponent();

            _apiParams        = SecureStorage.GetEncryptedData <CryptsyAPIParams>(SecuredDataKeys.CryptsyAPI);
            txtPublicKey.Text = _apiParams.PublicKey;
            txtSecretKey.Text = _apiParams.SecretKey;
        }
示例#3
0
 /// <summary>
 /// Initialises a new instance of the class
 /// </summary>
 public BitstampKeysControl()
 {
     InitializeComponent();
     _apiParams       = SecureStorage.GetEncryptedData <BitstampAPIParams>(SecuredDataKeys.BitstampAPI);
     txtClientID.Text = _apiParams.ClientID;
     txtKey.Text      = _apiParams.APIKey;
     txtSecret.Text   = _apiParams.APISecret;
 }
        /// <summary>
        /// Initialises a new instance of the class
        /// </summary>
        public TwitterKeysControl()
        {
            InitializeComponent();

            _apiParams     = SecureStorage.GetEncryptedData <TwitterAPIParams>(SecuredDataKeys.TwitterAPI);
            txtKey.Text    = _apiParams.ConsumerKey;
            txtSecret.Text = _apiParams.SecretKey;
        }
示例#5
0
        /// <summary>
        /// Initialises a new instance of the class
        /// </summary>
        public BtceKeysControl()
        {
            InitializeComponent();

            _apiParams     = SecureStorage.GetEncryptedData <BtceAPIParams>(SecuredDataKeys.BtceAPI);
            txtKey.Text    = _apiParams.APIKey;
            txtSecret.Text = _apiParams.APISecret;
        }
示例#6
0
        /// <summary>
        /// Initialises a new instance of the class
        /// </summary>
        public BitstampWrapper()
        {
            var p = SecureStorage.GetEncryptedData <BitstampAPIParams>(SecuredDataKeys.BitstampAPI);
            NameValueCollection section = (NameValueCollection)ConfigurationManager.GetSection("CoinTNet");
            string baseUrl = string.Empty;

            if (section != null && section.Count > 0)
            {
                baseUrl = section["bitstamp.APIBaseUrl"];
            }

            _proxy = new BitstampAPI.BitstampProxy(baseUrl, p.ClientID, p.APIKey, p.APISecret);
        }
示例#7
0
        /// <summary>
        /// Initialises a new instance of the class
        /// </summary>
        public GDAXWrapper()
        {
            var p = SecureStorage.GetEncryptedData <GDAXAPIParams>(SecuredDataKeys.GDAXAPI);
            NameValueCollection section = (NameValueCollection)ConfigurationManager.GetSection("CoinTNet");
            string baseUrl = string.Empty;

            if (section != null && section.Count > 0)
            {
                baseUrl = section["gdax.APIBaseUrl"];
            }

            _proxy = new GDAXAPI.GDAXProxy(baseUrl, p.APIKey, p.APISecret, p.APIPassphrase);
        }
示例#8
0
        /// <summary>
        /// Initialises a new instance of the class
        /// </summary>
        public GdaxWrapper()
        {
            var p = SecureStorage.GetEncryptedData <GdaxAPIParams>(SecuredDataKeys.GdaxAPI);
            NameValueCollection section = (NameValueCollection)ConfigurationManager.GetSection("CoinTNet");
            string baseUrl = string.Empty;

            if (section != null && section.Count > 0)
            {
                baseUrl = section["gdax.APIBaseUrl"];
            }

            //_proxy = new GdaxAPI.GdaxProxy(baseUrl, p.Passphrase, p.APIKey, p.APISecret);
            _proxy = new GdaxAPI.GdaxProxy(baseUrl, "9374m4iq6t", "75b85e46f7c505b4f85c400c2033e170", "gNrtMofMDfuxHS167uWl8fiWpq1/ZYMuTtLK82MF22TJFfFO9FOcKKyeZ1BaGqNY3hYGMUeC0oK3KxaWi5c1vA==");
        }
示例#9
0
        /// <summary>
        /// Initialises a new instance of the class
        /// </summary>
        public CryptsyWrapper()
        {
            var p = SecureStorage.GetEncryptedData <CryptsyAPIParams>(SecuredDataKeys.CryptsyAPI);
            NameValueCollection section = (NameValueCollection)ConfigurationManager.GetSection("CoinTNet");
            string publicAPIBaseUrl = string.Empty, privateAPIBaseUrl = string.Empty, serverTimeZone = string.Empty;

            if (section != null && section.Count > 0)
            {
                publicAPIBaseUrl  = section["cryptsy.publicAPIBaseUrl"];
                privateAPIBaseUrl = section["cryptsy.privateAPIBaseUrl"];
                serverTimeZone    = section["cryptsy.serverTimeZone"];
            }

            var      provider       = TimeZoneInfo.FindSystemTimeZoneById(serverTimeZone);
            TimeSpan providerOffset = provider.GetUtcOffset(DateTimeOffset.UtcNow);
            int      hoursDiffToUtc = -(int)providerOffset.TotalHours;

            _proxy = new CryptsyAPI.CryptsyProxy(p.PublicKey, p.SecretKey, publicAPIBaseUrl, privateAPIBaseUrl, hoursDiffToUtc);
        }
示例#10
0
        /// <summary>
        /// Initialises a new instance of the wrapper
        /// </summary>
        public BtceWrapper()
        {
            var p = SecureStorage.GetEncryptedData <BtceAPIParams>(SecuredDataKeys.BtceAPI);

            _proxy = new BtceApi(p.APIKey, string.IsNullOrEmpty(p.APISecret) ? string.Empty : p.APISecret);
        }