Documentation

Create a streaming session

Create a streaming session for use with the Tradier Streaming API. This session can be used with the streaming endpoints to obtain updates to the market as they happen.

Note: Once a sessionid is received, it will be valid for 5 minutes, during which time you can initiate a stream. After the session expires and you'll need to create a new session in order to stream data.

Endpoint

Method
POST
URL
/v1/markets/events/session

Headers

Accept
application/xml, application/json, application/javascript
Default: application/xml
Required: false
Authorization
Bearer {access token}
Required: true

Response

Field Description
sessionid A unique session ID for use with streaming.
url The URL to access for streaming market data.

Example

Command

$ curl -X POST -H "Authorization: Bearer {access token}" https://api.tradier.com/v1/markets/events/session

Request

POST /v1/markets/events/session HTTP/1.1
Host: api.tradier.com
Accept: application/xml
Authorization: Bearer 098f6bcd4621d373cade4e832627b4f6
Content-Type: application/x-www-form-urlencoded
User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5

Response

HTTP/1.1 200 OK
Content-Type: application/xml;charset=utf-8

<?xml version="1.0" encoding="UTF-8"?>
<stream>
    <sessionid>34d62470-4ba1-4b8b-bbf4-17a29db97f8f</sessionid>
    <url>https://stream.tradier.com/v1/markets/events</url>
</stream>

Tradier Inc. and its corresponding technology services (including API services) are distinct and separate from the services provided by Tradier Brokerage Inc. For more information regarding the services of Tradier, Inc., please contact techsupport@tradier.com. For more information regarding the services of Tradier Brokerage, Inc. please contact service@tradierbrokerage.com. Tradier Brokerage Inc. Member FINRA/SIPC

© 2017 Tradier Inc.
  • 11016 Rushmore Drive, Suite 350
  • Charlotte, NC 28277

All materials contained on this site and specifically the API documentation pages are protected by United States copyright law and may not be copied, reproduced, distributed, transmitted, displayed, published or broadcast without the prior written permission of Tradier Inc. The Structure, Format, Layout, Examples and Design of the pages are owned by Tradier Inc, and any efforts to willfully or accidently duplicate a whole or part of the pages on this site is a violation of United States copyright law.