API Docs
Research-use API
API outputs are descriptive market data and model reference values for research and review, not action instructions. External API calls share the frontend G-Points system.
Download Full Docs
Markdown format, includes MCP Tools definitions
Quick Start
Get started with G-Prophet API in 3 steps
Get your API Key
Go to Settings → API Key Management to create your API Key. Format: gp_sk_...
Choose your integration method and configure
OpenClaw is an open-source AI Skill management platform. If you already use OpenClaw, a single command integrates G-Prophet model-projection and market-research capabilities into your workflow — no coding required.
Prerequisites
Make sure the OpenClaw CLI is installed on your computer. If not, visit clawhub.ai and follow the official installation guide first. Then verify by running:
clawhub --version
# If it prints a version number (e.g. v1.x.x), you're good to go1Install the G-Prophet Skill
clawhub install gprophet-apiThis command automatically downloads and installs the G-Prophet Skill from ClawHub. You'll see a success message when it's done.
2Configure your API Key
Add the API Key you created in Step 1 to OpenClaw's environment variables or config file:
GPROPHET_API_KEY=gp_sk_your_key_here3Verify it works
Start a new OpenClaw session and type the following to test:
Use your gprophet-api skills:
Multi-algorithm comparison analysis for US stock TSLAIf the AI returns a multi-model projection comparison for TSLA (Tesla), everything is configured correctly and you're ready to go.
API Reference
Works with any language — standard REST API
Authentication
Paid, account, and authenticated-health requests require an API Key. Public GET /health and GET /info do not require one.
curl -H "X-API-Key: gp_sk_your_key_here" \
https://www.gprophet.com/api/external/v1/market-data/quote?symbol=AAPL&market=USHeader Name
X-API-KeyKey Format
gp_sk_...Base URL
/api/external/v1Unified Response Format
All endpoints return a unified JSON format.
{
"success": true,
"data": { ... },
"metadata": {
"request_id": "req_abc123def456",
"timestamp": "2026-08-03T01:00:00+00:00",
"processing_time_ms": 123,
"api_version": "v1"
},
"error": null
}Supported Markets and Extension Rule
Current public markets are US, CN, HK, JP, KR, CRYPTO, UK, CA, DE, and IN. AI, SDK, and MCP clients should call GET /info to read supported_markets and market_details instead of hard-coding an old market list.
| Code | Market | Symbol Examples |
|---|---|---|
| US | US stocks | AAPL, TSLA, GOOGL, MSFT |
| CN | China A-shares | 600519, 000001, 300750 |
| HK | Hong Kong stocks | 700, 0700, 700.HK, 9988 |
| JP | Japan stocks | 7203, 7203.T, 130A.T |
| KR | Korea stocks | 005930, 005930.KS, 035420.KQ |
| CRYPTO | Crypto trading pairs | BTCUSDT, ETHUSDT, SOLUSDT |
| UK | UK stocks | HSBA.LON, TSCO.LON, BP.LON, SHEL.LON |
| CA | Canada stocks | SHOP.TRT, CNR.TRT, RY.TRT, TD.TRT |
| DE | Germany stocks | SAP.DEX, SIE.DEX, ALV.DEX, MBG.DEX |
| IN | India stocks | RELIANCE.NS, TCS.NS, INFY.NS, HDFCBANK.NS |
Future markets use the same parameter, market=<market code>. Suggested automation: search first, then predict with the returned canonical symbol. HK bare digits normalize to 4 digits. UK is the official market code. For DE/IN and other international predictions, set client timeout to at least 120 seconds.
G-Points Cost
Paid endpoints consume G-Points per call. Health checks, balance, usage, API info, and task polling are free.
| Skill | Endpoint | G-Points Cost |
|---|---|---|
| AI Model Projection | POST /predictions/predict | 10–20 per run, depending on market |
| Multi-Algorithm Compare | POST /predictions/compare | Per-prediction × algorithms |
| Market Data | GET /market-data/* | 5 |
| Batch Quote | POST /market-data/batch-quote | 5 × symbols |
| Technical Indicators | POST /technical/analyze | 5 |
| Market Sentiment | GET /sentiment/* | 5 |
| AI-Assisted Research Report | POST /analysis/stock | 58 |
| Multi-Factor Research Review | POST /analysis/comprehensive | 150 |
| G-Points Balance | GET /account/balance | Free |
| Usage Stats | GET /account/usage | Free |
| API Info | GET /info | Free |
| Health Checks | GET /health, /health/auth, /predictions/health | Free |
API Endpoints
/api/external/v1/predictions/predictAI Price Projection
Generate a market model reference path across US, CN, HK, JP, KR, CRYPTO, UK, CA, DE, and IN. G-Prophet2026V2 is available for CN/A-shares only.
Request
curl -X POST -H "X-API-Key: gp_sk_xxx" \
-H "Content-Type: application/json" \
-d '{"symbol": "AAPL", "market": "US", "days": 2, "algorithm": "auto"}' \
https://www.gprophet.com/api/external/v1/predictions/predictResponse
{
"success": true,
"data": {
"symbol": "AAPL",
"name": "Apple Inc.",
"market": "US",
"currency": "USD",
"timezone": "America/New_York",
"current_price": 185.50,
"predicted_price": 190.25,
"change_percent": 2.56,
"direction": "up",
"confidence": 0.78,
"prediction_days": 2,
"algorithm_used": "gprophet2026v1",
"model_reference_path": {
"schema_version": "1.0",
"interval": "1d",
"date_semantics": "market_local_trading_date",
"requested_points": 2,
"point_count": 2,
"status": "complete",
"uncertainty": {
"kind": "model_uncertainty_range",
"method": "model_percentile",
"confidence_level": 0.78,
"confidence_level_semantics": "model_reported_score_not_nominal_coverage",
"complete": true
},
"points": [
{"step": 1, "date": "2026-08-04", "model_reference_price": 187.10, "uncertainty_lower": 181.40, "uncertainty_upper": 191.03},
{"step": 2, "date": "2026-08-05", "model_reference_price": 190.25, "uncertainty_lower": 182.72, "uncertainty_upper": 195.44}
],
"warnings": []
},
"points_consumed": 20
}
}model_reference_path.points provides one model reference price per market-local trading date and binds uncertainty_lower / uncertainty_upper to that same date. currency is the quote currency and timezone is the IANA market timezone used to interpret dates; status, uncertainty.complete, and warnings describe completeness. uncertainty.confidence_level is a model-reported score, and confidence_level_semantics explicitly says it is not nominal coverage; do not interpret it as a calibrated “95% confidence interval.” These points are not actual future OHLCV. Call GET /market-data/history for historical observed OHLCV. POST /predictions/compare currently returns algorithm summaries only, not a reference path for each algorithm.
/api/external/v1/predictions/compareMulti-Model Comparison
Returns currency, timezone, and summary projections across algorithms. G-Points = per-run cost × algorithms; per-algorithm model_reference_path data is not currently returned.
Request
curl -X POST -H "X-API-Key: gp_sk_xxx" \
-H "Content-Type: application/json" \
-d '{"symbol": "600519", "market": "CN", "days": 5, "algorithms": ["gprophet2026v2", "gprophet2026v1", "lstm"]}' \
https://www.gprophet.com/api/external/v1/predictions/compareResponse
{
"success": true,
"data": {
"symbol": "600519",
"name": "贵州茅台",
"market": "CN",
"currency": "CNY",
"timezone": "Asia/Shanghai",
"current_price": 1680.00,
"results": [
{"algorithm": "gprophet2026v2", "predicted_price": 1728.40, "confidence": 0.84},
{"algorithm": "gprophet2026v1", "predicted_price": 1720.50, "confidence": 0.82},
{"algorithm": "lstm", "predicted_price": 1695.30, "confidence": 0.71}
],
"best_algorithm": "gprophet2026v2",
"points_consumed": 30
}
}/api/external/v1/predictions/healthPrediction Health Check
Validates the API key, predictions scope, quotas, and G-Points needed for one projection without running a model or consuming G-Points.
Request
curl -H "X-API-Key: gp_sk_xxx" \
"https://www.gprophet.com/api/external/v1/predictions/health?market=US"Response
{
"success": true,
"data": {"status": "ok", "service": "predictions", "market": "US", "ready": true}
}Health Checks
All three checks are free: public /health verifies origin reachability; /health/auth validates the API key, account, quotas, and G-Points; /predictions/health additionally checks predictions scope and the G-Points required for one projection without running a model or deducting G-Points.
/api/external/v1/healthPublic Connectivity Check
Requires no API key and confirms the request passed through the CDN/WAF to the G-Prophet origin.
Request
curl "https://www.gprophet.com/api/external/v1/health"Response
{
"success": true,
"data": {"status": "ok", "service": "G-Prophet External API", "origin_reached": true}
}/api/external/v1/health/authAuthenticated Health Check
Validates the API key, account, quotas, and G-Points status without consuming quota or G-Points.
Request
curl -H "X-API-Key: gp_sk_xxx" \
"https://www.gprophet.com/api/external/v1/health/auth"Response
{
"success": true,
"data": {"status": "ok", "authenticated": true}
}Error Codes
| HTTP | Code | Description |
|---|---|---|
| 401 | MISSING_API_KEY | Missing X-API-Key header |
| 401 | INVALID_API_KEY | API Key is invalid or does not exist |
| 403 | API_KEY_DISABLED | API Key has been disabled |
| 403 | INSUFFICIENT_SCOPE | API Key lacks required permissions |
| 402 | INSUFFICIENT_POINTS | Insufficient G-Points balance |
| 429 | RATE_LIMITED | Rate limit exceeded, please retry later |
| 429 | QUOTA_EXCEEDED | Daily/monthly quota exhausted |
| 422 | INVALID_MARKET | The market parameter is not in the current public supported market list |
| 422 | UNSUPPORTED_MARKET | The endpoint does not support the requested market; keep the URL path and change market or choose an endpoint that supports it |
| 422 | UNSUPPORTED_ALGORITHM_MARKET | The selected algorithm is unavailable for this market; G-Prophet2026V2 supports CN/A-shares only |
| 422 | SYMBOL_NOT_FOUND | Stock/crypto symbol not found in specified market |
| 422 | NO_DATA | Requested data not found |
| 422 | VALIDATION_ERROR | Request validation failed; callback_url accepts only a publicly reachable HTTPS URL |
| 503 | DATA_UNAVAILABLE | Data source temporarily unavailable, please retry later |
| 503 | DATA_SOURCE_UNAVAILABLE | The historical-market-data upstream is throttled or temporarily unavailable; retry after retry_after_seconds |
| 500 | INTERNAL_ERROR | Internal server error |
📢 Important Notice
We will notify you in advance of any significant changes to this policy. Continued use of our services indicates your acceptance of the updated policy.
