Subscribe to News

Start receiving real-time news updates by subscribing to specific criteria.
socket.emit('news:subscribe', {
  minImportance: 7,
  symbol: 'AAPL',
  limit: 20,
  startDate: '2024-01-01T00:00:00.000Z',
  endDate: '2024-01-31T23:59:59.999Z'
});
Parameters:
ParameterTypeDescriptionDefault
minImportanceintegerMinimum importance level (0-10)0
symbolstringStock symbol filter-
limitintegerMax articles per batch (1-100)10
startDatestringStart of date range filter (ISO 8601)-
endDatestringEnd of date range filter (ISO 8601)-

Subscription Confirmation

Receive confirmation when subscription is successful.
socket.on('news:subscribed', (confirmation) => {
  console.log('Subscription confirmed:', confirmation);
});
Response (official format):
{
  "type": "news",
  "params": {
    "limit": 20,
    "minImportance": 7,
    "symbol": "AAPL"
  },
  "message": "Successfully subscribed to news feed - 실시간 업데이트 활성화됨"
}

Unsubscribe

Remove specific subscriptions or unsubscribe from all topics.
// Unsubscribe from specific symbol
socket.emit('news:unsubscribe', {
  symbol: 'AAPL'
});

// Unsubscribe from all news
socket.emit('news:unsubscribe:all');

Multiple Subscriptions

Subscribe to multiple criteria simultaneously.
// Subscribe to high-importance general news
socket.emit('news:subscribe', {
  minImportance: 9
});

// Subscribe to AAPL news
socket.emit('news:subscribe', {
  symbol: 'AAPL',
  minImportance: 6
});