Python
CGPT SDK Docs
ChainGPT AI News Generator SDK Documentation
Table of Contents
Installation
Quick Start
Initialization and Setup
Environment Variables
Basic Client Setup
NewsService API Reference
get_news() Method
get_news() MethodParameter
Type
Default
Description
Field
Type
Description
Data Models Reference
NewsArticleModel
CategoryModel
SubCategoryModel
TokenModel
MediaModel
GetNewsResponseModel
Usage Examples
Basic News Retrieval
Filtering by Category and Sub-Category
Search with Keywords
Date Range Filtering
Pagination Implementation
Complex Multi-Filter Query
Error Handling
Exception Types
Comprehensive Error Handling
Error Handling with Retry Logic
Common Category and Token IDs
Categories
ID
Name
Description
Sub-Categories (Ethereum-related)
ID
Name
Description
Tokens
ID
Name
Symbol
Description
Discovering Available IDs
Best Practices
1. Efficient API Usage
2. Proper Pagination
3. Error Handling and Logging
4. Resource Management
5. Caching for Performance
6. Rate Limiting
Last updated
Was this helpful?