Author

Topic: Free C# Cryptocurrency Library - Query Blockchain APIs and Exchanges (Read 324 times)

jr. member
Activity: 46
Merit: 1
https://kryptium.io
Gratz OP i am C# developer myself, i will give it a try
jr. member
Activity: 51
Merit: 56
Thanks. I'll add those in to the list of APIs. I did use Etherscan at one point, but there were some issues with it for some reason.
staff
Activity: 3500
Merit: 6152
You check Etherscan.io, Bloxy.info (which I believe is the best for ethereum) and also BlockTrail for BTC in case you're using something else, It's much more stable and has better limits.
jr. member
Activity: 51
Merit: 56
Regarding the code you posted:

Which service are you communicating with to retrieve the tokens and their balances? Etherscan.io?

Thanks for asking! I was hoping someone would ask that. If you look here, there is a JSON RPC Client. Here there is an Ethplorer Client. The BlockchainClientManager uses any client that is available, times the calls, and automatically adjusts to the fastest server. The JSON RPC clients could call any server that is up and running and implementing the right RPC calls. The BlockchainClientManager has fail over redundancy so if one server is down, the other will be used. As an implementer you shouldn't have to care about whether the server is up or down. I will be adding more and more servers over time so that the library becomes more and more stable. This is crucial because many people shy away from using online APIs because they are not stable enough.

Actually, if you have a list of API Servers available, that would be a really great way to contribute. I'm especially interested in APIs which implement Insight, and JSON RPC.

Quote from: ETFbitcoin  
I don't really need this kind of tool, but it's good to see UnitTests usage on non-huge project, even though it only test few tasks.

Yes. My app Hardfolio has 70%+ unit testing code coverage. CryptoCurrency.Net is a small part of that. I brought some unit tests from Hardfolio in to CryptoCurrency.Net. But, the aim is to get coverage up to 100% percent.








legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
I don't really need this kind of tool, but it's good to see UnitTests usage on non-huge project, even though it only test few tasks.

Which service are you communicating with to retrieve the tokens and their balances? Etherscan.io?

Looking on the source code1, i think OP use https://ethplorer.io/
staff
Activity: 3500
Merit: 6152
Regarding the code you posted:

Code:
        public async Task GetERC20Tokens()
        {
            var result = await _BlockchainClientManager.GetAddresses(CurrencySymbol.Ethereum,
            new List { "0xA3079895DD50D9dFE631e8f09F3e3127cB9a4970" });
            var nonEthereumResult = result.FirstOrDefault(a => !a.Key.Equals(CurrencySymbol.Ethereum));
            Console.WriteLine(
            $"Token: {nonEthereumResult.Key} Balance: {nonEthereumResult.Value.First().Balance}");
        }

Which service are you communicating with to retrieve the tokens and their balances? Etherscan.io?
jr. member
Activity: 51
Merit: 56
https://github.com/MelbourneDeveloper/CryptoCurrency.Net

This library has been developed over a year alongside my other C# hardwarewallet libraries: KeepKey.Net, Ledger.Net, and Trezor.Net. I just released Cryptocurrency.Net today as open source (MIT). It will be useful for anyone trying to query the blockchain or exchanges. It puts a layer over the top of the main cryptocurrencies like Bitcoin, Ethereum, Ripple, Litecoin, and so on. It can communicate with exchanges like Bittrex, Binance, and others. Contribution welcome! Please let me know if you have any issues with the library.

Jump to: