Client¶
ComposerClient¶
composer.ComposerClient
¶
Main client for interacting with the Composer API.
This client provides access to various Composer API resources including backtest, market data, trading, portfolio management, and more.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
str
|
The API Key ID |
required |
api_secret
|
str
|
The API Secret Key |
required |
timeout
|
float
|
Request timeout in seconds (default: 30.0) |
30.0
|
retry_config
|
RetryConfig | None
|
Configuration for retry behavior (default: 3 retries, 10s for 429, 3s for 5xx) |
_DEFAULT_RETRY_CONFIG
|
Source code in composer/client.py
__init__(api_key, api_secret, timeout=30.0, retry_config=_DEFAULT_RETRY_CONFIG)
¶
Initialize the Composer Client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
str
|
The API Key ID |
required |
api_secret
|
str
|
The API Secret Key |
required |
timeout
|
float
|
Request timeout in seconds (default: 30.0) |
30.0
|
retry_config
|
RetryConfig | None
|
Configuration for retry behavior. Pass None to disable retries (default: RetryConfig()) |
_DEFAULT_RETRY_CONFIG
|