BTCTLink - A library for communication with BTC-TC APIIntroductionBTCTLink is a C#/.NET library that handles the communication with the BTC-TC API. It can serve as a base to build applications on that interact with BTC-TC or Litecoin-Global (both exchanges and their APIs function exactly the same, for brevity I will only mention BTC-TC).
In addition to the class that handles communication and the associated utility-classes, a demo-client is also available that demonstrates the functionality. While this demo-client is fully functional, it is not intended as a substitute for the BTC-TC website in its current state (though developers may use it as a platform to add additional functionality).
Downloading & UsingThe library and demo-client are available on GitHub:
Library:
https://github.com/Rannasha/BTCTLinkDemo-client:
https://github.com/Rannasha/BTCT-ClientThe easiest way to get started is to open BTCT-Client.sln in Visual Studio and continue from there. If you already have a project, you can just include BTCTLink. The readme.md file in the BTCTLink repository has a brief description of how to setup a connection and submit API requests. The BTCT-Client code has examples for all API calls and how to handle response data.
Questions, comments, songs of praisePlease post any questions, comments, etc... here, send me a PM or submit an issue on GitHub. If you have improvements that you'd like to share, you're invited to fork the Git repo and create a pull request.
If this project has been to your liking, consider a donation:
1Gideon33Q7ANGhCbfkxPHpWoNGz5Lyskm
Thanks!
FAQDo you have a compiled version available?No. This project is aimed at developers, not at end users. If you don't want to program, this isn't for you. If you are a developer, then you don't need a compiled version.
What could I do with this?Some things I could imagine are a desktop-client for the exchange, offering more detailed information than what the website provides. A trade-bot is another interesting application. Or simply a basic ticker with possibility for price-alerts.
So it supports both BTC-TC and Litecoin-Global, how does that work?The class that handles the communication has a parameter in its constructor that can be used to specify which exchange to use. This only affects the API-urls used, as both exchanges are identical in function. The demo-client is set to connect to BTC-TC by default, but it can be changed to LTC-Global in the source code.
Does this steal my wallet.dat?Yes. In addition, it will mine SexCoins, bring world peace and fry your cat. But seriously, check the code for fishy things. Note that the BTCTLink repository includes a compiled version of the JSON.NET library by Newtonsoft. This library is available from the Visual Studio package manager, so you can replace the one from the repo by the files provided by VS.
Why does your code look so sloppy?I'm a self-taught programmer who has worked in science, where the mantra is "If it compiles, good. If it gives the correct result, great. If it does so before I die of old age, perfect!" So with no formal experience in software development, my code may not satisfy all the accepted standards for well-written code (honestly, it's not that big a mess either, if I say so myself). Additionally, I used this project to learn C#/.NET, so I may not use everything the language/platform has to offer. Suggestions for improvements are welcome!
How well-tested is this, can I lose assets/coins?All functions were tested under a variety of circumstances (parts of the library have handled hundreds of
BTC worth of operations), but I can't make any guarantees. Before you use an application using this library in a live environment, run plenty of tests to ensure everything is as it should be.
CreditsThanks to samo9789 (
https://github.com/samo9789) for the sharpOAuth library, which handles most of the low-level OAuth stuff.
Thanks to Deprived (
https://bitcointalksearch.org/user/deprived-40149) for testing & providing valuable feedback.