SDKs Overview
The Trading Card API provides official Software Development Kits (SDKs) for popular programming languages. These SDKs simplify integration with the API by handling authentication, request formatting, error handling, and response parsing automatically.
Available SDKs
PHP SDK
Status: ✅ Available on Packagist
Minimum Version: PHP 8.1+ | Laravel 10.0+
Package: cardtechie/tradingcardapi-sdk-php
composer require cardtechie/tradingcardapi-sdk-php
Features:
- OAuth2 authentication handling
- Automatic token refresh
- Built-in rate limiting
- Comprehensive error handling
- PSR-4 autoloading
- Type hints and documentation
📖 View PHP SDK Documentation →
JavaScript/Node.js SDK
Status: 🚧 Coming Soon
Planned Release: Q4 2025
Package: @tradingcardapi/sdk
Planned Features:
- Promise-based API
- TypeScript support
- Browser and Node.js compatibility
- Automatic retries
- WebSocket support for real-time updates
Python SDK
Status: 🚧 Coming Soon
Planned Release: Q1 2026
Package: tradingcardapi
Planned Features:
- Async/await support
- Type hints with mypy
- Pandas integration for data analysis
- CLI tools for data export
- Jupyter notebook examples
.NET SDK
Status: 📋 Planned
Planned Release: Q2 2026
Package: TradingCardAPI.SDK
Planned Features:
- .NET Standard 2.0 compatibility
- Strongly typed models
- LINQ integration
- Configuration binding
- Dependency injection support
Quick Start Guide
1. Choose Your SDK
Select the SDK that matches your development environment:
Language | Status | Package Manager | Installation Command |
---|---|---|---|
PHP | ✅ Available | Composer | composer require cardtechie/tradingcardapi-sdk-php |
JavaScript | 🚧 Coming Soon | npm/yarn | npm install @tradingcardapi/sdk |
Python | 🚧 Coming Soon | pip | pip install tradingcardapi |
.NET | 📋 Planned | NuGet | dotnet add package TradingCardAPI.SDK |
2. Get API Credentials
- Sign up for a Trading Card API account at tradingcardapi.com
- Create a new application in your dashboard
- Copy your
client_id
andclient_secret
3. Install and Initialize
Choose your language for quick start instructions:
PHP
<?php
use CardTechie\TradingCardApiSdk\Facades\TradingCardApiSdk;
// Get some cards (using Laravel facade)
$cards = TradingCardApiSdk::card()->getList(['name' => 'Pikachu']);
// Or using helper function
$cards = tradingcardapi()->card()->getList();
echo "Found " . count($cards) . " cards\n";
JavaScript (Coming Soon)
const TradingCardAPI = require('@tradingcardapi/sdk');
const client = new TradingCardAPI({
clientId: 'your_client_id',
clientSecret: 'your_client_secret'
});
// Get some cards
const cards = await client.cards.list({ 'page[limit]': 10 });
console.log(`Found ${cards.data.length} cards`);
This SDK is planned for Q4 2025. Get notified →
Python (Coming Soon)
from tradingcardapi import Client
client = Client(
client_id='your_client_id',
client_secret='your_client_secret'
)
# Get some cards
cards = await client.cards.list(page_limit=10)
print(f"Found {len(cards.data)} cards")
This SDK is planned for Q1 2026. Get notified →
4. Start Building
With your SDK installed and authenticated, you can start building:
- Card Price Tracker: Monitor price changes for specific cards
- Collection Manager: Track and value card collections
- Marketplace Integration: Build buying/selling platforms
- Data Analysis: Analyze market trends and pricing
- Mobile Apps: Create card scanning and cataloging apps
SDK Features Comparison
Feature | PHP | JavaScript | Python | .NET |
---|---|---|---|---|
OAuth2 Authentication | ✅ | 🚧 | 🚧 | 📋 |
Automatic Token Refresh | ✅ | 🚧 | 🚧 | 📋 |
Rate Limiting | ✅ | 🚧 | 🚧 | 📋 |
Error Handling | ✅ | 🚧 | 🚧 | 📋 |
Pagination Support | ✅ | 🚧 | 🚧 | 📋 |
Type Safety | ⚠️ Partial | 🚧 Full | 🚧 Full | 📋 Full |
Async/Await | ❌ | 🚧 | 🚧 | 📋 |
WebSocket Support | ❌ | 🚧 | ❌ | ❌ |
CLI Tools | ❌ | ❌ | 🚧 | ❌ |
Legend: ✅ Available | 🚧 Coming Soon | 📋 Planned | ❌ Not Planned | ⚠️ Limited
Common Use Cases
1. Price Tracking Application
Build applications that monitor card prices over time:
// PHP Example
$tracker = new PriceTracker($client);
$priceHistory = $tracker->getCardPriceHistory('1989-upper-deck-griffey-jr');
2. Collection Management
Create tools for collectors to manage their card collections:
// PHP Example
$collection = new CollectionManager($client);
$value = $collection->calculateTotalValue();
echo "Collection worth: $" . number_format($value, 2);
3. Marketplace Integration
Integrate card data into buying/selling platforms:
// PHP Example
$marketplace = new MarketplaceConnector($client);
$listings = $marketplace->syncCardListings(['category' => 'Baseball']);
4. Data Analysis
Analyze market trends and pricing patterns:
// PHP Example
$analyzer = new MarketAnalyzer($client);
$trends = $analyzer->getYearOverYearPricing(2020, 2024);
Best Practices
Authentication
- Store credentials securely: Never hardcode API credentials in source code
- Use environment variables: Store sensitive data in environment variables
- Rotate credentials regularly: Update your API credentials periodically
Error Handling
- Handle rate limits: Implement retry logic with exponential backoff
- Log errors appropriately: Log API errors for debugging but don't expose sensitive data
- Graceful degradation: Handle API unavailability gracefully
Performance
- Use pagination: Don't fetch all data at once for large datasets
- Cache responses: Cache API responses when appropriate to reduce calls
- Batch requests: Group related requests when possible
Data Management
- Validate data: Always validate API responses before using the data
- Handle missing data: Not all cards have complete data - handle null values
- Keep data fresh: Card prices and availability change frequently
Support and Resources
Documentation
- API Reference: Complete API endpoint documentation
- Authentication Guide: Detailed authentication setup
- Rate Limits: Understanding API limits and best practices
Community and Support
- GitHub Issues: Report bugs or request features for each SDK
- Email Support: [email protected]
- Community Forum: discussions.tradingcardapi.com
Updates and Announcements
- Blog: Follow our blog for SDK updates and releases
- Changelog: Check individual SDK changelogs for version updates
- Newsletter: Subscribe to our developer newsletter for important updates
Contributing
We welcome contributions to our SDKs! Each SDK has its own repository with contribution guidelines:
- PHP SDK: github.com/cardtechie/tradingcardapi-sdk-php
- JavaScript SDK: Repository coming soon
- Python SDK: Repository coming soon
- .NET SDK: Repository coming soon
SDK Development Roadmap
Current Quarter (Q3 2025)
- ✅ PHP SDK v1.0 release on Packagist
- 🚧 PHP SDK comprehensive documentation
- 🚧 PHP SDK example applications
Q4 2025
- 🚧 JavaScript/Node.js SDK development
- 🚧 TypeScript definitions and examples
- 🚧 Browser compatibility testing
Q1 2026
- 📋 Python SDK development
- 📋 Async/await implementation
- 📋 Pandas integration for data analysis
Q2 2026
- 📋 .NET SDK development
- 📋 .NET Standard 2.0 compatibility
- 📋 Dependency injection support
Want to be notified when new SDKs are released? Subscribe to our developer newsletter →