Bitcoin Forum
May 10, 2024, 04:58:28 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Free C# Cryptocurrency Library - Query Blockchain APIs and Exchanges  (Read 299 times)
Kruddler (OP)
Jr. Member
*
Offline Offline

Activity: 51
Merit: 56


View Profile
December 15, 2018, 08:01:21 AM
Merited by OmegaStarScream (10), ABCbits (9)
 #1

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.

1715317108
Hero Member
*
Offline Offline

Posts: 1715317108

View Profile Personal Message (Offline)

Ignore
1715317108
Reply with quote  #2

1715317108
Report to moderator
1715317108
Hero Member
*
Offline Offline

Posts: 1715317108

View Profile Personal Message (Offline)

Ignore
1715317108
Reply with quote  #2

1715317108
Report to moderator
"In a nutshell, the network works like a distributed timestamp server, stamping the first transaction to spend a coin. It takes advantage of the nature of information being easy to spread but hard to stifle." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715317108
Hero Member
*
Offline Offline

Posts: 1715317108

View Profile Personal Message (Offline)

Ignore
1715317108
Reply with quote  #2

1715317108
Report to moderator
1715317108
Hero Member
*
Offline Offline

Posts: 1715317108

View Profile Personal Message (Offline)

Ignore
1715317108
Reply with quote  #2

1715317108
Report to moderator
OmegaStarScream
Staff
Legendary
*
Offline Offline

Activity: 3472
Merit: 6129



View Profile
December 15, 2018, 08:56:20 AM
 #2

Regarding the code you posted:

Code:
        public async Task GetERC20Tokens()
        {
            var result = await _BlockchainClientManager.GetAddresses(CurrencySymbol.Ethereum,
            new List<string> { "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?

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
ABCbits
Legendary
*
Offline Offline

Activity: 2870
Merit: 7491


Crypto Swap Exchange


View Profile
December 15, 2018, 02:16:44 PM
Merited by OmegaStarScream (1)
 #3

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/

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Kruddler (OP)
Jr. Member
*
Offline Offline

Activity: 51
Merit: 56


View Profile
December 15, 2018, 10:06:21 PM
 #4

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.








OmegaStarScream
Staff
Legendary
*
Offline Offline

Activity: 3472
Merit: 6129



View Profile
December 19, 2018, 04:29:57 PM
 #5

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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Kruddler (OP)
Jr. Member
*
Offline Offline

Activity: 51
Merit: 56


View Profile
December 19, 2018, 11:20:11 PM
 #6

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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!