C# Trading Bot Blog Series

11 replies 171 views
byte21Member
Posts: 18 · Reputation: 148
#1May 27, 2020, 04:28 AM
We've kicked off a series of blog entries where we'll show you how to build trading bots using C#. It's a clear, step-by-step guide aimed at folks who are familiar with C# and have some basic trading knowledge. In the first installment, we’ll hook up to the Binance exchange, grab market data, and compute a straightforward RSI indicator from the data we collect. Later on, we’ll connect the bot to Telegram, set up order creation, add more complicated logic, assess performance, and more. All examples will utilize the Whale's Secret ScriptApiLib in its free version, so you can follow along without spending a dime.
5 Reply Quote Share
byte21Member
Posts: 18 · Reputation: 148
#2May 27, 2020, 06:50 AM
In the second part of our series about algorithmic trading in C#, we connect the trading bot to Telegram chat room, so that we can be alerted about interesting developments on the market.
4 Reply Quote Share
byte21Member
Posts: 18 · Reputation: 148
#3May 27, 2020, 12:58 PM
In the 3rd part of our series, we explain the concept of orders in general, we talk about differences between limit and market orders, and we show samples how to place these orders on the Binance exchange. Nice feature of our Whale's Secret ScriptApiLib library is that in order to make the samples work on KuCoin exchange, all that is needed is to change a single constant in the code. That's the whole point of our library - to have the same code for all exchanges. Let us know what you think. There is much more to come, we barely scratched the surface so far, but explaining the basics is important for those who are just starting with trading automation.
5 Reply Quote Share
darkviperFull Member
Posts: 112 · Reputation: 392
#4May 27, 2020, 02:12 PM
Trading with bot is good but there should be some sets of limitation and restriction as most times Bot do malfunction and imagine someone have an open trading and the market is already against you, and your bots also malfunction what would you do next to restore back you money? Definitely you can't alter any words or evening of how to restore them. Initially what I love is having self experience and what you have learnt before implementing them, even though you must use bot but let it be that you already had enough without haven't to relying on the bot to keep performing and executing trade for someone, I know there are people who may love it but, sincerely the rate at which people do lose their money is a results of inappropriate/lack of research on trading.
8 Reply Quote Share
byte21Member
Posts: 18 · Reputation: 148
#5May 27, 2020, 06:49 PM
The risk management is certainly very important and we will talk about that in our series as well. We actually have direct support for this in our library. We call it trading strategy budget. When you connect to the exchange with our library, you can define budget that is applied to all orders on that connection. And the library will prevent you to place such an order that exceeds the budget. So if you have a serious balance on your account but only want to test your strategy with a small amount, you can. And if there is a bug in your code, it's fine, the budget feature will protect you. In the ready-to-go bots we have among our samples, we allow for the configuration of the size of the trade relative to the initial budget. But we will cover that much more in the series.
0 Reply Quote Share
byte21Member
Posts: 18 · Reputation: 148
#6May 27, 2020, 09:02 PM
Part 4 is out. We explain basics of how placing orders on exchanges works and how their matching engines execute the placed orders. We show examples of how to get information about fills (both partial and full) of your orders using Whale's Secret ScriptApiLib.
2 Reply Quote Share
byte21Member
Posts: 18 · Reputation: 148
#7May 27, 2020, 09:43 PM
Order cancelling is discussed in part 5 of our algorithmic trading blog series.  We explain the basics of order cancelling and point out some edge cases that it is better to be aware of.  We also demonstrate how to use Whale's Secret ScriptApiLib to list and cancel orders on Binance and KuCoin. Enjoy!
4 Reply Quote Share
orbit100Hero Member
Posts: 423 · Reputation: 2314
#8May 27, 2020, 11:16 PM
I've skimmed some of your articles, and it does look pretty cool. That being said, is there no dedicated articles or website pages comparing your product to other free trading bots or similar APIs? Because for me, your pricing can feel a bit expensive without knowing the market rate for such services. While I can spend some time researching it while reading your blog posts, I believe it would be easier for potential customers to figure out if the product is for them if you have a cheat sheet.
3 Reply Quote Share
byte21Member
Posts: 18 · Reputation: 148
#9May 28, 2020, 04:08 PM
Thanks, that's a good insight. So far we have hoped that people can very much use the free version to see for themselves. But I think you are right that it's not that easy - you don't want to try every library out there first before you make the decision. So I think we have to improve this as you suggest and provide some easy to digest comparison.
3 Reply Quote Share
byte21Member
Posts: 18 · Reputation: 148
#10May 28, 2020, 08:03 PM
Blog post part 6 - Reconnecting strategies In this post we discuss how to react to exchange service disruptions. This is a very important topic that differentiates professionals from people who are just playing with the idea of automatic trading. How will your trading bot behave if there is a network connection problem? Suddenly, you get disconnected. What do you do? What if the connection is reestablished but you get disconnected in couple of seconds again? Whale's Secret ScriptApiLib offers a solution in form of connection strategies. You can choose the strategy that is applied when a problem occurs and the selected strategy is then applied automatically. For example, you may define that the API request operation should block and wait without limit until the connection is available again. All subscriptions are automatically renewed, so you can keep consuming updates of market data as if nothing happened. Check out the full post for more details!
1 Reply Quote Share
byte21Member
Posts: 18 · Reputation: 148
#11May 28, 2020, 11:32 PM
Part 7 - Trade and Order History We explain what is a trade in a terminology of an exchange and describe how to get historical trades and orders from an exchange using Whale's Secret ScriptApiLib. With most exchanges, this action is straightforward, but for some reason it's a challenging task on Binance. We've wrote a dedicated tweet to explain that situation.
4 Reply Quote Share
byte21Member
Posts: 18 · Reputation: 148
#12May 29, 2020, 01:22 AM
Part 8 introduces a simple API to get the exchange account balance. We also discuss common account security features offered by exchanges today.
3 Reply Quote Share

Related topics