Security & Compliance
OilPriceAPI is built with enterprise security requirements in mind. This guide covers our security practices, compliance certifications, and best practices for secure integration.
Infrastructure Security
Data Centers
- Provider: DigitalOcean App Platform (SOC 2 Type II certified)
- Regions: Primary in NYC, with edge caching globally via Cloudflare
- Redundancy: Multi-zone deployment with automatic failover
- Backups: Daily automated backups with 30-day retention
Network Security
- TLS 1.3: All API traffic encrypted in transit
- HTTPS Only: HTTP requests automatically redirected to HTTPS
- DDoS Protection: Cloudflare enterprise-grade DDoS mitigation
- Rate Limiting: Per-key rate limits to prevent abuse
Data at Rest
- Database Encryption: PostgreSQL with AES-256 encryption
- Key Management: Encrypted API keys using industry-standard hashing
- Audit Logs: Complete request logging for security analysis
API Security
Authentication
All API requests require authentication via API key:
Authorization: Token YOUR_API_KEY
API Key Best Practices:
- Never expose keys client-side - Use server-side proxies
- Use environment variables - Never hardcode keys in source
- Rotate keys regularly - Generate new keys periodically
- Use separate keys per environment - Development vs production
- Monitor key usage - Check dashboard for unusual activity
Rate Limiting
Rate limits protect against abuse and ensure fair usage:
| Plan | Monthly Limit | Per-Minute Limit |
|---|---|---|
| Trial | 10,000 | 60 |
| Hobby | 10,000 | 60 |
| Starter | 50,000 | 100 |
| Professional | 100,000 | 200 |
| Business | 200,000 | 500 |
| Enterprise | Custom | Custom |
IP Allowlisting (Enterprise)
Enterprise customers can restrict API access to specific IP ranges:
Contact [email protected] to configure IP allowlisting
Data Privacy
Data Collection
OilPriceAPI collects minimal data necessary for service operation:
- Request logs: IP address, endpoint, timestamp, response time
- Account data: Email, API keys, billing information
- Usage data: Request counts, error rates, popular endpoints
Data Retention
| Data Type | Retention Period |
|---|---|
| Request logs | 90 days |
| Account data | Duration of account + 30 days |
| Billing records | 7 years (legal requirement) |
| Price data | Indefinite (core product) |
GDPR Compliance
For EU customers, we comply with GDPR requirements:
- Data Subject Rights: Request data export or deletion via support
- Data Processing Agreement: Available for enterprise customers
- EU Data Residency: Available on Enterprise plans
- Privacy Policy: oilpriceapi.com/privacy
CCPA Compliance
For California residents:
- Do Not Sell: We do not sell personal information
- Data Access: Request your data via [email protected]
- Deletion: Request account deletion at any time
Compliance Certifications
Current Certifications
| Certification | Status | Notes |
|---|---|---|
| SOC 2 Type II | Via Infrastructure | DigitalOcean certified |
| ISO 27001 | Via Infrastructure | DigitalOcean certified |
| GDPR | Compliant | Data processing controls |
| CCPA | Compliant | California privacy rights |
| PCI DSS | Compliant | Via Stripe for payments |
Audit Reports
Enterprise customers can request:
- SOC 2 Type II reports (via DigitalOcean)
- Penetration test results (annual)
- Security questionnaire responses
Contact [email protected] for access.
Secure Integration Checklist
Server-Side Integration (Recommended)
# Good: Server-side with environment variable
import os
from oilpriceapi import OilPriceAPI
client = OilPriceAPI(api_key=os.environ['OILPRICEAPI_KEY'])
price = client.prices.get("WTI_USD")
Proxy Pattern for Frontend
Never expose API keys in client-side code. Use a backend proxy:
// Backend API route (Next.js example)
// app/api/prices/route.ts
import { NextResponse } from 'next/server';
import { OilPriceAPI } from 'oilpriceapi';
const client = new OilPriceAPI({
apiKey: process.env.OILPRICEAPI_KEY!
});
export async function GET() {
const prices = await client.getLatestPrices();
return NextResponse.json(prices);
}
// Frontend - calls your backend, not OilPriceAPI directly
const prices = await fetch('/api/prices').then(r => r.json());
Webhook Security
When using price alerts with webhooks:
- Use HTTPS - Webhook URLs must use HTTPS
- Verify signatures - Validate webhook payloads (coming soon)
- Implement idempotency - Handle duplicate deliveries gracefully
- Set timeouts - Respond within 30 seconds
Incident Response
Security Incident Reporting
Report security vulnerabilities to: [email protected]
We follow responsible disclosure:
- Acknowledge receipt within 24 hours
- Provide status updates within 72 hours
- Credit researchers in our security acknowledgments
Status Page
Monitor service health: status.oilpriceapi.com
Subscribe to incident notifications via:
- Email alerts
- RSS feed
- Slack integration (Enterprise)
Enterprise Security Features
Available on Enterprise plans:
| Feature | Description |
|---|---|
| SSO/SAML | Single sign-on integration |
| IP Allowlisting | Restrict API access by IP |
| Custom SLA | 99.99% uptime guarantee |
| Dedicated Support | Direct engineering access |
| Audit Logs | Detailed access logging |
| EU Data Residency | Data stored in EU regions |
| Custom DPA | Tailored data processing agreement |
Contact [email protected] for details.
Security FAQ
How are API keys stored?
API keys are hashed using bcrypt before storage. We never store plaintext keys after initial generation.
Can I rotate my API key?
Yes. Generate a new key in your dashboard, update your applications, then revoke the old key.
What happens if my key is compromised?
- Immediately revoke the key in your dashboard
- Generate a new key
- Update all applications
- Review usage logs for unauthorized access
- Contact support if you notice suspicious activity
Do you share data with third parties?
We do not sell or share customer data. Third-party services we use:
- Stripe (payments)
- Postmark (transactional email)
- Sentry (error monitoring)
All third parties are bound by data processing agreements.
How do I request my data?
Email [email protected] with "Data Export Request" in the subject line. We'll provide your data within 30 days.
Contact
- Security Issues: [email protected]
- Compliance Questions: [email protected]
- General Support: [email protected]