QuickStart Guide
AI Crypto News QuickStart Guide
ChainGPT’s AI News Generator delivers curated crypto & blockchain‑AI news through a REST API, JavaScript/TypeScript SDK, and public RSS feeds. Integrate once, fetch fresh stories in seconds, and build features like personalized feeds, dashboards, or alerts.
Prerequisites
ChainGPT account with credits and an API key
Node ≥ 18 (for SDK examples)
curlor any HTTP clientAbility to set the environment variable
CHGPT_API_KEY
Install the SDK
# npm
npm install --save @chaingpt/ainews
# yarn
yarn add @chaingpt/ainewsAuthenticate
REST
SDK
The key is charged 1 credit per 10 records returned.
Generate your first article
REST (minimal)
Returns JSON with an array of articles sorted by createdAt.
SDK (equivalent)
Optional filters: categoryId, subCategoryId, tokenId, fetchAfter, searchQuery, sortBy (createdAt or publishedAt).
Consume via RSS
Need a zero‑code option? Subscribe to the public feeds:
General (All Crypto) feed
https://app.chaingpt.org/rssfeeds.xmlBitcoin feed
https://app.chaingpt.org/rssfeeds-bitcoin.xmlBNB feed
https://app.chaingpt.org/rssfeeds-bnb.xmlEthereum feed
https://app.chaingpt.org/rssfeeds-ethereum.xml
Error handling & rate limits
REST returns standard HTTP codes; non‑2xx responses include a JSON
message.SDK throws
AINewsError; catch and inspecterror.message.Limit: 200 requests / minute per key; burst above rate is throttled.
Next steps
Pagination – use
limit&offsetto page through results.Advanced filtering – full category, sub‑category, and token ID lists.
Production hardening – implement caching and exponential back‑off.
Resources
Happy building!
Last updated
Was this helpful?