Welcome to the Composer API! (1.0.0)

Download OpenAPI specification:

This documentation provides information on how to integrate with the Composer API to build automated trading strategies.

The Composer API enables programmatic access to Symphonies (automated trading strategies), portfolio management, market data, and direct trading capabilities.

Key Features

  • Symphony: An automated trading strategy that executes based on predefined rules
  • Deploy: Investing capital into a Symphony to begin automated trading
  • Backtest: Simulate a Symphony's historical performance before deploying
  • Direct Trading: Manual buy/sell orders outside of Symphony automation

Before you start

Before you begin integration, you'll need:

  • A Composer account, go ahead and login or sign up
  • 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:

  1. Log in to your Composer account
  2. Navigate to the Settings section
  3. Select the API Access tab
  4. Click on Generate New API Key
  5. Your Key ID will be displayed immediately
  6. 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.

Quickstart

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 to list the user's accounts:

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

Accounts

Manage user accounts and view account information including holdings and balances

List all accounts

Retrieve all brokerage accounts owned by the authenticated user. Each account includes information about supported asset classes for direct trading and Symphony automation.

Responses

Response samples

Content type
{
  • "accounts": [
    ]
}

Get account holdings

Retrieve all current positions held in the specified account. Supports filtering by position type to distinguish between direct trades and Symphony-managed positions.

path Parameters
account-id
required
string <uuid>

Unique identifier (UUID) of the account

query Parameters
position_type
string
Enum: "DEFAULT_DIRECT" "SYMPHONY" "ALL"

Filter holdings by position type. DEFAULT_DIRECT returns only direct trades, SYMPHONY returns only Symphony positions, ALL returns both.

Responses

Response samples

Content type
[
  • {
    },
  • {
    },
  • {
    }
]

Get investor documents for Apex and Alpaca accounts.

path Parameters
account-id
required
string <uuid>

Unique identifier (UUID) of the account

query Parameters
category
required
string
Enum: "STATEMENT" "CRYPTO_ACCOUNT_STATEMENT" "CRYPTO_TAX_FORM" "TAX_FORM" "TRADE_CONFIRMATION" "FPSL_CONFIRMATION"
year
required
integer <int64>

Responses

Response samples

Content type
[
  • {
    }
]

Portfolio

Access portfolio statistics, holding details, and performance history

Get holding statistics

Returns the direct and symphony allocations, amounts, and values by holding for an account. Includes current prices, daily change percentages, and notional values.

path Parameters
account-id
required
string <uuid>

Responses

Response samples

Content type
{
  • "holdings": [
    ]
}

Get aggregate portfolio statistics

path Parameters
account-id
required
string <uuid>

Unique identifier (UUID) of the account

Responses

Response samples

Content type
{
  • "portfolio_value": 0.1,
  • "simple_return": 0.1,
  • "time_weighted_return": 0.1,
  • "net_deposits": 0.1,
  • "todays_dollar_change": 0.1,
  • "todays_percent_change": 0.1,
  • "total_cash": 0.1,
  • "total_unallocated_cash": 0.1,
  • "pending_withdrawals": 0.1,
  • "pending_net_deposits": 0.1,
  • "pending_deploys_cash": 0.1
}

Get aggregate stats per symphony

path Parameters
account-id
required
string <uuid>

Unique identifier (UUID) of the account

Responses

Response samples

Content type
{
  • "symphonies": [
    ]
}

Gets the value of a position over time

path Parameters
account-id
required
string <uuid>
symphony-id
required
string

Responses

Response samples

Content type
{
  • "epoch_ms": [
    ],
  • "series": [
    ],
  • "deposit_adjusted_series": [
    ]
}

Gets the value of the account portfolio over time

path Parameters
account-id
required
string <uuid>

Unique identifier (UUID) of the account

Responses

Response samples

Content type
{
  • "epoch_ms": [
    ],
  • "series": [
    ]
}

Reports

Generate and retrieve account activity reports and statements

Return a report for the given account.

path Parameters
account-id
required
string <uuid>

Unique identifier (UUID) of the account

query Parameters
since
required
string <date-time>

Start date for the report period (ISO 8601 format)

until
required
string <date-time>

End date for the report period (ISO 8601 format)

report-type
required
string
Enum: "trade-activity" "non-trade-activity"

Type of report to generate (e.g., trade-activity)

Responses

Response samples

Content type
null

Market Data

Real-time and historical market data for equities, options

Get options chain

Retrieve the options chain for a specific underlying asset. Returns available contracts with bid/ask prices, greeks, and contract details. Requires authorization to view market data.

query Parameters
next_cursor
string

Pagination cursor for fetching the next page of results

underlying_asset_symbol
required
string

Ticker symbol of the underlying asset (e.g., AAPL)

strike_price
number <double>

Filter by specific strike price

expiry
string

Filter by expiration date (YYYY-MM-DD format)

contract_type
string
Enum: "CALL" "PUT"

Filter by option type (CALL or PUT)

order
string
Enum: "ASC" "DESC"

Sort order for results (ascending or descending)

limit
integer <int64>

Maximum number of results to return. Default is 10, maximum is 250.

sort_by
string
Enum: "symbol" "expiry" "strike_price"

Field to sort results by

Responses

Response samples

Content type
{
  • "results": [
    ],
  • "next_cursor": "string"
}

Get options contract market data.

If the user is not authorized to view the market data, a 403 error will be returned.

query Parameters
underlying_asset_symbol
string
symbol
required
stringOPTIONS::[A-Z]{1,5}[1-9]?[0-9]{6}[PC][0-9]{8}...

Responses

Response samples

Content type
{
  • "symbol": "string",
  • "name": "string",
  • "underlying_asset_symbol": "string",
  • "contract_details": {
    },
  • "underlying_asset_price": 0.1,
  • "change_to_break_even": 0.1,
  • "payoff_status": "IN_THE_MONEY",
  • "ask": {
    },
  • "bid": {
    },
  • "last_trade": {
    },
  • "todays_change": 0.1,
  • "todays_change_percent": 0.1,
  • "open_interest": 0.1,
  • "implied_volatility": 0.1,
  • "delta_dollars": 0.1,
  • "notional_value": 0.1,
  • "greeks": {
    },
  • "day": {
    }
}

Get an overview of options data.

Returns an overview of options data available for a given ticker.

query Parameters
symbol
required
string

Responses

Response samples

Content type
{
  • "symbol": "string",
  • "calendar": [
    ]
}

Symphony

Create, manage, and configure automated trading strategies (Symphonies)

Create a new Symphony

Create a new automated trading strategy (Symphony). Define the logic tree, asset class, display settings, and optional benchmarks for performance comparison.

Request Body schema:
required
name
required
string

Required on write. Optional/nullable on read due to old data.

asset_class
required
string
Default: "EQUITIES"
Enum: "EQUITIES" "CRYPTO"
description
string
color
required
string
hashtag
required
string
tags
Array of strings
required
object or object
Array of objects
share_with_everyone
boolean

Responses

Request samples

Content type
{
  • "name": "string",
  • "asset_class": "EQUITIES",
  • "description": "string",
  • "color": "#FFBB38",
  • "hashtag": "#BTD",
  • "tags": [
    ],
  • "symphony": {
    },
  • "benchmarks": [
    ],
  • "share_with_everyone": true
}

Response samples

Content type
{
  • "symphony_id": "string",
  • "version_id": "string"
}

Update an existing symphony

path Parameters
symphony-id
required
string

Unique identifier for the Symphony

Request Body schema:
required
name
string
description
string
color
string
hashtag
string
tags
Array of strings
object or object
Array of objects
share_with_everyone
boolean

Responses

Request samples

Content type
{
  • "name": "string",
  • "description": "string",
  • "color": "#FFBB38",
  • "hashtag": "#BTD",
  • "tags": [
    ],
  • "symphony": {
    },
  • "benchmarks": [
    ],
  • "share_with_everyone": true
}

Response samples

Content type
{
  • "existing_version_id": "string",
  • "version_id": "string"
}

Delete an existing symphony

path Parameters
symphony-id
required
string

Unique identifier for the Symphony

Responses

Get an existing symphony's EDN

path Parameters
symphony-id
required
string

Unique identifier for the Symphony

query Parameters
score_version
required
string
Default: "v1"
Enum: "v1" "v2"

Responses

Response samples

Content type
{
  • "id": "string",
  • "suppress-incomplete-warnings?": true,
  • "collapsed?": true,
  • "collapsed-specified-weight?": true,
  • "weight": {
    },
  • "step": "root",
  • "name": "string",
  • "description": "string",
  • "rebalance": "none",
  • "rebalance-corridor-width": 0.1,
  • "children": [
    ]
}

Get all versions for a symphony

path Parameters
symphony-id
required
string

Unique identifier for the Symphony

Responses

Response samples

Content type
[
  • {
    }
]

Get an existing symphony version's EDN

path Parameters
symphony-id
required
string

Unique identifier for the Symphony

version-id
required
string

Unique identifier for the Symphony version

query Parameters
score_version
required
string
Default: "v1"
Enum: "v1" "v2"

Responses

Response samples

Content type
{
  • "id": "string",
  • "suppress-incomplete-warnings?": true,
  • "collapsed?": true,
  • "collapsed-specified-weight?": true,
  • "weight": {
    },
  • "step": "root",
  • "name": "string",
  • "description": "string",
  • "rebalance": "none",
  • "rebalance-corridor-width": 0.1,
  • "children": [
    ]
}

Copy an existing Symphony

Create a copy of an existing Symphony. The new Symphony will have the same trading logic but will be undeployed and can be modified independently.

path Parameters
symphony-id
required
string

Unique identifier for the Symphony

Request Body schema:
required
is_public
boolean

DEPRECATED - This field is deprecated and will be removed in a future version

hashtag
string
color
string
name
string
Array of objects
share_with_everyone
boolean

Responses

Request samples

Content type
{
  • "is_public": true,
  • "hashtag": "#BTD",
  • "color": "#FFBB38",
  • "name": "string",
  • "benchmarks": [
    ],
  • "share_with_everyone": true
}

Response samples

Content type
{
  • "symphony_id": "string",
  • "version_id": "string"
}

Backtest

Simulate Symphony performance using historical market data

/api/v0.1/symphonies/{symphony-id}/backtest

path Parameters
symphony-id
required
string
Request Body schema:
required
capital
required
number <double>
abbreviate_days
integer <int64>
apply_reg_fee
required
boolean
apply_taf_fee
required
boolean
apply_subscription
string
Enum: "none" "monthly" "yearly"
backtest_version
string
Enum: "v1" "v2"
slippage_percent
required
number <double>

Despite the name this is not in %. 1% is indicated with 0.01, not 1.0.

spread_markup
number <double>

10bps would be 0.001 (0.1%)

start_date
string
end_date
string
broker
required
string
Default: "ALPACA_WHITE_LABEL"
Enum: "ALPACA_OAUTH" "ALPACA_WHITE_LABEL" "APEX_LEGACY" "alpaca" "apex"
benchmark_symphonies
Array of strings
benchmark_tickers
Array of strings

Responses

Request samples

Content type
{
  • "capital": 0.1,
  • "abbreviate_days": 0,
  • "apply_reg_fee": true,
  • "apply_taf_fee": true,
  • "apply_subscription": "none",
  • "backtest_version": "v1",
  • "slippage_percent": 0.1,
  • "spread_markup": 0.1,
  • "start_date": "string",
  • "end_date": "string",
  • "broker": "ALPACA_OAUTH",
  • "benchmark_symphonies": [
    ],
  • "benchmark_tickers": [
    ]
}

Response samples

Content type
{
  • "last_semantic_update_at": "2019-08-24T14:15:22Z",
  • "sparkgraph_url": "string",
  • "dvm_capital": {
    },
  • "tdvm_weights": {
    },
  • "rebalance_days": [
    ],
  • "active_asset_nodes": {
    },
  • "costs": {
    },
  • "last_market_days_value": 0.1,
  • "last_market_days_holdings": {
    },
  • "last_market_day": 0,
  • "first_day": 0,
  • "legend": {
    },
  • "data_warnings": {
    },
  • "benchmark_errors": [
    ],
  • "stats": {
    }
}

/api/v0.1/backtest

Request Body schema:
required
capital
required
number <double>
abbreviate_days
integer <int64>
apply_reg_fee
required
boolean
apply_taf_fee
required
boolean
apply_subscription
string
Enum: "none" "monthly" "yearly"
backtest_version
string
Enum: "v1" "v2"
slippage_percent
required
number <double>

Despite the name this is not in %. 1% is indicated with 0.01, not 1.0.

spread_markup
number <double>

10bps would be 0.001 (0.1%)

start_date
string
end_date
string
broker
required
string
Default: "ALPACA_WHITE_LABEL"
Enum: "ALPACA_OAUTH" "ALPACA_WHITE_LABEL" "APEX_LEGACY" "alpaca" "apex"
benchmark_symphonies
Array of strings
benchmark_tickers
Array of strings
sparkgraph_color
string
required
object or object

Responses

Request samples

Content type
{
  • "capital": 0.1,
  • "abbreviate_days": 0,
  • "apply_reg_fee": true,
  • "apply_taf_fee": true,
  • "apply_subscription": "none",
  • "backtest_version": "v1",
  • "slippage_percent": 0.1,
  • "spread_markup": 0.1,
  • "start_date": "string",
  • "end_date": "string",
  • "broker": "ALPACA_OAUTH",
  • "benchmark_symphonies": [
    ],
  • "benchmark_tickers": [
    ],
  • "sparkgraph_color": "string",
  • "symphony": {
    }
}

Response samples

Content type
{
  • "last_semantic_update_at": "2019-08-24T14:15:22Z",
  • "sparkgraph_url": "string",
  • "dvm_capital": {
    },
  • "tdvm_weights": {
    },
  • "rebalance_days": [
    ],
  • "active_asset_nodes": {
    },
  • "costs": {
    },
  • "last_market_days_value": 0.1,
  • "last_market_days_holdings": {
    },
  • "last_market_day": 0,
  • "first_day": 0,
  • "legend": {
    },
  • "data_warnings": {
    },
  • "benchmark_errors": [
    ],
  • "stats": {
    }
}

Deploy

Invest capital into Symphonies and manage active deployments including rebalancing and withdrawals

Get market hours

Returns trading hours for the current day and the next week. Includes regular market hours, extended hours, and holidays.

Responses

Response samples

Content type
{
  • "market_hours": [
    ]
}

Invest cash into a Symphony

Add additional capital to a Symphony position. The investment will be queued and executed during the next rebalancing window.

path Parameters
symphony-id
required
string

Unique identifier for the Symphony

account-id
required
string <uuid>

Unique identifier (UUID) of the account

Request Body schema:
required
amount
required
number <double>

Amount of cash to invest or withdraw (in USD)

Responses

Request samples

Content type
{
  • "amount": 0.1
}

Response samples

Content type
{
  • "deploy_id": "string",
  • "deploy_time": "2019-08-24T14:15:22Z"
}

Withdraw cash from a Symphony

Withdraw capital from a Symphony position. The withdrawal will be queued and executed during the next rebalancing window.

path Parameters
symphony-id
required
string

Unique identifier for the Symphony

account-id
required
string <uuid>

Unique identifier (UUID) of the account

Request Body schema:
required
amount
required
number <double>

Amount of cash to invest or withdraw (in USD)

Responses

Request samples

Content type
{
  • "amount": 0.1
}

Response samples

Content type
{
  • "deploy_id": "string",
  • "deploy_time": "2019-08-24T14:15:22Z"
}

Skip automated rebalancing

Toggle whether the Symphony should skip its next automated rebalancing cycle. Useful for temporarily pausing automated trading.

path Parameters
symphony-id
required
string

Unique identifier for the Symphony

account-id
required
string <uuid>

Unique identifier (UUID) of the account

Request Body schema:
required
skip
required
boolean

Responses

Request samples

Content type
{
  • "skip": true
}

Response samples

Content type
{ }

Sell all assets in a symphony, leaving proceeds in cash. Cancels any existing queued invest/withdraw deploys for the symphony.

path Parameters
symphony-id
required
string

Unique identifier for the Symphony

account-id
required
string <uuid>

Unique identifier (UUID) of the account

Responses

Response samples

Content type
{
  • "deploy_id": "string",
  • "deploy_time": "string",
  • "deploy_on_market_open": true
}

Rebalance a symphony NOW.

path Parameters
symphony-id
required
string

Unique identifier for the Symphony

account-id
required
string <uuid>

Unique identifier (UUID) of the account

Request Body schema:
required
rebalance_request_uuid
required
string <uuid>

Responses

Request samples

Content type
{
  • "rebalance_request_uuid": "fce8e2e8-23a5-4b70-b013-f38fba45fefc"
}

Response samples

Content type
{
  • "deploy_id": "string",
  • "deploy_time": "string",
  • "deploy_on_market_open": true,
  • "symphony_id": "string"
}

Liquidate a symphony entirely. Cancels any existing queued invest/withdraw deploys for the symphony.

path Parameters
symphony-id
required
string

Unique identifier for the Symphony

account-id
required
string <uuid>

Unique identifier (UUID) of the account

Responses

Response samples

Content type
{
  • "deploy_id": "string",
  • "deploy_time": "string",
  • "deploy_on_market_open": true
}

Dry Run

Preview trades and rebalancing actions before execution

Dry run rebalances for a specific user (all accounts, unless otherwise specified)

Request Body schema:
required
account_uuids
Array of strings <uuid> [ items <uuid > ]
send_segment_event
required
boolean
Default: false

Responses

Request samples

Content type
{
  • "account_uuids": [
    ],
  • "send_segment_event": false
}

Response samples

Content type
[
  • {
    }
]

Generate trade preview for a single symphony

path Parameters
symphony-id
required
string

Unique identifier for the Symphony

Request Body schema:
required
amount
number <double>
broker_account_uuid
string <uuid>

Responses

Request samples

Content type
{
  • "amount": 0.1,
  • "broker_account_uuid": "e0fd1a58-8918-407a-b82b-ee1a59091ebe"
}

Response samples

Content type
{
  • "rebalanced": true,
  • "next_rebalance_after": "string",
  • "recommended_trades": [
    ],
  • "queued_cash_change": 0.1,
  • "rebalance_frequency_override": true,
  • "rebalance_request_uuid": "fce8e2e8-23a5-4b70-b013-f38fba45fefc",
  • "adjusted_for_dtbp": true,
  • "symphony_value": 0.1,
  • "symphony_name": "string"
}

Direct Trading

Place manual buy/sell orders outside of Symphony automation

Get order requests

Retrieve all order requests for a brokerage account. Returns both pending and completed orders with their current status.

path Parameters
account-id
required
string <uuid>

Unique identifier (UUID) of the account

query Parameters
limit
integer <int64>
status
string

Single status or comma-separated list of statuses (e.g., 'QUEUED,OPEN,IN_PROGRESS')

Responses

Response samples

Content type
{
  • "order_requests": [
    ]
}

Create order request

Submit a new buy or sell order for equities or options. If the request is made outside of market hours, it will be queued and executed at the next market open.

path Parameters
account-id
required
string <uuid>

Unique identifier (UUID) of the account

Request Body schema:
required
type
required
string
Enum: "MARKET" "LIMIT" "STOP" "STOP_LIMIT" "TRAILING_STOP"
symbol
required
string
time_in_force
required
string
Enum: "GTC" "DAY" "IOC" "FOK" "OPG" "CLS"
notional
number or null <double>

Required if quantity is not provided.

quantity
number or null <double>

Required if notional is not provided.

position_intent
string
Enum: "BUY_TO_OPEN" "SELL_TO_OPEN" "BUY_TO_CLOSE" "SELL_TO_CLOSE"

Required if the symbol is an option contract.

limit_price
number or null <double>
stop_price
number or null <double>
client_order_id
string or null

Optional client-generated order ID, for order tracking and idempotency.

Responses

Request samples

Content type
{
  • "type": "MARKET",
  • "symbol": "string",
  • "time_in_force": "GTC",
  • "notional": 0.1,
  • "quantity": 0.1,
  • "position_intent": "BUY_TO_OPEN",
  • "limit_price": 0.1,
  • "stop_price": 0.1,
  • "client_order_id": "string"
}

Response samples

Content type
{
  • "order_request_id": "e4e3aeab-60b5-47ed-a66d-af002ff85ee5",
  • "order_time": "2019-08-24T14:15:22Z",
  • "commission": 0
}

Search our database of publicly shared symphonies

Request Body schema:
required
where
Array of any
order_by
Array of strings[ items ]
offset
required
integer <int64>
Default: 0

Responses

Request samples

Content type
{
  • "where": [
    ],
  • "order_by": [
    ],
  • "offset": 0
}

Response samples

Content type
[
  • {
    }
]