AutoShares API
  • What is AutoShares?
  • API Documentation
    • Quick Start Guide
    • API Overview
    • Authentication
      • Authenticate with AutoShares SSO/Auth0
      • Triggering authentication with /login
      • For logout scenario
    • Onboarding Users
      • Account Setup
        • Syntax
        • Add Account To User
        • Add Account To User By Username
        • Get All Accounts Of A User
        • Get All Users Of An Account
        • Get Account Info
        • Update Alias Account For Current User
        • Remove Account From User
        • Get User's Trading Settings
        • Get User's Exchanges
      • Access Agreements
    • Account Balances and Buying Power
      • Get Balance Information For A User
      • Get Account's Balance Info
      • Get Historical Account Value
    • Order Processing and Trading
      • Place Order
        • Syntax
      • Verify Order Placement
        • Syntax
      • Verify Order Replacement
        • Syntax
      • Replace Order
        • Syntax
      • Cancel an Order
        • Syntax
      • Get Order's Info
        • Syntax
      • Get Filtered Orders
        • Syntax
      • Validate Order by ID
      • Positions
        • Get User's Positions
          • Syntax
        • Get User's Positions in a Security
          • Syntax
        • Get Market Value of all Security Groups
      • Managing Transactions
        • Get Transactions
          • Syntax
    • Streaming Data and Quotes
      • Streaming API Endpoints
        • Get Streamers' Info
        • Recover a Streamer Session
      • Quotes
      • Orders
      • Positions
      • Watchlists
      • Account Balances
      • User Balance
      • 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
        • Get Company Logo By Symbol
    • Historical Chart Data
      • Get Comparison Chart Data
        • Syntax
      • Get Candles and Indicators for a Security
        • Syntax
      • Get Chart Data in the Excel Format
        • 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
    • 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
      • News
        • Get News for a Security
        • Get Corporate Actions for a Security
    • [Webhooks and SDKs]
    • Wires, ACH, and Account Transfers
      • ACH Setup
        • Create A New ACH Relationship
        • Get an ACH Relationship
        • Modify an ACH Relationship
      • Deposit / Withdraw Funds
        • Deposit / Withdraw Funds via ACH
      • Get a Transfer's Info
        • Get an ACH Transfer's Info
        • Get All Transfers
    • 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. API Documentation
  2. Streaming Data and Quotes

Streaming API Endpoints

Subscribe to quote streamers

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: wss://apidevportal.autoshares.dev:9999/CreateSession.txt?User=trader&Password=trader&HttpClientType=WebSocket

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

Example: wss://apidevportal.autoshares.dev:9999/CreateSession.txt?User=someUser: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 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'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.

PreviousStreaming Data and QuotesNextGet Streamers' Info

Last updated 1 year ago

While the current implementation of data streaming includes only several data types that can be retrieved in real-time, AutoShares 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 .

support team