Show / Hide Table of Contents

    Class Connection

    Represents information about connection and provides an access to the current trading information(Symbols, Orders, Position, Accounts etc.).

    Namespace: TradingPlatform.BusinessLayer
    Syntax
    public class Connection : ICustomizable

    Properties

    BusinessObjects

    Provides access to all business objects which are belong to this connection

    Declaration
    public IBusinessObjectsProvider BusinessObjects { get; }
    Property Value
    Type Description
    TradingPlatform.BusinessLayer.IBusinessObjectsProvider

    HistoryMetaData

    Gets a matched available metadata info with the vendor's side

    Declaration
    public HistoryMetadata HistoryMetaData { get; }
    Property Value
    Type Description
    TradingPlatform.BusinessLayer.Integration.HistoryMetadata

    Id

    Gets connection Id

    Declaration
    public string Id { get; set; }
    Property Value
    Type Description
    System.String

    Name

    Gets connection Name

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String

    PingTime

    Represents connection ping time

    Declaration
    public TimeSpan PingTime { get; }
    Property Value
    Type Description
    System.TimeSpan

    Settings

    Contains list of connection settings. Will be reused on each population time.

    Declaration
    public IList<SettingItem> Settings { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IList<TradingPlatform.BusinessLayer.SettingItem>

    State

    Gets connection's state (Connected/Connecting/Fail etc.)

    Declaration
    public ConnectionState State { get; }
    Property Value
    Type Description
    TradingPlatform.BusinessLayer.ConnectionState

    Type

    Defines connection type

    Declaration
    public ConnectionType Type { get; set; }
    Property Value
    Type Description
    TradingPlatform.BusinessLayer.ConnectionType

    UserType

    Defines which user type is used (real/demo etc.)

    Declaration
    public ConnectionUserType UserType { get; }
    Property Value
    Type Description
    TradingPlatform.BusinessLayer.ConnectionUserType

    VendorName

    Gets connection's vendor name

    Declaration
    public string VendorName { get; }
    Property Value
    Type Description
    System.String

    Methods

    Connect()

    Establishes a connection to a specified vendor

    Declaration
    public ConnectionResult Connect()
    Returns
    Type Description
    TradingPlatform.BusinessLayer.Integration.ConnectionResult

    Disconnect()

    Closes a connection.

    Declaration
    public void Disconnect()

    GetAllRules()

    Returns a list of rules which are discribing allowed operations for the Account, Symbol, OrderType of given vendor/connection.

    Declaration
    public List<Rule> GetAllRules()
    Returns
    Type Description
    System.Collections.Generic.List<TradingPlatform.BusinessLayer.Rule>

    SendCustomRequest(RequestParameters)

    Declaration
    public void SendCustomRequest(RequestParameters parameters)
    Parameters
    Type Name Description
    RequestParameters parameters

    Events

    StateChanged

    Will be triggered when State changed.

    Declaration
    public event EventHandler<ConnectionStateChangedEventArgs> StateChanged
    Event Type
    Type Description
    System.EventHandler<TradingPlatform.BusinessLayer.ConnectionStateChangedEventArgs>
    Back to top Copyright © 2017 - 2018 Quantower LLC