Back to Stocksharp

Bitalong Connector

Connectors/Bitalong/README.md

5.0.01.8 KB
Original Source

Bitalong Connector

This directory contains the source code for the Bitalong connector used by the StockSharp trading platform. The connector implements an MessageAdapter which provides access to market data and trading operations on the Bitalong cryptocurrency exchange.

Features

  • Connection via REST/WebSocket using the BitalongMessageAdapter class.
  • Level1, tick, and order book market data subscriptions.
  • Order management (new, cancel, cancel all) and withdrawal requests.
  • Portfolio and balance updates with configurable check interval.
  • Automatic conversion between StockSharp data types and Bitalong REST API types located in the Native subfolder.

Configuration

BitalongMessageAdapter exposes several properties used to configure the connection:

PropertyDescription
KeyAPI key issued by Bitalong. Required for trading operations.
SecretAPI secret used to sign requests.
AddressExchange domain name. Defaults to bitalong.com.
BalanceCheckIntervalPeriodic account balance check interval. Useful when deposits or withdrawals occur.

Using in code

csharp
var adapter = new BitalongMessageAdapter(new IncrementalIdGenerator())
{
    Key = "<api-key>".ToSecureString(),
    Secret = "<api-secret>".ToSecureString(),
    BalanceCheckInterval = TimeSpan.FromMinutes(5)
};

The adapter can then be registered in your Connector or passed directly to S# components that work with message adapters.

Folder structure

  • BitalongMessageAdapter*.cs – implementation split into settings, market data, and transaction logic.
  • BitalongOrderCondition.cs – custom order condition for withdrawal operations.
  • Native – lightweight wrappers for the exchange REST API including request helpers and model classes.