ScriptBotContext

ScriptBotContext is the object passed to Haasbot's script bot script methods. The ScriptBotContext contains details on the bot-configuration, current and historical price info and references to the API-objects.

Interface

        public string Name { get; set; }
        public bool Activated { get; set; }
        public string ExchangePlatform { get; private set; }
        public string PrimaryCurrencyCode { get; private set; }
        public string SecondaryCurrencyCode { get; private set; }
        public PriceTick CurrentPrice { get; private set; }
        public List<TradingOrder> OpenOrders { get; set; }
        public ScriptBotAPI API { get; private set; }
        public IndicatorLog Logger { get; private set; }

Name

Name of the bot

Activated

True if the bot is activated

ExchangePlatform

Name of the exchange platform the bot is trading on. This can be used as input for the ScriptBotAPI methods.

PrimaryCurrencyCode

Currency code of the primary currency (for example "BTC").

SecondaryCurrencyCode

Currency code of the secondary currency (for example "USD").

CurrentPrice

The current price of the currency pair on the configured platform. Contains info on Bid, Ask, Volume, Open, Close and a timestamp.

OpenOrders

List of open orders on the exchange

Logger

Gives access to logging-features.

API

Gives access to historical price info and operations to create and cancel orders.

Last updated