Connectors/Btce/README.md
This project contains the source code of the BtceMessageAdapter, a connector used to interact with the BTC‑e crypto exchange (later renamed to WEX). The adapter is implemented as part of the StockSharp trading framework and provides both real‑time market data and transactional capabilities.
https://wex.nz/).PusherClient class located under Native.BtceMessageAdapter.cs – core adapter implementation and initialization logic.BtceMessageAdapter_MarketData.cs – market data subscription handling.BtceMessageAdapter_Transaction.cs – order registration, cancellations and portfolio management.BtceMessageAdapter_Settings.cs – adapter settings including API key, secret and heartbeat interval.BtceOrderCondition.cs – order condition class for withdrawal operations.Native/ – low level protocol helpers such as the REST HttpClient and WebSocket PusherClient.Btce project or compiled assembly in your application.BtceMessageAdapter from your trading connector.var connector = new Connector();
var adapter = new BtceMessageAdapter(connector.TransactionIdGenerator)
{
Key = "YOUR_API_KEY".ToSecureString(),
Secret = "YOUR_SECRET".ToSecureString(),
Address = BtceMessageAdapter.DefaultDomain,
};
connector.Adapter.InnerAdapters.Add(adapter);
connector.Connect();
// request available instruments
connector.LookupSecurities(new SecurityLookupMessage());
// place a limit order
await connector.RegisterOrderAsync(new OrderRegisterMessage
{
SecurityId = "BTC/USD".ToSecurityId(BoardCodes.Btce),
Side = Sides.Buy,
OrderType = OrderTypes.Limit,
Price = 650m,
Volume = 0.1m,
});
Withdrawal can be performed by registering an order with a BtceOrderCondition instance containing the required withdrawal information.
StockSharp documentation provides general instructions on working with message adapters: Creating your own connector.
Questions and discussion can be posted in the StockSharp chat.