Skip to content
Docs
Get API key
Economic Calendar

Economic Calendar Streaming

Use the Trading Economics API streaming to obtain live calendar events.

The Trading Economics API streaming endpoint can be used to receive live calendar releases utilizing a persistent web socket connection. Streaming data from the API consists of making an authorization request and leaving the socket open to continually receive data. You can authorize using your API client credentials (key/secret). Then you will be able to subscribe to one or more of our streaming channels.

Get live calendar

Python
import tradingeconomics as te
import json
te.login('your_private_key')

def on_message(ws, message):
    print(json.loads(message))

te.subscribe('calendar')
te.run(on_message)
Bash
{'event': 'Consumer Inflation Expectations', 'country': 'United States', 'category': 'Inflation Expectations', 'ticker': 'UNITEDSTAINFEXP', 'actual': '3.8%', 'previous': '4.1%', 'revised': 'null', 'date': '2023-07-10T15:00:00', 'referenceDate': '2023-06-30T00:00:00', 'reference': 'Jun', 'calendarId': '324314', 'unit': '%', 'currency': 'null', 'importance': '1', 'teforecast': '3.9%', 'forecast ': 'null', 'symbol': 'UNITEDSTAINFEXP', 'source': 'null', 'topic': 'calendar'}
{'event': '3-Month Bill Auction', 'country': 'United States', 'category': '3 Month Bill Yield', 'ticker': 'UNITEDSTA3MONBILYIE', 'actual': '5.25%', 'previous': '5.23%', 'revised': 'null', 'date': '2023-07-10T15:00:00', 'referenceDate': 'None', 'reference': , 'calendarId': '313670', 'unit': '%', 'currency': 'None', 'importance': '1', 'teforecast': 'None', 'forecast ': 'None', 'symbol': 'UNITEDSTA3MONBILYIE', 'source': 'null', 'topic': 'calendar'}
{'event': '6-Month Bill Auction', 'country': 'United States', 'category': '6 Month Bill Yield', 'ticker': 'UNITEDSTA6MONBILYIE', 'actual': '5.27%', 'previous': '5.236%', 'revised': 'null', 'date': '2023-07-10T15:00:00', 'referenceDate': 'null', 'reference': , 'calendarId': '324314', 'unit': '%', 'currency': 'null', 'importance': '1', 'teforecast': 'null', 'forecast ': 'null', 'symbol': 'UNITEDSTA6MONBILYIE', 'source': 'null', 'topic': 'calendar'}

Response fields

FieldTypeDescriptionExample
eventstringSpecific event name in the calendar‘Retail Sales MoM’
countrystringCountry name‘United States’
categorystringIndicator category name‘Retail Sales MoM’
tickerstringUnique ticker used by Trading Economics‘RSTAMOM’
actualstringLatest released value‘-1%’
previousstringValue for the previous period after the revision (if revision is applicable)‘-0.2%’
revisedstringValue reported in the previous period after revision‘-0.4%’
datestringRelease time and date in UTC‘2023-04-14T12:30:00’
referenceDatestringThe date period for which released data refers to‘2023-03-31T00:00:00’
referencestringThe period for which released data refers to‘Mar’
calendarIdstringUnique calendar ID used by Trading Economics‘319965’
unitstringUnit of the data‘%’
currencystringCurrency of the data“C$”
importancenumber1 = low, 2 = medium, 3 = high3
teforecaststringTE own projections‘-0.9%’
forecaststringAverage forecast among a representative group of economists‘-0.4%’
symbolstringUnique symbol used by Trading Economics‘RSTAMOM’
sourcestringSource of the data‘Office for National Statistics’
topicstringTopic subscribed‘calendar’