No Key Required
Most Market Motion endpoints work without authentication. This lets you explore the API and prototype quickly. Anonymous rate limit: 30 requests/minuteAPI Keys
For production use, get an API key to increase your rate limits.Getting a Key
- Visit marketmotion.xyz/developer
- Sign in with your account
- Click “Create API Key”
- Choose key type (Test or Live)
Key Types
| Type | Rate Limit | Use Case |
|---|---|---|
| Test Key | 100 req/min | Development and testing |
| Live Key | 300 req/min | Production applications |
Using Your Key
Include the API key in theX-API-Key header:
Rate Limiting
When you exceed your rate limit, you’ll receive a429 response:
Rate Limit Headers
Every response includes rate limit information:| Header | Description |
|---|---|
X-RateLimit-Limit | Your requests per minute limit |
X-RateLimit-Remaining | Requests remaining in current window |
X-RateLimit-Reset | Unix timestamp when limit resets |
Best Practices
Cache responses locally
Cache responses locally
Entity data doesn’t change frequently. Cache responses for 5-15 minutes to reduce API calls.
Use bulk endpoints
Use bulk endpoints
Fetch multiple entities at once using list endpoints with filters rather than individual lookups.
Implement exponential backoff
Implement exponential backoff
If rate limited, wait before retrying. Double the wait time on each retry.
Error Responses
All errors follow a consistent format:HTTP Status Codes
| Code | Meaning |
|---|---|
200 | Success |
400 | Bad request (invalid parameters) |
401 | Invalid API key |
404 | Entity or market not found |
429 | Rate limit exceeded |
500 | Server error |
Security
Best practices:- Store keys in environment variables
- Use server-side code to make API calls
- Rotate keys if compromised
- Use Test keys for development, Live keys for production