I'm opening this issue to track Cryptocurrency Trading on MultiCharts.NET. MultiCharts 12.0 added few cryptocurrency data feeds and looks like support for trading cryptocurrencies is in the plans.
Some of the limitations that I see in the current implementation of the API are the followings:
With cryptocurrencies, we need to be able to specify trade amounts in very tiny fractions, for example, the smallest unit in BTC is 0.00000001 (aka a Satoshi). The
IOrderMarket.Send(int numLots) method gets
numLots in 32-bit integers (
Int32.MaxValue = 2,147,483,647). If a lot size is set to a Satoshi, for example, it can easily overflow the integer with a
System.ArithmeticException (Overflow or underflow in the arithmetic operation). So the minimum data size needed would be a 64-bit integer (
long data type in C# which is
Int64) as the parameter for
IOrderMarket.Send method. However, even that is not the best interface for trading cryptos. Generally for cryptos, it does not make sense to specify amounts as contracts or lots, but the best interface would be sending the amounts in the crypto units as a 128-bit decimal data type which does not have rounding issues of
double. The API may then want to convert that to number of lots or whatever the underlying architecture requires. It does not have to support up to the
decimal data type, though.
So the recommended interface for sending crypto market orders would be like:
void Send(decimal amount);
For example, if the instrument is BTCUSD, you could order to buy 25 μBTC (micro-bitcoins) like this:
The second limitation, in my opinion, is the closed API for adding custom brokerages. People will not wait years and months for MultiCharts to add support for each of the brokers. They will bypass the MultiCharts trading APIs and use any of the open source implementations of the crypto broker APIs (via C#), with the downside of not being able to use any of MultiCharts' backtesting and optimization features. Or they might find it easier to move on to another platform that can plug into custom brokers.
Pretty much all of the popular crypto exchanges, including Binance, Bitfinex and Coinbase have open source implementations of their APIs in C#, that in many cases are supported officially by the exchanges. An open plug-in model for connecting to custom brokers will allow the MultiCharts community to contribute integrations with any of these exchanges. MultiCharts would be able to review and recognize some of them as supported or choose not to support them but either way, this will greatly expand the user base of MultiCharts. I think from a business standpoint, opening up such a plug-in model to connect to custom exchanges would be smart, requires much less effort than having to support everything out of the box and will put MultiCharts in good stance in the competition. That would be a huge gain and I believe it's the only way to stay competitive in the crypto trading market as a platform.