List strategy templates
GET https://rest.haasapi.com/v1/partner/strategies
Returns the strategy templates a partner can create bots from, each with its configuration schema. A setting’s key is the snake_case config key you send under config when creating a bot, so this catalog is the bot-config contract.
Requires the partner scope.
Example request
Section titled “Example request”curl "https://rest.haasapi.com/v1/partner/strategies" \ -H "Authorization: Bearer hk_live_YOUR_KEY"Response
Section titled “Response”200 OK. Returns a PartnerStrategies.
{ "data": [ { "type": "spot_grid", "name": "Spot Grid", "description": "Places a grid of buy and sell orders between a lower and upper price.", "settings": [ { "key": "symbol", "group": null, "name": "Market", "description": null, "type": "string", "default": "BTC_USDT", "editable": false, "options": [] }, { "key": "lower_limit", "group": "Grid", "name": "Lower Limit", "description": null, "type": "number", "default": 25000, "editable": false, "options": [] }, { "key": "grid_count", "group": "Grid", "name": "Quantity", "description": null, "type": "number", "default": 20, "editable": true, "options": [] } ] } ]}Fields
Section titled “Fields”PartnerStrategies
Section titled “PartnerStrategies”| Field | Type | Description |
|---|---|---|
data |
array of PartnerStrategy | The available strategy templates. |
PartnerStrategy
Section titled “PartnerStrategy”| Field | Type | Description |
|---|---|---|
type |
WhiteLabelScriptType | The strategy type. Pass it as type when creating a bot. |
name |
string | Human-readable strategy name. |
description |
string | What the strategy does. |
settings |
array of PartnerStrategySetting | The strategy’s configuration fields. Each key is a snake_case config key you send under config when creating a bot. |
PartnerStrategySetting
Section titled “PartnerStrategySetting”| Field | Type | Description |
|---|---|---|
key |
string | The snake_case config key. |
group |
string, nullable | The UI grouping this field belongs to, if any. |
name |
string | Human-readable field name. |
description |
string, nullable | What the field controls. |
type |
WhiteLabelScriptSettingsType | The value type: number, boolean, option, string, or array. |
default |
object, nullable | The default value for the field. |
editable |
boolean | Whether the field can be changed while the bot is running. |
options |
array of string | The allowed values, for an option field; empty otherwise. |
Errors
Section titled “Errors”All errors are RFC 9457 problem documents.
| Status | Description |
|---|---|
400 |
The request is malformed (invalid limit, unusable cursor, …). (code: invalid_request) |
401 |
Missing, malformed, disabled, or revoked API key. (code: invalid_api_key) |
500 |
An unexpected error inside the API. Nothing about the request caused it; retry, and quote the instance value if it persists. (code: internal_error) |
502 |
An internal service answered in a way the API could not serve. Retry. (code: upstream_error) |
503 |
The request could not be served right now. Retry with the same key - do not discard it. (code: temporarily_unavailable) |
504 |
An internal service did not answer within the deadline. Retry with backoff. (code: upstream_timeout) |
{ "type": "https://docs.haasapi.com/errors/invalid_request", "title": "Invalid request", "status": 400, "detail": "The request is malformed (invalid limit, unusable cursor, …).", "code": "invalid_request"}