wishhhmaster (OP)
Newbie
Offline
Activity: 10
Merit: 0
|
|
April 15, 2014, 01:16:26 PM Last edit: May 15, 2014, 10:23:52 AM by wishhhmaster |
|
Hello, https://raw.githubusercontent.com/wishhhmaster/CoinTNet/master/main.pngSource code: https://github.com/wishhhmaster/CoinTNetIntroductionCoinT.Net is a basic trading application for bitcoins and other altcoins, which enables users to: - visualise ticker/candles from exchanges (Bitstamp, Cryptsy and BTC-e for now), with basic indicators (MA, EMA)
- send buy/sell orders to these exchanges for multiple currencies
- visualise the order book
- back test trading strategies (EMA crossing and MACD for now)
- Retrieve news items from RSS feeds and Twitter
There is also a feature to check forarbitrage opportunities within BTC-e's multiple currencies (but it's just paper trading for now) This application was mainly inspired by the easybot project: https://bitcointalk.org/index.php?topic=354871.0https://github.com/codingdna2/easybotSource CodeCoinT.Net is a Winforms application, developed in C# and Visual Studio 2013 Express (.Net 4.5). The following external libraries are used: migrap/BitcoinCharts => https://github.com/migrap/BitcoinChartsDmT021/BtceApi => https://github.com/DmT021/BtceApiTechnical notesIt should not be too hard to add more exchanges, then just need to implement the IExchange interface The currency pairs that can be traded on BTC-e are hard-coded for now, but it's easy to add more TODO List- Add more exchanges and currencies
- Add real time trading trading (it's pretty much finished, but has not been tested)
- Add more indicators
- Add more trading strategies
- Use streaming APIs when available
Pre-requisitesWindows OS, with the .Net 4.5 Framework installed InstallationIf you are a developper, you can just use Visual Studio 2013 Express to open the solution and recompile the application. Otherwise, just extract the following file: https://github.com/wishhhmaster/CoinTNet/raw/master/CointT.Net-Release.zipNote: I have only tested this app on my 64-bit Win 7 OS, so there might be issues on other versions. ConfigurationThere is a configuration file named CoinTNet.exe.config in the executable folder. With that file, you can configure: - Bitstamp's API parameters (needed if you want to send orders)
- BTC-e API's parameters (needed if you want to send orders)
- Cryptsy's API parameters (needed if you want to send orders)
- Twitter's parameters (needed if you want to retrieve Tweets)
Warnings- The source code is provided as-is. There might be some bugs, so advise you to review the code before using it, especially before making trade orders.
- Historic data is retrieved from bitcoincharts.com and/or bitcoinwidsom.com, and consequently might not be available (if these websites are down, or if they do not store data for the selected currency pairs, as it is the case with most of Cryptsy's pairs). Most recent data is retrieved directly from the exchanges' APIs, but is often limited to the last few hundred trades (which can span hours or days)
- The high/low prices for the last 24 hours are not available from Cryptsy's API
DonationsIf you find this tool useful, you can show you support with a kind donation: BTC: 1JctmffLPQtcmTSBEDCDquGDeMprfqxX1k LTC: LMWkc3JZJLCqWQZLg5wUuWD58tSLtJZZoY Edit: Added PPC/NMC Edit 30/04/2014: Added Cryptsy and bug fixes
|
|
|
|
wishhhmaster (OP)
Newbie
Offline
Activity: 10
Merit: 0
|
|
April 22, 2014, 08:29:41 AM |
|
I updated the app to fix a few bugs and add encryption of the API keys
|
|
|
|
wishhhmaster (OP)
Newbie
Offline
Activity: 10
Merit: 0
|
|
April 30, 2014, 03:02:17 PM |
|
I just uploaded a new version, with: - Added support for Cryptsy
- List all pairs on BTC-e
- Multiple bug fixes
Note: I just want to emphasize that is a beta, so there is probably lots if bugs in it. I'd be glad if people trying out this app could report them. I haven't tested thoroughly Cryptsy's API.
|
|
|
|
Gambiman
|
|
May 02, 2014, 02:50:51 PM |
|
Hi, will have a look, thanks !
|
|
|
|
bridgeknocker
Newbie
Offline
Activity: 9
Merit: 0
|
|
May 02, 2014, 04:19:45 PM |
|
will there be a mac version?
|
|
|
|
wishhhmaster (OP)
Newbie
Offline
Activity: 10
Merit: 0
|
|
May 04, 2014, 10:34:00 AM |
|
will there be a mac version?
Sorry, I don't plan on developing a Mac version.
|
|
|
|
TheWARLoK
Newbie
Offline
Activity: 17
Merit: 0
|
|
May 04, 2014, 10:38:12 PM Last edit: May 04, 2014, 10:49:53 PM by TheWARLoK |
|
I just uploaded a new version, with: - Added support for Cryptsy
- List all pairs on BTC-e
- Multiple bug fixes
Note: I just want to emphasize that is a beta, so there is probably lots if bugs in it. I'd be glad if people trying out this app could report them. I haven't tested thoroughly Cryptsy's API. Found one... Clicked on News tab, then Manage. News Sources window pops up then BANG.Below is a copy of the error log. [04/05/2014 15:33:44] The following exception occurred Application crashSystem.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed. at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) at System.Data.Entity.Internal.LazyInternalConnection.CreateConnectionFromProviderName(String providerInvariantName) at System.Data.Entity.Internal.LazyInternalConnection.InitializeFromConnectionStringSetting(ConnectionStringSettings appConfigConnection) at System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String name, AppConfig config) at System.Data.Entity.Internal.LazyInternalConnection.Initialize() at System.Data.Entity.Internal.LazyInternalConnection.get_ProviderName() at System.Data.Entity.Internal.LazyInternalContext.InitializeContext() at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() at System.Linq.Queryable.Where[TSource](IQueryable`1 source, Expression`1 predicate) at CoinTNet.UI.Forms.NewsSourcesForm.PopulateNewsSourcesList() at CoinTNet.UI.Forms.NewsSourcesForm.<.ctor>b__0(Object s, EventArgs e) at System.Windows.Forms.Form.OnShown(EventArgs e) at System.Windows.Forms.Form.CallShownEvent() at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
This is repeatable. Other than that, looks pretty good so far. Will let you know if I find any other problems. [Update] Also seems you can zoom in a a chart, but can't zoom back out?
|
|
|
|
TheWARLoK
Newbie
Offline
Activity: 17
Merit: 0
|
|
May 04, 2014, 11:00:14 PM Last edit: May 05, 2014, 01:24:47 AM by TheWARLoK |
|
Question. Why only 2 decimal point resolution rather than 8? Seem it would make it kind of difficult to deal in low value coins or in lower volumes.
|
|
|
|
wishhhmaster (OP)
Newbie
Offline
Activity: 10
Merit: 0
|
|
May 05, 2014, 08:12:34 AM |
|
Question. Why only 2 decimal point resolution rather than 8? Seem it would make it kind of difficult to deal in low value coins or in lower volumes.
Which part of the application are you referring to? The display of decimals is not totally consistent yet, but there is already up to 7 decimals displayed when they are present (not everywhere though, it's sometimes only 5). For instance, 0.0230000 will be displayed as 0.023, and 0.0230015 will be displayed as 0.0230015.
|
|
|
|
wishhhmaster (OP)
Newbie
Offline
Activity: 10
Merit: 0
|
|
May 05, 2014, 08:39:20 AM |
|
I just uploaded a new version, with: - Added support for Cryptsy
- List all pairs on BTC-e
- Multiple bug fixes
Note: I just want to emphasize that is a beta, so there is probably lots if bugs in it. I'd be glad if people trying out this app could report them. I haven't tested thoroughly Cryptsy's API. Found one... Clicked on News tab, then Manage. News Sources window pops up then BANG.Below is a copy of the error log. [04/05/2014 15:33:44] The following exception occurred Application crashSystem.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed. at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) at System.Data.Entity.Internal.LazyInternalConnection.CreateConnectionFromProviderName(String providerInvariantName) at System.Data.Entity.Internal.LazyInternalConnection.InitializeFromConnectionStringSetting(ConnectionStringSettings appConfigConnection) at System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String name, AppConfig config) at System.Data.Entity.Internal.LazyInternalConnection.Initialize() at System.Data.Entity.Internal.LazyInternalConnection.get_ProviderName() at System.Data.Entity.Internal.LazyInternalContext.InitializeContext() at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() at System.Linq.Queryable.Where[TSource](IQueryable`1 source, Expression`1 predicate) at CoinTNet.UI.Forms.NewsSourcesForm.PopulateNewsSourcesList() at CoinTNet.UI.Forms.NewsSourcesForm.<.ctor>b__0(Object s, EventArgs e) at System.Windows.Forms.Form.OnShown(EventArgs e) at System.Windows.Forms.Form.CallShownEvent() at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
This is repeatable. Other than that, looks pretty good so far. Will let you know if I find any other problems. [Update] Also seems you can zoom in a a chart, but can't zoom back out? Thanks for reporting this crash, I'll have a look. Regarding the zoom issue, you have to click on the small circles on the left side of the chart, besides the axes. Not convenient, I know. I'll try to add better buttons/keyboard shortcuts.
|
|
|
|
TheWARLoK
Newbie
Offline
Activity: 17
Merit: 0
|
|
May 05, 2014, 01:42:21 PM |
|
I just uploaded a new version, with: - Added support for Cryptsy
- List all pairs on BTC-e
- Multiple bug fixes
Note: I just want to emphasize that is a beta, so there is probably lots if bugs in it. I'd be glad if people trying out this app could report them. I haven't tested thoroughly Cryptsy's API. Found one... Clicked on News tab, then Manage. News Sources window pops up then BANG.Below is a copy of the error log. [04/05/2014 15:33:44] The following exception occurred Application crashSystem.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed. at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) at System.Data.Entity.Internal.LazyInternalConnection.CreateConnectionFromProviderName(String providerInvariantName) at System.Data.Entity.Internal.LazyInternalConnection.InitializeFromConnectionStringSetting(ConnectionStringSettings appConfigConnection) at System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String name, AppConfig config) at System.Data.Entity.Internal.LazyInternalConnection.Initialize() at System.Data.Entity.Internal.LazyInternalConnection.get_ProviderName() at System.Data.Entity.Internal.LazyInternalContext.InitializeContext() at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() at System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() at System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() at System.Linq.Queryable.Where[TSource](IQueryable`1 source, Expression`1 predicate) at CoinTNet.UI.Forms.NewsSourcesForm.PopulateNewsSourcesList() at CoinTNet.UI.Forms.NewsSourcesForm.<.ctor>b__0(Object s, EventArgs e) at System.Windows.Forms.Form.OnShown(EventArgs e) at System.Windows.Forms.Form.CallShownEvent() at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme) at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
This is repeatable. Other than that, looks pretty good so far. Will let you know if I find any other problems. [Update] Also seems you can zoom in a a chart, but can't zoom back out? Thanks for reporting this crash, I'll have a look. Regarding the zoom issue, you have to click on the small circles on the left side of the chart, besides the axes. Not convenient, I know. I'll try to add better buttons/keyboard shortcuts. No I didn't know that, but will have a look. Thanks. As far as crash, Something missing on my system perhaps? As to Decimals, was referring to main display, will have another look. Thanks. Looks very promising. I will let you know if I find anything else.
|
|
|
|
TheWARLoK
Newbie
Offline
Activity: 17
Merit: 0
|
|
May 05, 2014, 02:58:19 PM Last edit: May 05, 2014, 03:19:26 PM by TheWARLoK |
|
Thanks for the tip about the circles. Never would have saw that. Saw the update on github. On a hunch, downloaded source. Not surprisingly, couldn't load into VS2010Ult. Wonder it that may be part of crash. Missing or outdated runtime library perhaps? Will try another trick to see... BTW. Is this x86 or x64? Answered my own Qquestio. Not enough coffee yet...
|
|
|
|
wishhhmaster (OP)
Newbie
Offline
Activity: 10
Merit: 0
|
|
May 05, 2014, 03:08:33 PM |
|
Thanks for the tip about the circles. Never would have saw that.
Saw the update on github. On a hunch, downloaded source. Not surprisingly, couldn't load into VS2010Ult. Wonder it that may be part of crash. Missing or outdated runtime library perhaps? Will try another trick to see...
You can use VS Express 2013 for Desktop (it's free) http://www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-desktopRegarding the crash, I think it's because SQLCe 4 is not installed on your machine. Would you mind editing the CoinTNet.exe.config and replacing <system.data> </system.data>
with <system.data> <DbProviderFactories> <remove invariant="System.Data.SqlServerCe.4.0" /> <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> </DbProviderFactories> </system.data>
and see if it works? Thanks for your feedback Edit: the release was compiled as 'Mixed Platform', so it should run on both x86 and x64. However, I know there can be x86/x64 issues when using sqlce. I don't use SqlCe that much for now, only for news sources and so I could save it in text files. However, I was planning to maybe save candles in a local database, that's why I did not remove it.
|
|
|
|
TheWARLoK
Newbie
Offline
Activity: 17
Merit: 0
|
|
May 05, 2014, 03:37:35 PM |
|
I updated my M$ runtimes to no avail.Downloading VS'13 now. Also trid your suggestion about the edits. Still crashed with this; [05/05/2014 08:35:41] The following exception occurred Application crashSystem.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SqlServerCe.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified. File name: 'System.Data.SqlServerCe.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at System.Data.SqlServerCe.ExtensionMethods.SystemDataSqlServerCeSqlCeProviderServices_Instance()
WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Hope this helps.
|
|
|
|
wishhhmaster (OP)
Newbie
Offline
Activity: 10
Merit: 0
|
|
May 07, 2014, 10:10:31 AM |
|
I updated my M$ runtimes to no avail.Downloading VS'13 now. Also trid your suggestion about the edits. Still crashed with this; [05/05/2014 08:35:41] The following exception occurred Application crashSystem.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SqlServerCe.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified. File name: 'System.Data.SqlServerCe.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at System.Data.SqlServerCe.ExtensionMethods.SystemDataSqlServerCeSqlCeProviderServices_Instance()
WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
Hope this helps. I updated the app, this problem should now be fixed. Thanks to TheWARLoK for his precious help. I also fixed a crash for when Cryptsy's pairs cannot be retrieved, and the application should now display up to 8 decimals (if they are present) for numbers
|
|
|
|
wishhhmaster (OP)
Newbie
Offline
Activity: 10
Merit: 0
|
|
May 15, 2014, 10:20:34 AM |
|
I just uploaded v 0.0.0.4a, which contains the following - Display correct balance for Cryptsy pairs
- Correct retrieval of links from RSS feeds
- Fixed crash when currency pairs cannot be retrieved fro Cryptsy
- Fixed crash when filling Buy Amount when price is 0
- Display of version number
Thanks again to TheWARLoK for his help via PMs for testing and raising bugs.
|
|
|
|
TheWARLoK
Newbie
Offline
Activity: 17
Merit: 0
|
|
May 15, 2014, 06:23:10 PM |
|
I just uploaded v 0.0.0.4a, which contains the following - Display correct balance for Cryptsy pairs
- Correct retrieval of links from RSS feeds
- Fixed crash when currency pairs cannot be retrieved fro Cryptsy
- Fixed crash when filling Buy Amount when price is 0
- Display of version number
Thanks again to TheWARLoK for his help via PMs for testing and raising bugs. Since I can see some serious potential with this project, I'm more than glad to help however I can. Can't wait for the next round. Keep up the good work!
|
|
|
|
|