StockTwits API

Modified on 2016/12/30 14:11 by Eugene — Categorized as: Community Components

Syntax


public static List<string> StockTwitsClient.GetStockTwits(string symbol)
public static List<Tuple<DateTime, string>> GetStockTwitsWithDate(string symbol)

Parameter Description

symbolA valid ticker accepted by StockTwits

Description

Downloads, parses and returns a collection of 30 latest twits for a tradable symbol as a List. The service is powered by StockTwits. The symbol must be valid and accepted by StockTwits.

The AlchemyAPI client in Community Components is the natural companion to this service, providing sentiment analysis of stock twits.

Example


using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using Community.Components; /*** Requires installation of Community.Components Extension from www.wealth-lab.com > Extensions ***/

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { List<string> lst = StockTwitsClient.GetStockTwits( Bars.Symbol ); foreach( string s in lst ) PrintDebug( s );

List<Tuple<DateTime, string>> lst2 = StockTwitsClient.GetStockTwitsWithDate( Bars.Symbol ); foreach( var t in lst2 ) PrintDebug( t ); } } }