Open jrhurley2 opened 1 year ago
This should help determine which asset type for TDA, not sure if it will also work for TS
public static bool IsFutureSymbol(string symbol)
{
return symbol != null && symbol.Length > 1 && symbol[0] == '/';
}
public static bool IsIndexSymbol(string symbol)
{
return symbol != null && symbol.Length > 1 && symbol[0] == '$';
}
public static bool IsOptionSymbol(string symbol)
{
return symbol != null && symbol.Length > 12;
}
public static bool IsEquitySymbol(string symbol)
{
return symbol != null && !IsFutureSymbol(symbol) && !IsIndexSymbol(symbol) && !IsOptionSymbol(symbol);
}
Found this here
Probably going to use the web api, it has endpoints that identify the asset type:
routeGetInstrument = "v1/instruments/{0}";
Currently we can only handle equities, even though any asset type can be entered. To support futures trading we need to know what type of asset has been entered into the symbol is it an Equity or Future