Security & Best Practices
API Key Security
DO
- Store in environment variables or secrets manager
- Use separate keys per environment (prod / staging / dev)
- Use separate keys per service (backend / analytics / partner)
- Rotate periodically
- Always use header:
API-Key: YOUR_KEY
DON'T
- Commit to version control
- Put in URLs as query parameters
- Log in plaintext
- Share across organizations
- Expose in client-side code
Query Optimization
1. Add Filters to Reduce Result Size
?chain=ethereum&usdGte=10000&timeLast=24h2. Use Appropriate Time Windows
- Real-time monitoring →
1hor less - Daily analysis →
24h - Historical research →
30d
3. Implement Caching
- Intelligence data → Hours
- Historical transfers → Indefinitely
- Balances → Minutes
WebSocket Best Practices
- Always include filters: every stream needs at least one of
base,from,to,tokens, orusdGteof 250,000 or more. - Create the stream, then connect: stream creation, listing and deletion are free, and reconnecting replays the transfers you missed.
- Let your client answer pings: the server pings every 30 seconds and drops a connection that has not answered for 60 seconds. Standard WebSocket libraries reply automatically; if you build your own client or sit behind a proxy that strips control frames, make sure pongs get through.
- Keep your stream id: reconnecting with it restores your filter and delivers transfers you missed.
WebSocket Billing
- Transfers delivered: 2 credits per transfer.
- Stream creation, listing and deletion: free.
- Connection time is not charged. Throughput limits are covered in Rate Limits and your credit allowance in Credit Pricing.
Recovery After Disconnection
- A stream stays alive for 10 minutes of inactivity. Reconnect within 10 minutes and it reactivates and delivers the transfers that matched while you were away. After 10 minutes the stream is removed and you must create a new one.
Production Checklist
Before going to production, verify:
- API keys stored in secrets manager (not in code)
- Client-side rate limiting implemented
- Exponential backoff for 429/5xx errors
- Error handling for all HTTP status codes
- Request logging enabled (without secrets)
- Monitoring for 429/5xx rates
- Caching strategy per endpoint type
- Separate keys per environment
Evidentiary Usage
Arkham provides investigative intelligence designed to accelerate attribution, triage, and on-chain analysis. It is intended to support investigations and decision-making, not to serve as standalone evidence.
Warning
Customers are responsible for corroborating findings and meeting their own legal, regulatory, and evidentiary standards.
Arkham emphasizes:
- Confidence-scored attribution
- Auditability and transparency
- Clear explanations of why labels exist and how they were derived