What Are the Supported Markets for AI-Trader? (US Stock, Crypto, Polymarket)
AI-Trader currently supports three active markets: US Stock, Crypto (in testing), and Polymarket (in testing), while Forex, Options, Futures, and A-Share markets are defined in the codebase but remain disabled for trading.
The HKUDS/AI-Trader repository operates as a multi-market autonomous trading platform. While the architecture accommodates diverse asset classes, only US Stock, Crypto, and Polymarket are currently enabled for live trading according to the supported flags defined in the frontend configuration.
Currently Supported Markets in AI-Trader
The platform validates market availability through a boolean supported flag defined in service/frontend/src/appShared.tsx. Only markets explicitly marked with supported: true are exposed in the production UI and API.
US Stock
Traditional equities listed on U.S. exchanges (NASDAQ, NYSE) represent the primary supported market for AI-Trader. The system handles standard equity symbols through external quote services, with the market column in service/server/database.py (line 513) storing the 'us-stock' identifier for all related positions and transactions.
Crypto
Cryptocurrency trading is fully functional but explicitly marked as testing phase. The platform integrates with the Hyperliquid endpoint for price discovery and trade execution. In appShared.tsx, this market is labeled as 'Crypto (Testing)' with the internal value 'crypto' and supported: true.
Polymarket
Prediction-market contracts on the Polymarket platform are also enabled for testing. This market type allows trading on event-based outcomes, with the label 'Polymarket (Testing)' and value 'polymarket' in the market catalogue.
Markets Not Yet Enabled (Developing Status)
Several market types exist in the codebase infrastructure but are marked as unsupported (supported: false). These remain in development status:
- A-Share – Chinese mainland equities (marked "Developing")
- Forex – Currency pairs (marked "Developing")
- Options – Derivatives contracts (marked "Developing")
- Futures – Commodity and index futures (marked "Developing")
These entries appear in the market catalogue alongside supported markets but are filtered from active trading interfaces until implementation completes.
How Market Support Is Defined in the Codebase
The canonical source of market availability resides in service/frontend/src/appShared.tsx. Lines 263-266 define the supported markets array:
// Snippet from appShared.tsx (lines 263-266)
{ value: 'us-stock', label: 'US Stock', labelZh: '美股', supported: true },
{ value: 'crypto', label: 'Crypto (Testing)', labelZh: '加密货币(测试中)', supported: true },
{ value: 'polymarket',label: 'Polymarket (Testing)', labelZh: '预测市场(测试中)', supported: true },
The database schema enforces market-specific logic through the market column defined in service/server/database.py, ensuring all persisted trades reference valid market types. Server-side routing in service/server/routes_market.py and price retrieval logic in service/server/price_fetcher.py implement market-specific endpoints and data sources.
Working with Supported Markets (API Examples)
Filtering Supported Markets (Client-Side)
To retrieve only active markets from the frontend configuration:
import { MARKETS } from '@/service/frontend/src/appShared';
// Filter only supported markets
const supportedMarkets = MARKETS.filter(m => m.supported);
console.log(supportedMarkets.map(m => m.label));
/* → ["US Stock", "Crypto (Testing)", "Polymarket (Testing)"] */
Creating a Trade for a Supported Market
Submit trades via POST request to the trading API, specifying the market type in the payload:
curl -X POST https://api.example.com/trade \
-H "Content-Type: application/json" \
-d '{
"market": "us-stock",
"symbol": "AAPL",
"side": "buy",
"price": 175.00,
"quantity": 10
}'
Fetching Market-Specific Price Data
Price retrieval endpoints vary by market implementation:
# US-stock price (uses external quote service)
curl "https://api.example.com/price?market=us-stock&symbol=AAPL"
# Crypto price (uses Hyperliquid endpoint)
curl "https://api.example.com/price?market=crypto&symbol=BTC"
Summary
- AI-Trader supports three active markets: US Stock, Crypto (testing), and Polymarket (testing) as defined in
service/frontend/src/appShared.tsx. - Four additional markets (A-Share, Forex, Options, Futures) exist in the codebase but remain disabled with
supported: false. - The
marketcolumn inservice/server/database.pyrecords transaction types, whileroutes_market.pyandprice_fetcher.pyhandle market-specific logic. - Client applications should filter the
MARKETSarray by thesupportedboolean to display only available trading options.
Frequently Asked Questions
Does AI-Trader support Forex trading?
No, Forex is currently marked as "Developing" in the market catalogue. While the infrastructure exists in the codebase, the supported flag is set to false in appShared.tsx, preventing Forex trading in the current release.
Can I trade cryptocurrency on AI-Trader?
Yes, cryptocurrency trading is supported but operates in testing mode. The platform integrates with Hyperliquid for crypto price feeds and trade execution, accessible through the 'crypto' market value.
What file defines which markets are active in AI-Trader?
The supported markets are defined in service/frontend/src/appShared.tsx (lines 263-266). This file exports the MARKETS array containing objects with value, label, and supported properties that control UI visibility and API validation.
Are Options and Futures trading available?
No, both Options and Futures markets are listed with "Developing" status. They appear in the market definitions but have supported: false, meaning the backend infrastructure recognizes these market types but does not yet process trades for them.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →