private void LoadRepository(string addyPk, bool testRegion, string version, Blockchain blockchain) { _helper = new Helper(); if (string.IsNullOrEmpty(addyPk)) { _neoWallet = null; } else if (addyPk.First() == 'A' || addyPk.Substring(0, 2) == "0x") { _neoWallet = new NeoWallet(addyPk); } else { var pkSecure = _helper.GetSecureString(addyPk); _neoWallet = new NeoWallet(pkSecure); } var testSwitch = testRegion ? "test-" : string.Empty; _baseUrl = $"https://{testSwitch}api.switcheo.network"; _restRepo = new RESTRepository(); _security = new Security(); _txnProcessor = new TransactionProcessor(); _tokens = GetTokens(); _blockchain = blockchain; _contract_version = version; _contract_hash = GetContractHash(); _dtHelper = new DateTimeHelper(); _systemTimetamp = TimestampCompare(); }
/// <summary> /// Constructor /// </summary> /// <param name="apiInformation">Api Information</param> public GdaxRepository(ApiInformation apiInformation) { _restRepo = new RESTRepository(); _dtHelper = new DateTimeHelper(); _fileRepo = new FileRepository(); SetExchangeApi(apiInformation); }
public EthplorerRepository() { _restRepo = new RESTRepository(); baseUrl = "https://api.ethplorer.io"; //apiKey = "freeKey"; _apiInfo = new ApiInformation(); }
public KuCoinRepository() { security = new Security(); _restRepo = new RESTRepository(); baseUrl = "https://api.kucoin.com"; _apiInfo = new ApiInformation(); }
/// <summary> /// Load repository /// </summary> /// <param name="key">Api key value (default = "")</param> /// <param name="secret">Api secret value (default = "")</param> private void LoadRepository(string key = "", string secret = "") { security = new Security(); _restRepo = new RESTRepository(); baseUrl = "https://api.binance.com"; _dtHelper = new DateTimeHelper(); }
public BinanceRepository() { security = new Security(); _restRepo = new RESTRepository(); baseUrl = "https://api.binance.com"; _apiInfo = new ApiInformation(); }
/// <summary> /// Load repository /// </summary> private void LoadRepository() { security = new Security(); _restRepo = new RESTRepository(); _dtHelper = new DateTimeHelper(); baseUrl = $"https://bittrex.com/api/v{_version}"; _helper = new Helper(); }
/// <summary> /// Constructor /// </summary> public GdaxRepository() { _restRepo = new RESTRepository(); _dtHelper = new DateTimeHelper(); _helper = new Helper(); _security = new Security(); _apiInfo = new ApiInformation(); _fileRepo = new FileRepository(); }
public CoinMarketCapRepository(string key, bool sandbox = false) { apiKey = key; var apiRoot = sandbox ? "sandbox" : "pro"; baseUrl = $"https://{apiRoot}-api.coinmarketcap.com"; rest = new RESTRepository(); }
/// <summary> /// Constructor /// </summary> public BinanceRepository() { security = new Security(); _restRepo = new RESTRepository(); baseUrl = "https://api.binance.com"; _apiInfo = new ApiInformation(); _dtHelper = new DateTimeHelper(); _fileRepo = new FileRepository(); }
/// <summary> /// Load repository /// </summary> /// <param name="key">Api key value (default = "")</param> /// <param name="secret">Api secret value (default = "")</param> private void LoadRepository(bool useSandbox) { _security = new Security(); _restRepo = new RESTRepository(); baseUrl = useSandbox ? "https://api-public.sandbox.pro.coinbase.com" : "https://api.pro.coinbase.com"; _helper = new Helper(); _dtHelper = new DateTimeHelper(); }
private void LoadBase(bool sandbox) { security = new Security(); _restRepo = new RESTRepository(); _dtHelper = new DateTimeHelper(); _helper = new Helper(); baseUrl = sandbox ? "https://openapi-sandbox.kucoin.com" : "https://api.kucoin.com";// "https://openapi-v2.kucoin.com"; }
/// <summary> /// Constructor /// </summary> public KuCoinRepository() { security = new Security(); _restRepo = new RESTRepository(); baseUrl = "https://api.kucoin.com"; _apiInfo = new ApiInformation(); _dtHelper = new DateTimeHelper(); _helper = new Helper(); _fileRepo = new FileRepository(); }
private void LoadRepository() { _restRepo = new RESTRepository(); baseUrl = "https://api.idex.market"; _dtHelper = new DateTimeHelper(); if (_privateKey != null) { _address = EthECKey.GetPublicAddress(Security.ToUnsecureString(_privateKey)); LazyLoadElements(); } }
/// <summary> /// Load repository /// </summary> /// <param name="key">Api key value (default = "")</param> /// <param name="secret">Api secret value (default = "")</param> private void LoadRepository(string key = "", string secret = "") { security = new Security(); _restRepo = new RESTRepository(); baseUrl = "https://api.kucoin.com"; _dtHelper = new DateTimeHelper(); _helper = new Helper(); _apiInfo = new ApiInformation { apiKey = key, apiSecret = secret }; }
/// <summary> /// Get call to api stream /// For large json responses /// </summary> /// <typeparam name="T">Type to return</typeparam> /// <param name="url">Url to access</param> /// <param name="headers">Http Request headers</param> /// <returns>Type requested</returns> public static async Task <T> GetApiStream <T>(this IRESTRepository service, string url, Dictionary <string, object> headers) { return(await service.GetApiStream <T>(url : url, headers : headers).ConfigureAwait(false)); }
/// <summary> /// Get call to api stream /// For large json responses /// </summary> /// <typeparam name="T">Type to return</typeparam> /// <param name="url">Url to access</param> /// <returns>Type requested</returns> public static async Task <T> GetApiStream <T>(this IRESTRepository service, string url) { return(await service.GetApiStream <T>(url : url).ConfigureAwait(false)); }
/// <summary> /// Get call to api /// </summary> /// <typeparam name="T">Type to return</typeparam> /// <param name="url">Url to access</param> /// <param name="username">Username for basic auth</param> /// <param name="password">Password for basic auth</param> /// <returns>Type requested</returns> public static async Task <T> GetApi <T>(this IRESTRepository service, string url, string username, string password) { return(await service.GetApi <T>(url : url, username : username, password : password).ConfigureAwait(false)); }
/// <summary> /// Get call to api /// </summary> /// <typeparam name="T">Type to return</typeparam> /// <param name="url">Url to access</param> /// <param name="headers">Http Request headers</param> /// <returns>Type requested</returns> public static async Task <T> GetApi <T>(this IRESTRepository service, string url, Dictionary <string, string> headers) { var newHeaders = DictionaryConverter(headers); return(await service.GetApi <T>(url : url, headers : newHeaders).ConfigureAwait(false)); }
/// <summary> /// Delete call to api /// </summary> /// <typeparam name="T">Type to return</typeparam> /// <param name="url">Url to access</param> /// <returns>Type requested</returns> public static async Task <T> DeleteApi <T>(this IRESTRepository service, string url) { return(await service.DeleteApi <T>(url : url).ConfigureAwait(false)); }
/// <summary> /// Put call to api with data /// </summary> /// <typeparam name="T">Type to return</typeparam> /// <typeparam name="U">Type to post</typeparam> /// <param name="url">Url to access</param> /// <param name="data">Data object being sent</param> /// <param name="headers">Http Request headers</param> /// <returns>Type requested</returns> public static async Task <T> PutApi <T, U>(this IRESTRepository service, string url, U data, Dictionary <string, object> headers) { return(await service.PutApi <T, U>(url : url, data : data, headers : headers).ConfigureAwait(false)); }
/// <summary> /// Put call to api with data /// </summary> /// <typeparam name="T">Type to return</typeparam> /// <typeparam name="U">Type to post</typeparam> /// <param name="url">Url to access</param> /// <param name="data">Data object being sent</param> /// <returns>Type requested</returns> public static async Task <T> PutApi <T, U>(this IRESTRepository service, string url, U data) { return(await service.PutApi <T, U>(url : url, data : data).ConfigureAwait(false)); }
/// <summary> /// Post call to api with data /// </summary> /// <typeparam name="T">Type to return</typeparam> /// <typeparam name="U">Type to post</typeparam> /// <param name="url">Url to access</param> /// <param name="data">Data object being sent</param> /// <param name="username">Username for basic auth</param> /// <param name="password">Password for basic auth</param> /// <returns>Type requested</returns> public static async Task <T> PostApi <T, U>(this IRESTRepository service, string url, U data, string username, string password) { return(await service.PostApi <T, U>(url : url, data : data, username : username, password : password).ConfigureAwait(false)); }
public CoinMarketCapRepository() { _restRepo = new RESTRepository(); baseUrl = "https://api.coinmarketcap.com"; }
public NinetyNineCryptoRepository() { _restRepo = new RESTRepository(); baseUrl = "https://api.99cryptocoin.com"; }
public ProhashingRepository() { _restRepo = new RESTRepository(); baseUrl = "https://prohashing.com/explorerJson"; }
/// <summary> /// Load repository base /// </summary> private void LoadBase() { _rest = new RESTRepository(); _dtHelper = new DateTimeHelper(); }
public RESTRepositoryTests() { repo = new RESTRepository(); }
public EtherScanRepository() { _restRepo = new RESTRepository(); _baseUrl = "http://api.etherscan.io/api?"; _apiInfo = new ApiInformation(); }
/// <summary> /// Constructor /// </summary> public CoindarRepostiory() { _restRepo = new RESTRepository(); baseUrl = "https://coindar.org"; }