Keep your application synchronized with CoinGecko in real-time — no cron jobs or polling required. Listen to events like cg.coin.info.updated and react instantly to changes.
Automated Asset Updates
Update your UI when a token rebrands, changes ticker, or updates its logo.
Cross-Chain Monitoring
Detect when a project deploys on a new chain or migrates a contract address.
Risk & Compliance
Act immediately on critical alerts — malicious activity warnings or contract migration notices.
CoinGecko Webhooks (Beta) is available for paid plan customers (Basic plan & above).
Credit charge: 10 credits per event delivery. Retry attempts are not charged.
Maximum webhook endpoints: 1 on Basic plan, 5 on Analyst plan & above.
Enterprise clients who need higher limits — contact your Customer Success Manager.
CoinGecko Webhooks is a supplementary delivery mechanism for real-time notifications. Currently in beta — excluded from the SLA applicable to the CoinGecko API Platform.
Share Feedback
Help us improve Webhooks — share your suggestions and use cases.
Verify that incoming payloads are genuinely from CoinGecko by computing an HMAC SHA256 hash and comparing it to the x-cg-signature header.Signing string format:{timestamp}:{event_id}:{json_body}
The {json_body} must be the raw, unparsed request body — not a re-stringified JSON object.
If your framework auto-parses JSON before verification, the signature will fail.
Send Test Event — dispatches a mock cg.coin.info.updated payload. Use it to verify your server receives the request and responds with 2xx before going live.
Delivery Logs — view the latest 100 delivery attempts. Use these to identify if your endpoint is rejecting requests.
Each delivered webhook event consumes 10 credits. The cg.coin.info.updated event listens to all active coins on CoinGecko — volume fluctuates based on market activity and how frequently projects update their metadata.
Expected volume: up to 200 updates/day based on historical data.
If your server fails to respond with a 2xx status code, CoinGecko will retry with exponential backoff. Retry attempts are not charged.A webhook is automatically disabled under either condition:
Condition
Threshold
Single event backoff
14 failed retries over ~24 hours
Aggregate failure cap
300 failed retries across 12 hours
When a webhook is disabled, you’ll receive an email notification. To resume:
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"CoinGecko API","description":"CoinGecko API delivers real-time and historical cryptocurrency data — including prices, OHLCV, market cap, trading volume, NFT, and onchain DeFi data — for coins, tokens, pools, and exchanges via REST API, WebSocket, and Webhooks, with SDK and MCP server support for AI agents.","colors":{"primary":"#4BCC00"},"logo":{"light":"https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/logos/light.png?fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=1f65227bee805b1106ace22fb56fdad7","dark":"https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/logos/dark.png?fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=f5bfd88b8b98c4f45b6a1738bd7d8e44"},"favicon":"https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/favicon.svg?fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=dc80beb3d4dd50aa5194426cf30fbf25","api":{"asyncapi":"websocket/asyncapi.json","params":{"expanded":"all"},"optional":"expanded","playground":{"proxy":false},"examples":{"languages":["bash"]}},"navbar":{"links":[{"href":"https://www.coingecko.com/en/api/contact","label":"Contact Sales"},{"href":"https://status.coingecko.com","label":"Status"}],"primary":{"type":"button","label":"Get Free API Key","href":"https://www.coingecko.com/en/api/pricing"}},"footer":{"socials":{"github":"https://github.com/coingecko","x":"https://x.com/coingecko","linkedin":"https://www.linkedin.com/company/coingecko"}},"fonts":{"family":"Inter"},"styling":{"eyebrows":"breadcrumbs","latex":false},"integrations":{"ga4":{"measurementId":"G-JY6RVTQ2W8"}},"contextual":{"options":["copy","view","claude","chatgpt","download-spec"],"display":"header"},"navigation":{"global":{"anchors":[{"anchor":"CoinGecko API","icon":"https://mintlify.s3.us-west-1.amazonaws.com/coingecko/assets/logos/anchor.png","href":"https://www.coingecko.com/en/api"},{"anchor":"Enterprise","icon":"briefcase","href":"https://www.coingecko.com/en/api/enterprise"},{"anchor":"Case Studies","icon":"book-open-cover","href":"https://www.coingecko.com/en/api/case-studies"},{"anchor":"Newsletter","icon":"envelope","href":"https://newsletter.coingecko.com/landing/api_updates_subscribe"},{"anchor":"Feedback","icon":"message","href":"https://tally.so/r/kdQKeZ"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"coingecko","hasAudioNarration":false,"actualSubdomain":"coingecko","customDomains":["docs.coingecko.com"],"gitSource":{"type":"github","owner":"coingecko","repo":"docs-coingecko-api-mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"collectionId":"dbde5526-27b8-45d6-bbe2-03a349bb7471","liveDeploymentHistoryId":"6ae97e21bd9169b37160e11a","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae97e21bd9169b37160e11a"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae97e21bd9169b37160e11a","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"CoinGecko API","count":112},{"language":"default","tag":"Pro API Reference","count":106},{"language":"default","tag":"Demo API Reference","count":68},{"language":"default","tag":"Onchain API","count":58},{"language":"default","tag":"Overview","count":21},{"language":"default","tag":"Search \u0026 ID Map","count":16},{"language":"default","tag":"Coin Charts","count":15},{"language":"default","tag":"AI Integration","count":13},{"language":"default","tag":"Coins","count":13},{"language":"default","tag":"Pools","count":13}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@coingecko.com"}},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"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":"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":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","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":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","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":"workos-signup","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":"workos-enabled","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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[{"_id":"6a72b87a0250a5342d4d376d","deploymentId":"6a2fd114dad4590845608f80","questionText":"Using the API, how do I get the latest price of a coin?","status":"active","generatedBy":"manual","createdAt":"2026-08-05T04:13:46.694Z","updatedAt":"2026-08-05T04:13:46.694Z","__v":0},{"_id":"6a72b85f0250a5342d4d3667","deploymentId":"6a2fd114dad4590845608f80","questionText":"Write code to get the price and market cap of the top 10 coins","status":"active","generatedBy":"manual","createdAt":"2026-08-05T04:13:19.853Z","updatedAt":"2026-08-05T04:13:19.853Z","__v":0},{"_id":"6a72b8540250a5342d4d35e1","deploymentId":"6a2fd114dad4590845608f80","questionText":"How do I authenticate my API requests?","status":"active","generatedBy":"manual","createdAt":"2026-08-05T04:13:08.383Z","updatedAt":"2026-08-05T04:13:08.383Z","__v":0}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#navigation-items img{background:0 0!important}#navigation-items .mr-4.rounded-md.p-1.shadow-sm:has(img[alt*=\"anchor-logo.png\"]){filter:brightness(1)!important}html:is([data-current-path=\"/changelog\"],\n [data-current-path=\"/examples\"]) #sidebar{display:none!important}html:is([data-current-path=\"/changelog\"],\n [data-current-path=\"/examples\"]) #content-area{margin-left:0!important;margin-right:0!important}@media (min-width:1024px){html:is([data-current-path=\"/changelog\"],\n [data-current-path=\"/examples\"]) #content-area{padding-left:2rem!important}}html[data-current-path=\"/changelog\"] [data-component-part=update-content]{font-size:1rem}[data-component-part=prompt-action-copy-button]{background-color:#bbf7d0!important;color:#15803d!important}[data-component-part=prompt-action-copy-button] svg[aria-label=Check]{color:#15803d!important}[data-component-part=prompt-action-copy-button]:hover{background-color:#86efac!important}html.dark [data-component-part=prompt-action-copy-button]{background-color:rgba(22,163,74,.3)!important;color:#86efac!important}html.dark [data-component-part=prompt-action-copy-button] svg[aria-label=Check]{color:#86efac!important}html.dark [data-component-part=prompt-action-copy-button]:hover{background-color:rgba(22,163,74,.4)!important}html[data-current-path=\"/changelog\"] [data-component-part=update-content] hr{margin-top:2rem;margin-bottom:4rem}"}],"page":{"pagePath":"webhooks","slug":"/webhooks","pageMetadata":{"title":"Webhooks","sidebarTitle":"Overview","description":"Get notified instantly when events happen on CoinGecko — no polling required","href":"/webhooks/index"},"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: \"Get notified instantly when events happen on CoinGecko — no polling required\"\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`,blockquote:`blockquote`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,CodeGroup,Frame,Heading,Note,OptimizedImage,Step,Steps,Table,Tip,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`why-use-webhooks`,children:`Why Use Webhooks?`}),`\n`,_jsxs(_components.p,{children:[`Keep your application synchronized with CoinGecko in real-time — no cron jobs or polling required. Listen to events like `,_jsx(_components.code,{children:`cg.coin.info.updated`}),` and react instantly to changes.`]}),`\n`,_jsxs(CardGroup,{cols:3,children:[_jsx(Card,{title:`Automated Asset Updates`,icon:`wallet`,children:_jsx(_components.p,{children:`Update your UI when a token rebrands, changes ticker, or updates its logo.`})}),_jsx(Card,{title:`Cross-Chain Monitoring`,icon:`chart-network`,children:_jsx(_components.p,{children:`Detect when a project deploys on a new chain or migrates a contract address.`})}),_jsx(Card,{title:`Risk \u0026 Compliance`,icon:`shield-halved`,children:_jsx(_components.p,{children:`Act immediately on critical alerts — malicious activity warnings or contract migration notices.`})})]}),`\n`,_jsxs(Tip,{children:[_jsxs(_components.p,{children:[`CoinGecko Webhooks (Beta) is available for `,_jsx(_components.a,{href:`https://www.coingecko.com/en/api/pricing`,children:`paid plan`}),` customers (Basic plan \u0026 above).`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Credit charge: `,_jsx(_components.strong,{children:`10`}),` credits per event delivery. Retry attempts are `,_jsx(_components.strong,{children:`not charged`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Maximum webhook endpoints: `,_jsx(_components.strong,{children:`1`}),` on Basic plan, `,_jsx(_components.strong,{children:`5`}),` on Analyst plan \u0026 above.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Enterprise`}),` clients who need higher limits — contact your Customer Success Manager.`]}),`\n`]}),_jsx(_components.p,{children:`CoinGecko Webhooks is a supplementary delivery mechanism for real-time notifications. Currently in beta — excluded from the SLA applicable to the CoinGecko API Platform.`})]}),`\n`,_jsx(Card,{title:`Share Feedback`,icon:`comment`,href:`https://tally.so/r/2EgG4p`,children:_jsx(_components.p,{children:`Help us improve Webhooks — share your suggestions and use cases.`})}),`\n`,_jsx(Heading,{level:`2`,id:`getting-started`,children:`Getting Started`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Create a webhook`,children:[_jsxs(_components.p,{children:[`Go to the `,_jsx(_components.a,{href:`https://www.coingecko.com/en/developers/dashboard#webhook`,children:`Developer Dashboard`}),` and create a new webhook endpoint.`]}),_jsx(Frame,{caption:\"CoinGecko generates a unique Signing Secret (`whsec...`) for each webhook.\",children:_jsx(OptimizedImage,{src:`https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/webhook-create.png?fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=a1355e0de85fcee5efc0d34e1fc5660c`,style:{maxWidth:`400px`},\"data-og-width\":`848`,width:`848`,\"data-og-height\":`984`,height:`984`,\"data-path\":`assets/images/webhook-create.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/webhook-create.png?w=280\u0026fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=ea20ea4ef2d07b14009a70a9102a5ad1 280w, https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/webhook-create.png?w=560\u0026fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=c192619f3f161efdadc324d392824721 560w, https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/webhook-create.png?w=840\u0026fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=af5d9cb262c1087b2997ed67bcb15173 840w, https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/webhook-create.png?w=1100\u0026fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=941c63f1d07f6c52fb75166d035bb20f 1100w, https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/webhook-create.png?w=1650\u0026fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=81122d1e1ecb25d156ca5cc7a0b06b52 1650w, https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/webhook-create.png?w=2500\u0026fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=b98f5a12fe28b6069439a3669d3dd0b7 2500w`})})]}),_jsxs(Step,{title:`Get your Signing Secret`,children:[_jsx(_components.p,{children:`Use the Signing Secret to verify incoming payloads on your server.`}),_jsx(Frame,{caption:\"Every request includes `x-cg-signature`, `x-cg-timestamp`, and `x-cg-event-id` headers for verification.\",children:_jsx(OptimizedImage,{src:`https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/webhook-signing-secret.png?fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=ce14532f00f2b17222055bd3301be6c3`,\"data-og-width\":`2118`,width:`2118`,\"data-og-height\":`1258`,height:`1258`,\"data-path\":`assets/images/webhook-signing-secret.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/webhook-signing-secret.png?w=280\u0026fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=0bae3043257f863b0a845b12adee0852 280w, https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/webhook-signing-secret.png?w=560\u0026fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=d5890094f46fb940a41a21226f8e2668 560w, https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/webhook-signing-secret.png?w=840\u0026fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=6e57ef1d4d3aefc5534ba27dd065281c 840w, https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/webhook-signing-secret.png?w=1100\u0026fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=c17f6188b5acd1b07428edfbcc93dcf2 1100w, https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/webhook-signing-secret.png?w=1650\u0026fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=0496d56ee5ac24ca4477d0058c09400b 1650w, https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/images/webhook-signing-secret.png?w=2500\u0026fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=e36918b84e2d5605845c4c2570887465 2500w`})})]}),_jsx(Step,{title:`Start receiving events`,children:_jsxs(_components.p,{children:[`Your server will receive POST requests whenever relevant coin data changes on `,_jsx(_components.a,{href:`https://www.coingecko.com`,children:`CoinGecko.com`}),`.`]})})]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`For team accounts, non-owner users invited to a shared dashboard have full access to view, edit, and delete webhooks.`})}),`\n`,_jsx(Heading,{level:`2`,id:`event-types`,children:`Event Types`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Event Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`/webhooks/cg-coin-info-updated`,children:`cg.coin.info.updated`})}),_jsx(_components.td,{children:`Core coin information updated (metadata, links, categories, etc.)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`/webhooks/cg-coin-price-moved`,children:`cg.coin.price.moved`})}),_jsx(_components.td,{children:`Top-100 coin by market cap makes a significant price move`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`/webhooks/cg-coin-listed`,children:`cg.coin.listed`})}),_jsx(_components.td,{children:`New token indexed and listed on CoinGecko`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`/webhooks/cg-coin-exchange-added`,children:`cg.coin.exchange.added`})}),_jsx(_components.td,{children:`Coin newly tracked on an exchange by CoinGecko`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`More coming soon!`}),_jsx(_components.td,{children:_jsx(_components.a,{href:`https://tally.so/r/2EgG4p`,children:`Share your suggestions`})})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`http-headers`,children:`HTTP Headers`}),`\n`,_jsx(_components.p,{children:`Every webhook POST request includes these headers:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Header`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Content-Type`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`application/json`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`x-cg-timestamp`})}),_jsx(_components.td,{children:`UNIX timestamp of the event. Useful for replay attack prevention`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`x-cg-signature`})}),_jsx(_components.td,{children:`HMAC SHA256 signature to verify authenticity`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`x-cg-event-id`})}),_jsx(_components.td,{children:`Unique identifier for the event`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`signature-verification`,children:`Signature Verification`}),`\n`,_jsxs(_components.p,{children:[`Verify that incoming payloads are genuinely from CoinGecko by computing an HMAC SHA256 hash and comparing it to the `,_jsx(_components.code,{children:`x-cg-signature`}),` header.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Signing string format:`}),` `,_jsx(_components.code,{children:`{timestamp}:{event_id}:{json_body}`})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`{json_body}`}),` must be the `,_jsx(_components.strong,{children:`raw, unparsed request body`}),` — not a re-stringified JSON object.`,_jsx(`br`,{}),`\nIf your framework auto-parses JSON before verification, the signature will fail.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`example-code`,children:`Example Code`}),`\n`,_jsxs(_components.blockquote,{children:[`\n`,_jsxs(_components.p,{children:[`Replace `,_jsx(_components.code,{children:`YOUR_SIGNING_SECRET`}),` with the `,_jsx(_components.code,{children:`whsec_...`}),` value from your `,_jsx(_components.a,{href:`https://www.coingecko.com/en/developers/dashboard#webhook`,children:`Developer Dashboard`}),`.`]}),`\n`]}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Node.js (Express)`,expandable:`true`,numberOfLines:`39`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`39`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`createHmac`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` require`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'crypto'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` express`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` require`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'express'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` app`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` express`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` SIGNING_SECRET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_SIGNING_SECRET'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` verifySignature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`secret`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`secret`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` timestamp`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-cg-timestamp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` eventId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-cg-event-id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` signature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-cg-signature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`];`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`timestamp`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`eventId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`signature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` signingString`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `\"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`timestamp`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`eventId`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` expected`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createHmac`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sha256\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`secret`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`signingString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`digest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"hex\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` expected`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`app`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`post`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/webhook'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`express`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`raw`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }), (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` rawBodyString`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'utf8'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` isValid`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` verifySignature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`rawBodyString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`SIGNING_SECRET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`isValid`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`400`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`send`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Missing required CoinGecko headers'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`isValid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` event`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`parse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`rawBodyString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Process the event...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`send`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Webhook received successfully'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`401`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`send`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Invalid signature'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`app`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`listen`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, () `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Server listening on port 3000'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python (Flask)`,expandable:`true`,numberOfLines:`45`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`45`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hmac`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hashlib`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` flask `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Flask, request`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`app `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Flask(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:`__name__`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`SIGNING_SECRET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_SIGNING_SECRET'`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` verify_signature`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body_str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`headers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`secret`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` secret:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` timestamp `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'x-cg-timestamp'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'x-cg-event-id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` signature `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'x-cg-signature'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` timestamp `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`or`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event_id `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`or`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` signature:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` signing_string `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`timestamp`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`event_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`body_str`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` expected `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hmac.new(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` secret.encode(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'utf-8'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` signing_string.encode(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'utf-8'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hashlib.sha256`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ).hexdigest()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` hmac.compare_digest(expected, signature)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`@app.route`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'/webhook'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`methods`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` webhook_handler`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`():`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` raw_body_string `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` request.get_data(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`as_text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` is_valid `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` verify_signature(raw_body_string, request.headers, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`SIGNING_SECRET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` is_valid `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`is`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Missing required CoinGecko headers\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`400`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` is_valid:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` request.get_json()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Process the event...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Webhook received successfully\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`200`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Invalid signature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`401`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` __name__`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '__main__'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` app.run(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`port`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Treat your Signing Secret like a password — never commit it to public repos or expose it in client-side code.`})}),`\n`,_jsx(Heading,{level:`2`,id:`managing-webhooks`,children:`Managing Webhooks`}),`\n`,_jsxs(_components.p,{children:[`Navigate to your `,_jsx(_components.strong,{children:`Webhook Details`}),` page in the `,_jsx(_components.a,{href:`https://www.coingecko.com/en/developers/dashboard#webhook`,children:`Developer Dashboard`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Send Test Event`}),` — dispatches a mock `,_jsx(_components.code,{children:`cg.coin.info.updated`}),` payload. Use it to verify your server receives the request and responds with `,_jsx(_components.code,{children:`2xx`}),` before going live.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Delivery Logs`}),` — view the latest 100 delivery attempts. Use these to identify if your endpoint is rejecting requests.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`billing-\u0026-credits`,children:`Billing \u0026 Credits`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`10 credits`}),` per event delivery. Retries are `,_jsx(_components.strong,{children:`not charged`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`If you run out of credits with Hardcap enabled (Overage disabled):`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Delivery stops immediately and all webhooks are auto-disabled.`}),`\n`,_jsx(_components.li,{children:`You’ll receive an email notification that delivery has stopped.`}),`\n`,_jsxs(_components.li,{children:[`You must `,_jsx(_components.strong,{children:`manually re-activate`}),` webhooks in the `,_jsx(_components.a,{href:`https://www.coingecko.com/en/developers/dashboard#webhook`,children:`Developer Dashboard`}),` after credits are replenished.`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`estimated-usage`,children:`Estimated Usage`}),`\n`,_jsxs(_components.p,{children:[`Each delivered webhook event consumes `,_jsx(_components.strong,{children:`10 credits`}),`. The `,_jsx(_components.code,{children:`cg.coin.info.updated`}),` event listens to all active coins on CoinGecko — volume fluctuates based on market activity and how frequently projects update their metadata.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Expected volume:`}),` up to `,_jsx(_components.strong,{children:`200 updates/day`}),` based on historical data.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Estimated monthly cost:`}),` ~6,000 events/month = `,_jsx(_components.strong,{children:`~60,000 credits`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Plan fit:`}),` comfortably within the `,_jsx(_components.a,{href:`https://www.coingecko.com/en/api/pricing`,children:`Analyst plan`}),` and above.`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`These are approximations. Extreme market volatility or mass migrations could temporarily increase daily volume.`})}),`\n`,_jsx(Heading,{level:`3`,id:`24-hour-baseline-test`,children:`24-Hour Baseline Test`}),`\n`,_jsx(_components.p,{children:`If you’re concerned about unpredictable credit usage, run a short test before committing:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Enable Hardcap`}),` — turn OFF “Overage” in the Developer Dashboard to avoid unexpected charges.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Run for 24–48 hours`}),` — activate your webhook and let it collect events.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Check consumption`}),` — review credit usage in the dashboard to establish a reliable baseline.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`retries-\u0026-failed-attempts`,children:`Retries \u0026 Failed Attempts`}),`\n`,_jsxs(_components.p,{children:[`If your server fails to respond with a `,_jsx(_components.code,{children:`2xx`}),` status code, CoinGecko will retry with exponential backoff. `,_jsx(_components.strong,{children:`Retry attempts are not charged.`})]}),`\n`,_jsx(_components.p,{children:`A webhook is automatically disabled under either condition:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Condition`}),_jsx(_components.th,{children:`Threshold`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Single event backoff`}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`14 failed retries`}),` over ~24 hours`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Aggregate failure cap`}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`300 failed retries`}),` across 12 hours`]})]})]})]}),`\n`,_jsx(_components.p,{children:`When a webhook is disabled, you’ll receive an email notification. To resume:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Check your server logs and resolve the issue.`}),`\n`,_jsxs(_components.li,{children:[`Log in to the `,_jsx(_components.a,{href:`https://www.coingecko.com/en/developers/dashboard#webhook`,children:`Developer Dashboard`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Manually toggle the webhook back to `,_jsx(_components.strong,{children:`Active`}),`.`]}),`\n`]}),`\n`,_jsx(_components.a,{href:`/docs/crypto-payment`,children:_jsx(Frame,{children:_jsx(`img`,{src:`https://mintcdn.com/coingecko/yjZhP2nyEyOfbu6r/assets/images/crypto-payment-banner.png?fit=max\u0026auto=format\u0026n=yjZhP2nyEyOfbu6r\u0026q=85\u0026s=514a832a4b5a98d03da8a0aad722bceb`,alt:`Pay for your CoinGecko API subscription with crypto`,noZoom:true,\"data-og-width\":`1200`,width:`1200`,\"data-og-height\":`319`,height:`319`,\"data-path\":`assets/images/crypto-payment-banner.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/coingecko/yjZhP2nyEyOfbu6r/assets/images/crypto-payment-banner.png?w=280\u0026fit=max\u0026auto=format\u0026n=yjZhP2nyEyOfbu6r\u0026q=85\u0026s=6316e83056716b71539ea5767e6288ef 280w, https://mintcdn.com/coingecko/yjZhP2nyEyOfbu6r/assets/images/crypto-payment-banner.png?w=560\u0026fit=max\u0026auto=format\u0026n=yjZhP2nyEyOfbu6r\u0026q=85\u0026s=08de3b930307614e0ac5a75348526c8a 560w, https://mintcdn.com/coingecko/yjZhP2nyEyOfbu6r/assets/images/crypto-payment-banner.png?w=840\u0026fit=max\u0026auto=format\u0026n=yjZhP2nyEyOfbu6r\u0026q=85\u0026s=7bdedc985f60e47a14cfa75125e023c5 840w, https://mintcdn.com/coingecko/yjZhP2nyEyOfbu6r/assets/images/crypto-payment-banner.png?w=1100\u0026fit=max\u0026auto=format\u0026n=yjZhP2nyEyOfbu6r\u0026q=85\u0026s=a1db36313ab0ff5753b43958a4709e6d 1100w, https://mintcdn.com/coingecko/yjZhP2nyEyOfbu6r/assets/images/crypto-payment-banner.png?w=1650\u0026fit=max\u0026auto=format\u0026n=yjZhP2nyEyOfbu6r\u0026q=85\u0026s=83504e8fcb97ee2a13ab420543ff3b30 1650w, https://mintcdn.com/coingecko/yjZhP2nyEyOfbu6r/assets/images/crypto-payment-banner.png?w=2500\u0026fit=max\u0026auto=format\u0026n=yjZhP2nyEyOfbu6r\u0026q=85\u0026s=1abbb358bdbe426bd88cf60526db9716 2500w`})})})]})}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":{"title":"Webhooks","sidebarTitle":"Overview","description":"Get notified instantly when events happen on CoinGecko — no polling required","href":"/webhooks/index"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Why Use Webhooks?","slug":"why-use-webhooks","depth":2,"children":[]},{"title":"Getting Started","slug":"getting-started","depth":2,"children":[]},{"title":"Event Types","slug":"event-types","depth":2,"children":[]},{"title":"HTTP Headers","slug":"http-headers","depth":2,"children":[]},{"title":"Signature Verification","slug":"signature-verification","depth":2,"children":[{"title":"Example Code","slug":"example-code","depth":3,"children":[]}]},{"title":"Managing Webhooks","slug":"managing-webhooks","depth":2,"children":[]},{"title":"Billing \u0026 Credits","slug":"billing-\u0026-credits","depth":2,"children":[{"title":"Estimated Usage","slug":"estimated-usage","depth":3,"children":[]},{"title":"24-Hour Baseline Test","slug":"24-hour-baseline-test","depth":3,"children":[]}]},{"title":"Retries \u0026 Failed Attempts","slug":"retries-\u0026-failed-attempts","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/coingecko/ad7eef8e10594eee/cookie-consent.js","/_mintlify/custom/coingecko/0c2aa799958a4d27/inkeep.js"],"subdomain":"coingecko","siteName":"CoinGecko API","title":"Webhooks - CoinGecko API","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-15T07:46:34.337Z","originalFileLocation":"webhooks/index.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=\"Get notified instantly when events happen on CoinGecko — no polling required\">\u003cmeta data-mint-head name=\"application-name\" content=\"CoinGecko 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/coingecko/cEsEN1BHYMTujBc-/_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/coingecko/cEsEN1BHYMTujBc-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/coingecko/cEsEN1BHYMTujBc-/_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/coingecko/cEsEN1BHYMTujBc-/_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/coingecko/cEsEN1BHYMTujBc-/_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/coingecko/cEsEN1BHYMTujBc-/_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/coingecko/cEsEN1BHYMTujBc-/_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/coingecko/cEsEN1BHYMTujBc-/_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/coingecko/cEsEN1BHYMTujBc-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Webhooks - CoinGecko API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Get notified instantly when events happen on CoinGecko — no polling required\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"CoinGecko API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.coingecko.com/webhooks\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://coingecko.mintlify.app/_mintlify/api/og/v2?division=+\u0026amp;title=Webhooks\u0026amp;description=Get+notified+instantly+when+events+happen+on+CoinGecko+%E2%80%94+no+polling+required\u0026amp;theme=7d94e83892c91e1c01ec597e\u0026amp;signature=19ff1a169afccde467ae49af59aa5a9f6a532f2ace69ff036a1a03b5c5acb050\">\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=\"Webhooks - CoinGecko API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Get notified instantly when events happen on CoinGecko — no polling required\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://coingecko.mintlify.app/_mintlify/api/og/v2?division=+\u0026amp;title=Webhooks\u0026amp;description=Get+notified+instantly+when+events+happen+on+CoinGecko+%E2%80%94+no+polling+required\u0026amp;theme=7d94e83892c91e1c01ec597e\u0026amp;signature=19ff1a169afccde467ae49af59aa5a9f6a532f2ace69ff036a1a03b5c5acb050\">\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/coingecko/cEsEN1BHYMTujBc-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"CoinGecko API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4BCC00\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.coingecko.com/webhooks\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/webhooks.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.coingecko.com/#organization\",\"name\":\"CoinGecko API\",\"url\":\"https://docs.coingecko.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/coingecko/i9l2MT4etZGYjSx8/assets/logos/light.png?fit=max\u0026auto=format\u0026n=i9l2MT4etZGYjSx8\u0026q=85\u0026s=1f65227bee805b1106ace22fb56fdad7\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.coingecko.com#website\",\"name\":\"CoinGecko API\",\"url\":\"https://docs.coingecko.com\",\"publisher\":{\"@id\":\"https://docs.coingecko.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.coingecko.com/webhooks#webpage\",\"url\":\"https://docs.coingecko.com/webhooks\",\"name\":\"Webhooks\",\"description\":\"Get notified instantly when events happen on CoinGecko — no polling required\",\"dateModified\":\"2026-10-15T07:46:34.337Z\",\"isPartOf\":{\"@id\":\"https://docs.coingecko.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.coingecko.com/webhooks#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.coingecko.com/webhooks#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\" \",\"item\":\"https://docs.coingecko.com/webhooks/index\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Webhooks\",\"item\":\"https://docs.coingecko.com/webhooks\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.coingecko.com/webhooks#article\",\"headline\":\"Webhooks\",\"name\":\"Webhooks\",\"description\":\"Get notified instantly when events happen on CoinGecko — no polling required\",\"url\":\"https://docs.coingecko.com/webhooks\",\"mainEntityOfPage\":{\"@id\":\"https://docs.coingecko.com/webhooks#webpage\"},\"dateModified\":\"2026-10-15T07:46:34.337Z\",\"publisher\":{\"@id\":\"https://docs.coingecko.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.coingecko.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"CoinGecko API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"CoinGecko API","nav":{"global":{"anchors":[{"anchor":"CoinGecko API","icon":"https://mintlify.s3.us-west-1.amazonaws.com/coingecko/assets/logos/anchor.png","href":"https://www.coingecko.com/en/api"},{"anchor":"Enterprise","icon":"briefcase","href":"https://www.coingecko.com/en/api/enterprise"},{"anchor":"Case Studies","icon":"book-open-cover","href":"https://www.coingecko.com/en/api/case-studies"},{"anchor":"Newsletter","icon":"envelope","href":"https://newsletter.coingecko.com/landing/api_updates_subscribe"},{"anchor":"Feedback","icon":"message","href":"https://tally.so/r/kdQKeZ"}]},"tabs":[{"tab":"Overview","pages":[{"title":"Overview","href":""}]},{"tab":"AI Integration","pages":[{"title":"AI Integration","href":"/ai-integration"}]},{"tab":"Pro API Reference","pages":[{"title":"Pro API Reference","href":"/reference/endpoint-overview"}]},{"tab":"Demo API Reference","pages":[{"title":"Demo API Reference","href":"/demo/reference/endpoint-overview"}]},{"tab":"WebSocket","pages":[{"title":"WebSocket","href":"/websocket"}]},{"tab":"Webhooks","groups":[{"group":" ","pages":[{"title":"Webhooks","sidebarTitle":"Overview","href":"/webhooks"}]},{"group":"Event Types","pages":[{"title":"cg.coin.info.updated","description":"Triggered when core coin information is updated on CoinGecko","href":"/webhooks/cg-coin-info-updated"},{"title":"cg.coin.price.moved","href":"/webhooks/cg-coin-price-moved"},{"title":"cg.coin.listed","href":"/webhooks/cg-coin-listed"},{"title":"cg.coin.exchange.added","href":"/webhooks/cg-coin-exchange-added"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Webhooks - CoinGecko API","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["07c022d89b","a74be98ba7","a9bb46feb3"],"chunks":["Frame-DW6UFrUy.js","DynamicMarkdown-B62XqCSI.js","zoom-image-lightbox-eHyQ0tlO.js","lightbox-handle-r17bVUz3.js","Markdown-BOgQCTwD.js","clsx-BIWXJmsZ.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DKZWslLH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-UDqbR6xh.js"]}