Agent API
Generate one no-trade market/signal chart PNG
Renders a single market chart with technical indicators (including the vegas profile) and optional signal annotations, without requiring paired trade records. source=auto or source=binance resolve the symbol against the local Binance instrument allowlist and fetch candles server-side; source=csv is fully deterministic using caller-supplied klineCsv candles. Costs 1 chart against the monthly quota.
post/api/agents/market-chart
Request
- Base URL: https://klinepic.com
- URL: https://klinepic.com/api/agents/market-chart
- Auth: one of:
- HTTP bearer
- API key in header X-KLine-Agent-Key
Headers
X-Agent-Request-Idstring
Stable client request id for idempotency and support lookup.
Request body
Example request
{
"chart": {
"symbol": "BTCUSDT",
"market": "crypto",
"period": "1h",
"source": "auto",
"klineCsv": "symbol,time,open,high,low,close,volume\nBTCUSDT,2024-01-02T12:00:00.000Z,42310,42450,42180,42210,1080",
"indicatorProfile": "vegas",
"signals": [
{
"label": "回踩获撑 +2.7%"
}
],
"timezone": "America/New_York",
"markerLabelTemplate": "{label} {price} x{quantity}",
"themeOverrides": {
"background": "#10b981",
"grid": "#10b981",
"axis": "#10b981",
"candleUp": "#10b981",
"candleDown": "#10b981",
"candleLimitUp": "#10b981",
"candleLimitDown": "#10b981",
"ma": [
"#10b981"
],
"ema": [
"#10b981"
],
"boll": {
"middle": "#10b981",
"upper": "#10b981",
"lower": "#10b981"
},
"vwap": "#10b981",
"macd": {
"dif": "#10b981",
"dea": "#10b981",
"histogramUp": "#10b981",
"histogramDown": "#10b981"
},
"kdj": {
"k": "#10b981",
"d": "#10b981",
"j": "#10b981"
},
"rsi": "#10b981",
"atr": "#10b981",
"volume": {
"up": "#10b981",
"down": "#10b981",
"ma": [
"#10b981"
]
},
"annotations": {
"buyMarker": "#10b981",
"sellMarker": "#10b981",
"buyPriceLine": "#10b981",
"sellPriceLine": "#10b981",
"holdingBg": "#10b981",
"maxProfit": "#10b981",
"drawdown": "#10b981",
"dividend": "#10b981"
},
"infoPanel": {
"bg": "#10b981",
"border": "#10b981",
"text": "#10b981",
"label": "#10b981",
"valuePositive": "#10b981",
"valueNegative": "#10b981",
"accentCyan": "#10b981",
"accentRed": "#10b981",
"accentPurple": "#10b981"
},
"watermark": "#10b981"
},
"output": {
"timezone": "America/New_York",
"markerLabelTemplate": "{label} {price} x{quantity}",
"themeOverrides": {
"background": "#10b981",
"grid": "#10b981",
"axis": "#10b981",
"candleUp": "#10b981",
"candleDown": "#10b981",
"candleLimitUp": "#10b981",
"candleLimitDown": "#10b981",
"ma": [
"#10b981"
],
"ema": [
"#10b981"
],
"boll": {
"middle": "#10b981",
"upper": "#10b981",
"lower": "#10b981"
},
"vwap": "#10b981",
"macd": {
"dif": "#10b981",
"dea": "#10b981",
"histogramUp": "#10b981",
"histogramDown": "#10b981"
},
"kdj": {
"k": "#10b981",
"d": "#10b981",
"j": "#10b981"
},
"rsi": "#10b981",
"atr": "#10b981",
"volume": {
"up": "#10b981",
"down": "#10b981",
"ma": [
"#10b981"
]
},
"annotations": {
"buyMarker": "#10b981",
"sellMarker": "#10b981",
"buyPriceLine": "#10b981",
"sellPriceLine": "#10b981",
"holdingBg": "#10b981",
"maxProfit": "#10b981",
"drawdown": "#10b981",
"dividend": "#10b981"
},
"infoPanel": {
"bg": "#10b981",
"border": "#10b981",
"text": "#10b981",
"label": "#10b981",
"valuePositive": "#10b981",
"valueNegative": "#10b981",
"accentCyan": "#10b981",
"accentRed": "#10b981",
"accentPurple": "#10b981"
},
"watermark": "#10b981"
}
}
}
}Response
JSON chart payload or raw image bytes when responseFormat is png, jpeg, or webp.
object required
Changes
No recorded changes to this operation across all 1 revision of this API.