Render a candlestick chart image for a perpetual market from OHLC candles plus header/footer metadata and optional overlay lines (stop-loss, take-profit, liquidation). The candle shape is identical to the /2/perp/ohlcv-history response, so its output can be passed straight in.
Send OHLC candles together with the header and footer blocks shown around the chart, and the rendered chart is returned in data. This is a synchronous proxy: one request in, one rendered chart out — nothing is stored.
Candles use the same t / o / h / l / c shape as GET /2/perp/ohlcv-history — feed that endpoint’s output directly. t is UNIX milliseconds, and priceChange is a percentage (e.g. -6.31 means -6.31%).
Body
application/json
candles
object[]
required
OHLC series, oldest-to-newest by t. Same shape as the /2/perp/ohlcv-history response, so its output can be passed in directly. Must contain at least one candle.
Minimum array length: 1
Show child attributes
width
integer
required
Output image width in pixels. Positive integer.
height
integer
required
Output image height in pixels. Positive integer.
name
string
required
Chart title / pair label shown on the chart (e.g. FLUID/USD).
headerData
object
required
Header block shown above the chart.
Show child attributes
footerData
object
required
Footer block shown below the chart.
Show child attributes
lines
object
Optional horizontal overlay lines. Each level is independently optional — send only the ones you have.
Show child attributes
Response
Rendered chart
data
string
required
The rendered chart returned by the renderer, passed through verbatim. Treat as an opaque string payload.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Mobula API","colors":{"primary":"#5C7DF9","light":"#5C7DF9","dark":"#000000"},"logo":{"light":"https://mintcdn.com/mobulalabs/i4_lXsPzQR8eheLT/images/logo/light-logo.svg?fit=max\u0026auto=format\u0026n=i4_lXsPzQR8eheLT\u0026q=85\u0026s=f5099f8a6b3dd6665a32fe40d9288d81","dark":"https://mintcdn.com/mobulalabs/i4_lXsPzQR8eheLT/images/logo/dark-logo.svg?fit=max\u0026auto=format\u0026n=i4_lXsPzQR8eheLT\u0026q=85\u0026s=b1e6703d769cfe27914c2db40b46b332"},"favicon":"https://mintlify.s3.us-west-1.amazonaws.com/mobulalabs/favicon.png","api":{"openapi":["rest-api-reference/openapi.yaml"],"asyncapi":["asyncapi.yaml"]},"background":{"color":{"light":"#f5f5f5","dark":"#111524"}},"navbar":{"links":[{"href":"https://admin.mobula.io","label":"Generate free API key"}],"primary":{"type":"button","label":"Dashboard","href":"https://admin.mobula.io"}},"footer":{"socials":{"twitter":"https://x.com/mobulaio","telegram":"https://t.me/mobuladevelopers"}},"integrations":{"mixpanel":{"projectToken":"792afbf66aa630430016bdbd59c52ba7"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"mobulalabs","hasAudioNarration":false,"actualSubdomain":"mobulalabs","customDomains":["docs.mobula.io"],"gitSource":{"type":"github","owner":"fomo-family","repo":"mobula-monorepo","deployBranch":"dev","contentDirectory":"docs/mobula-api-docs","isPrivate":true,"mountPath":"","label":"","_id":"6b10a22c9ffae5051c3f8beb"},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6b06f5c9c90834d233c7c690","clientVersion":"0.0.4458","searchFilterCounts":[{"language":"default","tag":"Changelog","count":105},{"language":"default","tag":"2026","count":103},{"language":"default","tag":"Chains","count":97},{"language":"default","tag":"Supported Chains","count":96},{"language":"default","tag":"Overview","count":80},{"language":"default","tag":"Data","count":70},{"language":"default","tag":"Guides","count":67},{"language":"default","tag":"Spot","count":51},{"language":"default","tag":"Streams","count":46},{"language":"default","tag":"Perps","count":26}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false,"authValue":{"auth":{}}},"customCss":[{"filePath":"custom.css","content":"img[src*=\"util-badge\"]{width:32px;height:16px;min-width:32px;min-height:16px}"}]}
{"page":{"pagePath":"rest-api-reference/endpoint/perp-chart-image","slug":"/rest-api-reference/endpoint/perp-chart-image","pageMetadata":{"public":true,"title":"Generate Perp Chart Image","openapi":"POST /2/perp/chart","description":"Render a candlestick chart image for a perpetual market from OHLC candles plus header/footer metadata and optional overlay lines (stop-loss, take-profit, liquidation). The candle shape is identical to the /2/perp/ohlcv-history response, so its output can be passed straight in.","href":"/rest-api-reference/endpoint/perp-chart-image"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Render a candlestick chart image for a perpetual market from OHLC candles plus header/footer metadata and optional overlay lines (stop-loss, take-profit, liquidation). The candle shape is identical to the /2/perp/ohlcv-history response, so its output can be passed straight in.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,strong:`strong`,..._provideComponents(),...props.components},{Tip}=_components;if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Send OHLC candles together with the header and footer blocks shown around the chart, and the rendered chart is returned in `,_jsx(_components.code,{children:`data`}),`. This is a synchronous proxy: one request in, one rendered chart out — nothing is stored.`]}),`\n`,_jsxs(Tip,{children:[`Candles use the same `,_jsx(_components.code,{children:`t / o / h / l / c`}),` shape as `,_jsx(_components.a,{href:`/rest-api-reference/endpoint/perp-chart`,children:_jsx(_components.code,{children:`GET /2/perp/ohlcv-history`})}),` — feed that endpoint’s output directly. `,_jsx(_components.code,{children:`t`}),` is UNIX `,_jsx(_components.strong,{children:`milliseconds`}),`, and `,_jsx(_components.code,{children:`priceChange`}),` is a percentage (e.g. `,_jsx(_components.code,{children:`-6.31`}),` means `,_jsx(_components.code,{children:`-6.31%`}),`).`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"public":true,"title":"Generate Perp Chart Image","openapi":"POST /2/perp/chart","description":"Render a candlestick chart image for a perpetual market from OHLC candles plus header/footer metadata and optional overlay lines (stop-loss, take-profit, liquidation). The candle shape is identical to the /2/perp/ohlcv-history response, so its output can be passed straight in.","href":"/rest-api-reference/endpoint/perp-chart-image"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["V2 - Perps"],"summary":"Generate perp chart image","description":"Render a candlestick chart image for a perpetual market from OHLC candles plus header/footer metadata and optional overlay lines (stop-loss, take-profit, liquidation). The candle shape is identical to the /2/perp/ohlcv-history response, so its output can be passed straight in.","requestBody":"5c5675e3-dd7d-4c85-bf39-a18e37e867f6","responses":{"200":"961b6624-8755-40bf-934c-5c39f7cfc2fc","400":"f91a38b3-718f-494a-a46d-40cc7f0ff3c7","500":"dcbdb1a2-fcdd-4e96-83f6-3cf2413cd7f6","502":"7e5a2093-53bc-4acf-8591-40fdb504dcf2"},"method":"post","type":"path","servers":["c25b9009-8f4e-492f-b743-eb62a864816a","34680ce8-88e4-4b86-942f-2cc9fb5ef9e7"],"security":[],"path":"/2/perp/chart","baseUrlOptions":["https://demo-api.mobula.io/api/","https://api.mobula.io/api/"],"title":"Generate perp chart image","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["candles","width","height","name","headerData","footerData"],"properties":{"candles":{"type":"array","description":"OHLC series, oldest-to-newest by `t`. Same shape as the /2/perp/ohlcv-history response, so its output can be passed in directly. Must contain at least one candle.","minItems":1,"items":{"type":"object","required":["t","o","h","l","c"],"properties":{"t":{"type":"number","description":"Candle open time, UNIX epoch in milliseconds.","isRequired":true,"uniqueKey":"candles.items.[INDEX].t","typeLabel":"number"},"o":{"type":"number","description":"Opening price.","isRequired":true,"uniqueKey":"candles.items.[INDEX].o","typeLabel":"number"},"h":{"type":"number","description":"Highest price in the interval.","isRequired":true,"uniqueKey":"candles.items.[INDEX].h","typeLabel":"number"},"l":{"type":"number","description":"Lowest price in the interval.","isRequired":true,"uniqueKey":"candles.items.[INDEX].l","typeLabel":"number"},"c":{"type":"number","description":"Closing price.","isRequired":true,"uniqueKey":"candles.items.[INDEX].c","typeLabel":"number"}},"uniqueKey":"candles.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"candles","typeLabel":"object[]"},"width":{"type":"integer","description":"Output image width in pixels. Positive integer.","isRequired":true,"uniqueKey":"width","typeLabel":"integer"},"height":{"type":"integer","description":"Output image height in pixels. Positive integer.","isRequired":true,"uniqueKey":"height","typeLabel":"integer"},"name":{"type":"string","description":"Chart title / pair label shown on the chart (e.g. FLUID/USD).","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"headerData":{"type":"object","description":"Header block shown above the chart.","required":["pair","leverage","currentPrice","priceChange","openInterestL","openInterestS","holdingL","holdingS"],"properties":{"pair":{"type":"string","description":"Trading pair label (e.g. FLUID/USD).","isRequired":true,"uniqueKey":"headerData.pair","typeLabel":"string"},"leverage":{"type":"number","description":"Position leverage multiplier.","isRequired":true,"uniqueKey":"headerData.leverage","typeLabel":"number"},"currentPrice":{"type":"number","description":"Current mark/last price.","isRequired":true,"uniqueKey":"headerData.currentPrice","typeLabel":"number"},"priceChange":{"type":"number","description":"Price change for the displayed window, as a percentage (may be negative).","isRequired":true,"uniqueKey":"headerData.priceChange","typeLabel":"number"},"openInterestL":{"type":"object","description":"Long-side open interest.","required":["value","total"],"properties":{"value":{"type":"number","description":"Filled/used portion.","isRequired":true,"uniqueKey":"headerData.openInterestL.value","typeLabel":"number"},"total":{"type":"number","description":"Total capacity.","isRequired":true,"uniqueKey":"headerData.openInterestL.total","typeLabel":"number"}},"isRequired":true,"uniqueKey":"headerData.openInterestL","typeLabel":"object"},"openInterestS":{"type":"object","description":"Short-side open interest.","required":["value","total"],"properties":{"value":{"type":"number","description":"Filled/used portion.","isRequired":true,"uniqueKey":"headerData.openInterestS.value","typeLabel":"number"},"total":{"type":"number","description":"Total capacity.","isRequired":true,"uniqueKey":"headerData.openInterestS.total","typeLabel":"number"}},"isRequired":true,"uniqueKey":"headerData.openInterestS","typeLabel":"object"},"holdingL":{"type":"number","description":"Long holding amount.","isRequired":true,"uniqueKey":"headerData.holdingL","typeLabel":"number"},"holdingS":{"type":"number","description":"Short holding amount.","isRequired":true,"uniqueKey":"headerData.holdingS","typeLabel":"number"}},"isRequired":true,"uniqueKey":"headerData","typeLabel":"object"},"footerData":{"type":"object","description":"Footer block shown below the chart.","required":["high24h","low24h","volume24h"],"properties":{"high24h":{"type":"number","description":"24-hour high price.","isRequired":true,"uniqueKey":"footerData.high24h","typeLabel":"number"},"low24h":{"type":"number","description":"24-hour low price.","isRequired":true,"uniqueKey":"footerData.low24h","typeLabel":"number"},"volume24h":{"type":"number","description":"24-hour traded volume.","isRequired":true,"uniqueKey":"footerData.volume24h","typeLabel":"number"}},"isRequired":true,"uniqueKey":"footerData","typeLabel":"object"},"lines":{"type":"object","description":"Optional horizontal overlay lines. Each level is independently optional — send only the ones you have.","properties":{"stopLoss":{"type":"number","description":"Stop-loss price level.","uniqueKey":"lines.stopLoss","typeLabel":"number"},"takeProfit":{"type":"number","description":"Take-profit price level.","uniqueKey":"lines.takeProfit","typeLabel":"number"},"liquidation":{"type":"number","description":"Liquidation price level.","uniqueKey":"lines.liquidation","typeLabel":"number"}},"uniqueKey":"lines","typeLabel":"object"}},"example":{"candles":[{"t":1780860000000,"o":1.0615964,"h":1.0656162,"l":1.0506006,"c":1.0605862},{"t":1780861800000,"o":1.0605862,"h":1.0655736,"l":1.0525683,"c":1.0630746},{"t":1780863600000,"o":1.0630746,"h":1.0695774,"l":1.0630746,"c":1.0655949}],"width":1024,"height":850,"name":"FLUID/USD","lines":{"stopLoss":1.2876838333333334,"takeProfit":0.7358193333333334,"liquidation":1.4231453021582852},"headerData":{"pair":"FLUID/USD","leverage":3,"currentPrice":1.103729,"priceChange":-6.305772495755514,"openInterestL":{"value":0,"total":250000},"openInterestS":{"value":30.000026,"total":249969.999974},"holdingL":0.00251711712,"holdingS":0.00251711712},"footerData":{"high24h":1.2151002,"low24h":1.0799406,"volume24h":2001.2866550754236}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"candles":[{"t":1780860000000,"o":1.0615964,"h":1.0656162,"l":1.0506006,"c":1.0605862},{"t":1780861800000,"o":1.0605862,"h":1.0655736,"l":1.0525683,"c":1.0630746},{"t":1780863600000,"o":1.0630746,"h":1.0695774,"l":1.0630746,"c":1.0655949}],"width":1024,"height":850,"name":"FLUID/USD","lines":{"stopLoss":1.2876838333333334,"takeProfit":0.7358193333333334,"liquidation":1.4231453021582852},"headerData":{"pair":"FLUID/USD","leverage":3,"currentPrice":1.103729,"priceChange":-6.305772495755514,"openInterestL":{"value":0,"total":250000},"openInterestS":{"value":30.000026,"total":249969.999974},"holdingL":0.00251711712,"holdingS":0.00251711712},"footerData":{"high24h":1.2151002,"low24h":1.0799406,"volume24h":2001.2866550754236}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"961b6624-8755-40bf-934c-5c39f7cfc2fc":{"description":"Rendered chart","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"string","description":"The rendered chart returned by the renderer, passed through verbatim. Treat as an opaque string payload.","isRequired":true,"uniqueKey":"data","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"data":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"f91a38b3-718f-494a-a46d-40cc7f0ff3c7":{"description":"Request body failed validation (missing/invalid fields, empty candles, wrong candle keys).","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"dcbdb1a2-fcdd-4e96-83f6-3cf2413cd7f6":{"description":"Unexpected internal error.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"7e5a2093-53bc-4acf-8591-40fdb504dcf2":{"description":"Upstream chart generator failed or was unreachable.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{},"servers":{"c25b9009-8f4e-492f-b743-eb62a864816a":{"url":"https://demo-api.mobula.io/api/","description":"Demo API (rate limited, for testing only)"},"34680ce8-88e4-4b86-942f-2cc9fb5ef9e7":{"url":"https://api.mobula.io/api/","description":"Production API (requires API key)"}}},"originalFileLocation":"rest-api-reference/openapi.yaml"},"subdomain":"docs.mobula.io","siteName":"Mobula API","title":"Generate Perp Chart Image - Mobula API","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-29T17:34:06.747Z","originalFileLocation":"rest-api-reference/endpoint/perp-chart-image.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Render a candlestick chart image for a perpetual market from OHLC candles plus header/footer metadata and optional overlay lines (stop-loss, take-profit, liquidation). The candle shape is identical to the /2/perp/ohlcv-history response, so its output can be passed straight in.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Mobula API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/mobulalabs/HNvOu2NIIIAI8gec/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/mobulalabs/HNvOu2NIIIAI8gec/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/mobulalabs/HNvOu2NIIIAI8gec/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/mobulalabs/HNvOu2NIIIAI8gec/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/mobulalabs/HNvOu2NIIIAI8gec/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/mobulalabs/HNvOu2NIIIAI8gec/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/mobulalabs/HNvOu2NIIIAI8gec/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/mobulalabs/HNvOu2NIIIAI8gec/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/mobulalabs/HNvOu2NIIIAI8gec/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generate Perp Chart Image - Mobula API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Render a candlestick chart image for a perpetual market from OHLC candles plus header/footer metadata and optional overlay lines (stop-loss, take-profit, liquidation). The candle shape is identical to the /2/perp/ohlcv-history response, so its output can be passed straight in.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Mobula API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.mobula.io/rest-api-reference/endpoint/perp-chart-image\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://mobulalabs.mintlify.io/_mintlify/api/og/v2?division=Perps+Data\u0026amp;title=Generate+Perp+Chart+Image\u0026amp;description=Render+a+candlestick+chart+image+for+a+perpetual+market+from+OHLC+candles+plus+header%2Ffooter+metadata+and+optional+overlay+lines+%28stop-loss%2C+take-profit%2C+liquid\u0026amp;theme=b31399aac8a2a0583f71b753\u0026amp;signature=0f6ff4357eba5768fdfc3d616046f5080b111365a9629eb9860c3cb739165015\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Generate Perp Chart Image - Mobula API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Render a candlestick chart image for a perpetual market from OHLC candles plus header/footer metadata and optional overlay lines (stop-loss, take-profit, liquidation). The candle shape is identical to the /2/perp/ohlcv-history response, so its output can be passed straight in.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://mobulalabs.mintlify.io/_mintlify/api/og/v2?division=Perps+Data\u0026amp;title=Generate+Perp+Chart+Image\u0026amp;description=Render+a+candlestick+chart+image+for+a+perpetual+market+from+OHLC+candles+plus+header%2Ffooter+metadata+and+optional+overlay+lines+%28stop-loss%2C+take-profit%2C+liquid\u0026amp;theme=b31399aac8a2a0583f71b753\u0026amp;signature=0f6ff4357eba5768fdfc3d616046f5080b111365a9629eb9860c3cb739165015\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/mobulalabs/HNvOu2NIIIAI8gec/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Mobula API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5C7DF9\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.mobula.io/rest-api-reference/endpoint/perp-chart-image\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/rest-api-reference/endpoint/perp-chart-image.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.mobula.io/#organization\",\"name\":\"Mobula API\",\"url\":\"https://docs.mobula.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/mobulalabs/i4_lXsPzQR8eheLT/images/logo/light-logo.svg?fit=max\u0026auto=format\u0026n=i4_lXsPzQR8eheLT\u0026q=85\u0026s=f5099f8a6b3dd6665a32fe40d9288d81\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.mobula.io#website\",\"name\":\"Mobula API\",\"url\":\"https://docs.mobula.io\",\"publisher\":{\"@id\":\"https://docs.mobula.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.mobula.io/rest-api-reference/endpoint/perp-chart-image#webpage\",\"url\":\"https://docs.mobula.io/rest-api-reference/endpoint/perp-chart-image\",\"name\":\"Generate Perp Chart Image\",\"description\":\"Render a candlestick chart image for a perpetual market from OHLC candles plus header/footer metadata and optional overlay lines (stop-loss, take-profit, liquidation). The candle shape is identical to the /2/perp/ohlcv-history response, so its output can be passed straight in.\",\"dateModified\":\"2026-09-29T17:34:06.747Z\",\"isPartOf\":{\"@id\":\"https://docs.mobula.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.mobula.io/rest-api-reference/endpoint/perp-chart-image#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.mobula.io/rest-api-reference/endpoint/perp-chart-image#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Perps Data\",\"item\":\"https://docs.mobula.io/rest-api-reference/endpoint/perp-pairs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generate Perp Chart Image\",\"item\":\"https://docs.mobula.io/rest-api-reference/endpoint/perp-chart-image\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.mobula.io/rest-api-reference/endpoint/perp-chart-image#apireference\",\"headline\":\"Generate Perp Chart Image\",\"name\":\"Generate Perp Chart Image\",\"description\":\"Render a candlestick chart image for a perpetual market from OHLC candles plus header/footer metadata and optional overlay lines (stop-loss, take-profit, liquidation). The candle shape is identical to the /2/perp/ohlcv-history response, so its output can be passed straight in.\",\"url\":\"https://docs.mobula.io/rest-api-reference/endpoint/perp-chart-image\",\"mainEntityOfPage\":{\"@id\":\"https://docs.mobula.io/rest-api-reference/endpoint/perp-chart-image#webpage\"},\"dateModified\":\"2026-09-29T17:34:06.747Z\",\"publisher\":{\"@id\":\"https://docs.mobula.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.mobula.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Mobula API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Mobula API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/rest-api-reference/endpoint/perp-chart-image.md","siteName":"Mobula API","nav":{"global":null,"tabs":[{"tab":"Overview","pages":[{"title":"Overview","href":"/introduction"}]},{"tab":"Data","groups":[{"group":"Introduction","pages":[{"title":"Data APIs","icon":"database","href":"/data-introduction"},{"title":"Benchmarks","icon":"gauge-high","href":"/data/benchmarks"}]},{"group":"Market \u0026 Token Data","pages":[{"title":"Get Token Markets","openapi":"get /2/token/markets","href":"/rest-api-reference/endpoint/token-markets"},{"title":"Get Market Details","openapi":"get /2/market/details","href":"/rest-api-reference/endpoint/market-details"},{"title":"Get Market Lighthouse","openapi":"get /2/market/lighthouse","href":"/rest-api-reference/endpoint/market-lighthouse"},{"title":"Get Asset Details","openapi":"get /2/asset/details","href":"/rest-api-reference/endpoint/asset-details"},{"title":"Get Token Details","openapi":"get /2/token/details","href":"/rest-api-reference/endpoint/token-details"},{"title":"Get Token ATH/ATL","openapi":"get /2/token/ath","href":"/rest-api-reference/endpoint/token-ath"},{"title":"Get Token Price","openapi":"get /2/token/price","href":"/rest-api-reference/endpoint/token-price"},{"title":"Get Token Price (Batch)","openapi":"post /2/token/price","href":"/rest-api-reference/endpoint/token-price-post"},{"title":"Get Token Price Snapshot","openapi":"get /2/token/price-at","href":"/rest-api-reference/endpoint/token-price-at"},{"title":"Get Token Price Snapshot (batch)","openapi":"post /2/token/price-at","href":"/rest-api-reference/endpoint/token-price-at-post"},{"title":"Get Token Security","openapi":"get /2/token/security","href":"/rest-api-reference/endpoint/token-security-get"},{"title":"Get Token Logo Reuses","openapi":"get /2/token/logo-reuses","href":"/rest-api-reference/endpoint/token-logo-reuses"}]},{"group":"History - Prices \u0026 OHLCV Candles","pages":[{"title":"Get Asset Price History","openapi":"get /2/asset/price-history","href":"/rest-api-reference/endpoint/asset-price-history"},{"title":"Get Token Price History","openapi":"get /2/token/price-history","href":"/rest-api-reference/endpoint/token-price-history"},{"title":"Get Market OHLCV History","openapi":"get /2/market/ohlcv-history","href":"/rest-api-reference/endpoint/market-ohlcv-history"},{"title":"Get Token OHLCV History","openapi":"get /2/token/ohlcv-history","href":"/rest-api-reference/endpoint/token-ohlcv-history"}]},{"group":"Trades Data","pages":[{"title":"Get Token Trades","openapi":"get /2/token/trades","href":"/rest-api-reference/endpoint/token-trades"},{"title":"Get Enriched Token Trades","openapi":"get /2/token/trades-enriched","href":"/rest-api-reference/endpoint/token-trades-enriched"},{"title":"Get Token Trade by Transaction","openapi":"get /2/token/trade","href":"/rest-api-reference/endpoint/token-trade"},{"title":"Get Token Dev History","openapi":"get /2/token/dev-history","href":"/rest-api-reference/endpoint/token-dev-history"},{"title":"Batch Download Trades","openapi":"get /2/trades/filters","href":"/rest-api-reference/endpoint/trades-filters"},{"title":"Get Pair Trades","openapi":"get /1/market/trades/pair","href":"/rest-api-reference/endpoint/market-trades-pair"}]},{"group":"Holders Data","pages":[{"title":"Get Top Token Trader Positions","openapi":"get /2/token/trader-positions","href":"/rest-api-reference/endpoint/token-trader-positions"},{"title":"Get Token Holder Positions","openapi":"get /2/token/holder-positions","href":"/rest-api-reference/endpoint/token-holder-positions"}]},{"group":"Pulse API","pages":[{"title":"Get Pulse - POST Method","openapi":"post /2/pulse","href":"/rest-api-reference/endpoint/pulse-post"}]},{"group":"Wallet APIs","pages":[{"title":"Get NFTs Holdings","openapi":"get /1/wallet/nfts","href":"/rest-api-reference/endpoint/wallet-nfts"},{"title":"Get Historical Net Worth","openapi":"get /1/wallet/history","href":"/rest-api-reference/endpoint/wallet-history"},{"title":"Get Wallet Holdings","openapi":"get /2/wallet/holdings","href":"/rest-api-reference/endpoint/wallet-holdings"},{"title":"Get Crypto Holdings","openapi":"get /1/wallet/portfolio","href":"/rest-api-reference/endpoint/wallet-portfolio"},{"title":"Get Wallet DeFi Positions","openapi":"get /2/wallet/defi-positions","href":"/rest-api-reference/endpoint/wallet-defi-positions"},{"title":"Get Wallet Trades","openapi":"get /2/wallet/trades","href":"/rest-api-reference/endpoint/wallet-trades-v2"},{"title":"Get Wallet Deployer Tokens","openapi":"get /2/wallet/deployer","href":"/rest-api-reference/endpoint/wallet-deployer"},{"title":"Get Wallet Activity","openapi":"get /2/wallet/activity","href":"/rest-api-reference/endpoint/wallet-activity"},{"title":"Get Wallet Labels","openapi":"get /2/wallet/labels","href":"/rest-api-reference/endpoint/wallet-labels-get"},{"title":"Search Wallet Labels","openapi":"get /2/wallet/labels/search","href":"/rest-api-reference/endpoint/wallet-labels-search"},{"openapi":"get /1/token/first-buyers","title":"Get first buyers for a token","href":"/rest-api-reference/endpoint/wallet-first-buyers"},{"title":"Get Wallet Positions with PnL","openapi":"get /2/wallet/positions","href":"/rest-api-reference/endpoint/wallet-positions"},{"title":"Get Wallet Position with PnL","openapi":"get /2/wallet/position","href":"/rest-api-reference/endpoint/wallet-position"},{"title":"Get Wallet Positions History","openapi":"get /2/wallet/positions-history","href":"/rest-api-reference/endpoint/wallet-positions-history"},{"title":"Get Wallet Position History","openapi":"get /2/wallet/position-history","href":"/rest-api-reference/endpoint/wallet-position-history"},{"title":"Get Wallet Trading Analysis","openapi":"get /2/wallet/analysis","href":"/rest-api-reference/endpoint/wallet-analysis"},{"title":"Get Wallet Funding Source","openapi":"get /2/wallet/funding","href":"/rest-api-reference/endpoint/wallet-funding"}]},{"group":"Usage Data","pages":[{"title":"Get API \u0026 WebSocket Usage","openapi":"get /2/usage","href":"/rest-api-reference/endpoint/usage"}]},{"group":"Internal","pages":[{"title":"Wallet Backfill Status (Internal)","openapi":"get /internal/wallet-backfill/status/{wallet}","href":"/rest-api-reference/endpoint/internal-wallet-backfill-status"}]},{"group":"Metacore","pages":[{"title":"Get All Cryptocurrencies","openapi":"get /1/all","href":"/rest-api-reference/endpoint/all"},{"title":"Universal Search","openapi":"get /2/fast-search","href":"/rest-api-reference/endpoint/fast-search"},{"title":"Universal Search - POST Method","openapi":"post /2/fast-search","href":"/rest-api-reference/endpoint/fast-search-post"},{"title":"Get Metadata","openapi":"get /1/metadata","href":"/rest-api-reference/endpoint/metadata"},{"title":"Get Metadata (batch)","openapi":"get /1/multi-metadata","href":"/rest-api-reference/endpoint/multi-metadata"},{"title":"Get All Categories","openapi":"get /1/metadata/categories","href":"/rest-api-reference/endpoint/metadata-categories"},{"title":"Get All Blockchains","openapi":"get /1/blockchains","href":"/rest-api-reference/endpoint/blockchains"},{"title":"Get System Metadata","openapi":"get /2/system-metadata","href":"/rest-api-reference/endpoint/system-metadata"}]},{"group":"Webhook","pages":[{"title":"Get Webhook Subscription","openapi":"get /1/webhook","href":"/rest-api-reference/endpoint/webhook-subscriptions"},{"title":"Delete Webhook Subscription","openapi":"delete /1/webhook","href":"/rest-api-reference/endpoint/webhook-removal"}]},{"group":"Perps Data","pages":[{"title":"Get Perp Pairs","openapi":"GET /2/perp/pairs","href":"/rest-api-reference/endpoint/perp-pairs"},{"title":"Get Perp Positions","openapi":"GET /2/wallet/positions/perp/open","href":"/rest-api-reference/endpoint/wallet-perp-positions"},{"title":"Get Perp Unfilled Orders","openapi":"GET /2/wallet/positions/perp/unfilled","href":"/rest-api-reference/endpoint/wallet-perp-orders"},{"title":"Get Funding Rate","openapi":"get /1/market/cefi/funding-rate","href":"/rest-api-reference/endpoint/market-cefi-funding-rate"},{"title":"Get Perp OHLCV History","openapi":"GET /2/perp/ohlcv-history","description":"Fetch OHLC candles for a perpetual market from a supported DEX (Gains Network, Lighter), normalized to the same shape as spot OHLCV endpoints.","href":"/rest-api-reference/endpoint/perp-chart"},{"public":true,"title":"Generate Perp Chart Image","openapi":"POST /2/perp/chart","href":"/rest-api-reference/endpoint/perp-chart-image"}]},{"group":"Misc","pages":[{"title":"Get Sparkline","openapi":"get /1/market/sparkline","description":"Retrieves the 24-hour sparkline chart for a given asset. The sparkline is returned as an SVG image by default. You can request a PNG version by adding the query parameter png=true.","href":"/rest-api-reference/endpoint/sparklines"}]}]},{"tab":"Streams","pages":[{"title":"Streams","href":"/indexing-stream/stream-introduction"}]},{"tab":"Spot","pages":[{"title":"Spot","href":"/spot-introduction"}]},{"tab":"Perps","pages":[{"title":"Perps","href":"/perps-introduction"}]},{"tab":"Chains","pages":[{"title":"Chains","href":"/blockchains/intro-blockchains"}]},{"tab":"Cookbooks","pages":[{"title":"Cookbooks","href":"/cookbooks/introduction"}]},{"tab":"Almanac","pages":[{"title":"Almanac","href":"/almanac/understanding-trade-fees"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/introduction"}]}]},"basePath":"","title":"Generate Perp Chart Image - Mobula API","deploymentId":"dpl_V5ZijtzBpBDTtCHhmhYNBBSNuEpK","buildId":"dpl_V5ZijtzBpBDTtCHhmhYNBBSNuEpK","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-PVYlaGkd.js","snippetPresets-uth-UMr3.js","utils-xsjjWc0J.js","style-to-object-BY3JEAdk.js","utils-BChg2jM1.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-c9w2P5Uz.js","conditional-requirements-CFM0id0Q.js","cloneDeep-DuJSqivX.js","_Uint8Array-DTdbAM5T.js","isObject-FP1Yky1u.js","ApiExamples-BCnbny1h.js","usePlaygroundInputsStore-G1LvyfyV.js","shallow-SPe6MP7v.js","isEqual-Dhe8fXuY.js","CodeSnippets-GJTm43GS.js","CodeSnippet-DSgC5VAb.js","use-playground-group-access-CCr4-r8b.js","Page-C3iicGbl.js","api-description-markdown-LuGUj9ab.js","DynamicMarkdown-D2sKGtDY.js","SectionHeading-C5l0HUeN.js","MethodPill-GTFKeegc.js","getPastedJson-Dpu-JhQ1.js","Check2Icon-Bqx2XOl3.js","axios-CsQoIw0U.js","Markdown-BgCU9yuq.js","AssistantPageLink-CIHijU1m.js","dist-BR52b7Zr.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}