Warning: a Cloudflare captcha may prevent from accessing the StockTwits API (depends on country).
Syntax
public static List<string> StockTwitsClient.GetStockTwits(string symbol)
public static List<Tuple<DateTime, string>> GetStockTwitsWithDate(string symbol)
Parameter Description
symbol | A 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.
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 );
}
}
}