🖥️
AutoShares
  • Deploy Apps with AutoShares API
  • User guide
    • Introduction
    • Web Trader
      • Getting Started
      • Platform Layout
      • User Widgets
        • Account Information
        • Account Opening
          • Account Funding
            • ACH Transfers
            • Check Transfers
            • Wire Transfers
        • Chart
        • News
        • Trade Ticket
          • Mutual Funds Trade Ticket
        • Watchlists
        • Orders
        • Positions
        • Market Depth
        • Options
        • Hotkeys
    • Digital Advisor
      • Getting Started
      • Selecting an Investment Model
      • Portfolio Tab
      • Trading Tab
      • Activity Tab
      • Funding Tab
    • WebTrader for iOS
      • Getting Started
      • App Layout
      • Watchlist & Quotes View
        • Trade View
          • Stock Trading
          • Options Trading
      • Positions View
      • Orders View
      • Price Alerts View
      • Account View
      • Apple Watch Extension
    • Web Trader for Android
      • Getting Started
      • App Layout
      • Watchlist & Quote View
        • Trade View
      • Price Alerts
      • Accounts & Settings
    • Knowledge Base
      • Troubleshooting
        • Performance
          • Tips for Enhancing Performance
      • How-To Guides
        • Trading Accounts
          • How to Create a New Trading Account
        • Security
          • How to Enable Two-Factor Authentication
  • REST API
    • Introduction
    • Trading API
      • Overview
      • Authentication
        • Single-Factor Authentication
          • Syntax
        • Two-Factor Authentication
          • Syntax
      • User Registration
        • Get Required Fields
        • Register a User
      • Managing Users
        • Get User's Info
          • Syntax
        • Get User's Trading Settings
        • Get Mobile App Settings
        • Get User's Exchanges
        • Modify User's Settings
        • Update User's Password
      • Trading Accounts
        • Get Account's Balance Info
          • Syntax
        • Get Account's History
          • Syntax
        • List User's Accounts
          • Syntax
      • Password Reset
        • 1. Reset Trader's Password
        • 2. Retrieve the Secret Question
        • 3. Generate a Token For a New Password
        • 4. Update the Password
      • Trading Accounts
        • Open a New Trading Account
      • Account Funding
        • Create an ACH Relationship
        • Get an ACH Relationship
        • Get All ACH Relationships
        • Get the Default ACH Relationship
        • Modify an ACH Relationship
        • Delete an ACH Relationship
        • Approve an ACH Relationship
        • Deposit / Withdraw Funds via ACH
        • Cancel an ACH Transfer
        • Get All Transfers
      • Orders
        • Verify Order Placement
          • Syntax
        • Place Order
          • Syntax
        • Verify Order Replacement
          • Syntax
        • Replace Order
          • Syntax
        • Cancel an Order
          • Syntax
        • Get Order's Info
          • Syntax
        • Get Filtered Orders
          • Syntax
      • Positions
        • Get User's Positions
          • Syntax
        • Get User's Positions in a Security
          • Syntax
        • Get Market Value of all Security Groups
      • Securities
        • Get Equity Info by Internal ID
          • Syntax
        • Get Equity Info by Ticker
          • Syntax
        • Get Equity Info by Mask
          • Syntax
        • Get Filtered Equities
          • Syntax
        • Get Option Info by Internal ID
          • Syntax
        • Get Option Info by Ticker
          • Syntax
        • Get Options Expiration Dates
          • Syntax
        • Get an Option Chain
        • Get Filtered Options
          • Syntax
      • Watchlists
        • Add Security to Watchlist by ID
          • Syntax
        • Add Security to Watchlist by Ticker
          • Syntax
        • Create New Watchlist
          • Syntax
        • Delete Watchlist
          • Syntax
        • Get Specific Watchlist
          • Syntax
        • Get User's Watchlists
          • Syntax
        • Remove Security From Watchlist by ID
          • Syntax
        • Remove Security from Watchlist by Ticker
          • Syntax
        • Rename Watchlist
          • Syntax
      • Price Alerts
        • Create Price Alert
          • Syntax
        • Delete Price Alert
          • Syntax
        • Get Specific Alert
          • Syntax
        • Get User's Price Alerts
          • Syntax
        • Modify Price Alert
          • Syntax
      • Historical Data
        • Get Comparison Chart Data
          • Syntax
        • Get Candles and Indicators for a Security
          • Syntax
        • Get Chart Data in the Excel Format
          • Syntax
      • News
        • Get News for a Security
        • Get Corporate Actions for a Security
      • User Feedback
        • Submit Feedback
          • Syntax
      • Managing Transactions
        • Get Transactions
          • Syntax
      • Streaming Data
        • Quotes
        • Orders
        • Positions
        • Watchlists
        • Account Balances
      • Code Samples
        • Basic Authentication
        • Two-Factor Autentication
        • Placing New Orders
        • Get User Information
        • List User Positions
        • Get Trading Data for Charts
      • Terms and Definitions
        • Part I
        • Part II
        • Part III
Powered by GitBook
On this page
  • Introduction
  • Connecting
  • Request
  • Response
  • Subscribe/Unsubscribe
  • Streamer Types
  • Streamer Configuration
  • Streamer Performance
  1. REST API
  2. Trading API

Streaming Data

Subscribe to quote streamers

PreviousSyntaxNextQuotes

Last updated 4 years ago

Introduction

The Streaming APIs give developers low-latency access to streams of data. A proper implementation of a streaming client will include pushed messages indicating quotes, order, positions and other events have occurred, without any of the overhead associated with polling a REST endpoint.

Connecting

To create a new connection to the streamer following conditions must be satisfied:

  • User should be authorized in the system.

  • Session ID should be valid.

  • User ID should be valid.

Request

Option 1: Via Login and Password

GET <URL>СreateSession.txt?User=<UserLogin>&Password=<UserPassword>&HttpClientType=WebSocket

Example: ********

Param

Description

UserLogin

The is the user's login.

UserPassword

This is the user's password.

Option 2: Via Streamer Session ID

GET <URL>?User=<UserID>:<SessionID>&Password=<StreamerSessionID>&HttpClientType=WebSocket

Param

JSON Key

Description

UserID

Result.UserId

User's identifier

SessionID

Result.SessionID

User's session identifier.

StreamerSessionID

For trade data streamer: Result.DataAddresses.SessionID

For quote data streamer: Result.QuoteAddresses.SessionID

Session identifier for the target streamer.

Response

Param

Value

Description

Cmd

CreateSession.txt

Create a new connection

StatusCode

Connection Status

—

SessionID

User's session identifier

—

Example: {"Cmd":"CreateSession.txt", "StatusCode":"Ok", "SessionId":"6210cb85-c6bb-44f1-a53b-0e43669bd6f4" }

Example 2: {"Cmd":"CreateSession.txt", "StatusCode":"Error"}

Subscribe/Unsubscribe

Used for start/stop receiving data changes. Once applications subscribe to a streaming endpoint, they are delivered a feed of data, without needing to worry about polling or REST API rate limits.

Param

Type

Description

Cmd

String

Command

SessionId

String

User's session identifier from the authentication response.

Keys

String

One or several subscription keys, each separated by “;”

EntityType

String

Entity type identifier. It's equal to the key property from entity definition section on the streamer's side.

HttpClientType

String

Client type.

Streamer Types

Autoshares Trader provides two types of streamers:

  1. Quote data streamer

  2. Trade data streamer.

Each streamer is accessible through its own separate port in your environment. Quote data streamer is responsible for streaming quotes, trades, and market depth. Trade data streamer, on the other hand, is responsible for streaming other data like watchlists, positions, orders, account balances, price alerts, etc.

Streamer Configuration

Streamer Performance

Autoshares Trader's streaming API is built to sustain a high load of user subscriptions. Data throughput will vary depending on the type of data to which the user subscribes (quote streaming being the most resource intensive). Traders may have large watchlists with dozens of different securities and each security must be displayed along with a real-time quote for the best user experience. That raises the question of how many simultaneous quotes the streamer can process. Most of the time the streamer can meet the requirements of the heftiest watchlists; however, our internal tests have indicated that the performance of a streamer may somewhat deteriorate after subscribing to more than 100 quotes.

Example: someUser:sessionID&Password=StreamerSessionID&HttpClientType=WebSocket

While the current implementation of data streaming includes only several data types that can be retrieved in real-time, Autoshares Trader also provides custom configurations of streamers that build on top of the existing functionality. For example, if you would like to stream positions across several trading accounts or account information across the whole environment, you will need a separate configuration of the streamer. To learn more about the degree to which the default functionality can be extended, contact our .

ws://etnatrader.etnasoft.us:9999
/CreateSession.txt?User=trader&Password=trader&HttpClientType=WebSocket
ws://etnatrader.etnasoft.us:9999/CreateSession.txt?User=
support team