Markets
All markets supported by TT are listed in the MarketId enumeration.

Note: The market name for Autospreader instruments is “ASE” and the market name for Aggregator instruments is “AGGREGATOR”.
You can also access the full list of markets supported by TT via the MarketCatalog member variable of the TTAPI class. The MarketCatalog class has a member variable named Markets which is a Dictionary of Market instances.

The Market class provides several public members, including:
// market name
public string Name;
// market id
public MarketId Key;
// whether trading is enabled for your user on this market
public bool IsTradingEnabled;
// supported product types for this market
public IEnumerable<ProductType> SupportedProductTypes;
// valid accounts for this market
public IReadOnlyCollection<Account> Accounts;
// utility function to get MarketId from a string name
public static MarketId GetMarketIdFromName(string marketName)
The MarketCatalog also provides the ability to register for changes to the IsTradingEnabled flag. The following code snippet demonstrates how to register for these event notifications.
m_api.MarketCatalog.TradingEnabledChanged += MarketCatalog_TradingEnabledChanged;
private void MarketCatalog_TradingEnabledChanged(object sender, MarketStatusEventArgs e)
{
Console.WriteLine("Market: {0}, IsTradingEnabled: {1}", e.Market, e.IsTradingEnabled);
}
All product types supported by TT are listed in the ProductType enumeration.

Note: The product type for Autospreader and Aggregator instruments is “Synthetic”.
The Product class offers a static function that allows you to convert from a string to enumerated value.
public class Product
{
// …
public static ProductType GetProductTypeFromName(string productTypeName)
// ...
}