Getting Started with Your Composer API
This guide will walk you through the essential steps to integrate with the Composer API.
Prerequisites
Before you begin integration, you'll need:
- A Composer account
- Composer API access credentials (Key ID and Secret)
- Basic familiarity with REST APIs and HTTP requests
Getting Your API Credentials
To access the API, you'll need both a Key ID and a Secret:
- Log in to your Composer dashboard
- Navigate to the Settings section
- Select the API Access tab
- Click on Generate New API Key
- Your Key ID will be displayed immediately
- Your Secret will be shown only once - make sure to copy and store it securely
Important Notes on API Keys
- Never expose your API Secret in client-side code or public repositories. It should be securely stored with a proven secret management system.
- There is only one active key. Generating a new key pair will revoke access to your existing key.
- Keys are tied to your Composer account. They will have the same access as the user creating the key.
API Documentation
The complete API documentation is available at https://api.composer.trade/docs/
Authentication
All API requests require authentication using your Key ID and Secret. Include these in your request headers:
x-api-key-id: <key-id> authorization: Bearer <key-secret>
Replace <key-id>
with your actual Key ID and <key-secret>
with your actual Secret.
Base URL
All API endpoints are relative to the base URL: https://api.composer.trade/
Examples
This example shows how out to list the user’s account.
curl -X GET "<https://api.composer.trade/api/v0.1/accounts/list>" \\ -H "x-api-key-id: <key-id-value>" \\ -H "authorization: Bearer <key-secret>"
This example demonstrates how to retrieve a CSV activity report for a specific account.
curl -X GET "<https://api.composer.trade/api/v0.1/reports/550e8400-e29b-41d4-a716-446655440000?since=2023-01-01T00:00:00Z&until=2023-01-01T23:59:59.999Z&report-type=trade-activity>" \\ -H "accept: text/csv" \\ -H "x-api-key-id: <key-id-value>" \\ -H "authorization: Bearer <key-secret>"
Rate Limits
Rate limits are enforced on all endpoints. Most endpoints have a rate limit of 1 req/sec. The one exception is /api/v0.1/symphonies/{symphony-id}/backtest
, which has a rate limit of 500 req/sec. When the rate limit is exceeded, the request will fail with a status code of 429
.
Questions?
For any questions or assistance, contact the Composer support team at help@composer.trade.