External Integration
API Integration Guide
External systems can use the WEMS Investment News API to read published articles, market assets, candlesticks, and analytics. Every data endpoint except /status requires X-Api-Key.
Base URLhttps://news.sun-bd.com/api/public/v1
Auth HeaderX-Api-Key
ResponseJSON envelope
Versionv1
Quick Start
/status can be called without a key for health checks. Production data endpoints require an issued API key.
curl -sS "https://news.sun-bd.com/api/public/v1/status"
curl -sS "https://news.sun-bd.com/api/public/v1/catalog" \
-H "X-Api-Key: YOUR_API_KEY"
Standard Response Envelope
Successful and failed responses use the same envelope to simplify error handling, tracing, and retries.
{
"success": true,
"data": {},
"error": null,
"timestamp": "2026-05-30T12:00:00Z",
"traceId": null
}
Endpoints
| Method | Path | Purpose | Key |
|---|---|---|---|
| GET | /status | Health and API status check | No |
| GET | /catalog | Available endpoints and parameter descriptions | Yes |
| GET | /articles | Published articles with page, page_size, category, and keyword | Yes |
| GET | /articles/{id} | Single article content, summary, tags, and publish metadata | Yes |
| GET | /market/assets | Market assets, optionally filtered by category | Yes |
| GET | /market/candles | Candlestick data using asset_id, interval, and days | Yes |
| GET | /analytics/overview | Article, view, share, and push overview metrics | Yes |
Examples
curl -sS "https://news.sun-bd.com/api/public/v1/articles?page=1&page_size=20&category=market" \
-H "X-Api-Key: YOUR_API_KEY"
curl -sS "https://news.sun-bd.com/api/public/v1/market/assets?category=crypto" \
-H "X-Api-Key: YOUR_API_KEY"
const response = await fetch("https://news.sun-bd.com/api/public/v1/articles", {
headers: { "X-Api-Key": process.env.WEMS_NEWS_API_KEY }
})
const body = await response.json()
Error Handling
401: Missing or invalidX-Api-Key.404: The requested article does not exist or is not published.503: The external API is disabled or temporarily unavailable.
Member Login API
Member login, logout, token refresh, and permissions are not handled by this project API. Use the centralized member API documentation.