Skip to Content
BlitzPulse docs are live. Looking for the app? Visit https://app.blitzglobalcapital.com.
Api ReferenceStrategies API

Strategies API

Auto-generated from openapi-snapshot.json. Do not edit by hand — changes are overwritten by scripts/docs/generate_api_reference.py.

9 endpoints in this group.

GET /api/strategies

List Strategies

List active strategies for a tenant from the database.

Parameters

NameInTypeRequiredDescription
tenant_idqueryintegeroptional
agent_idqueryoptional

Responses

CodeDescription
200Successful Response
422Validation Error

POST /api/strategies

Create Strategy

Create a new strategy. Returns the created row (joined with agent_name) so the frontend can insert it straight into state.

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error

POST /api/strategies/clone

Clone Template

Clone a built-in template into the strategies table for a user.

Returns: {“strategy_id”: int, “template_id”: str, “tenant_id”: int}

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error

POST /api/strategies/suggest

Suggest

Ask the configured LLM to propose count strategies matching the inputs.

Returns: {“suggestions”: [StrategySuggestion, …], “count”: int}

Errors: 400 — LLM returned unparseable output (bad JSON / wrong shape). 503 — LLM client misconfigured (missing API key / provider). 500 — Any other unexpected failure.

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error

GET /api/strategies/templates

List Templates

Return all built-in strategy templates.

Returns: {“templates”: {template_id: {name, theme, description, conditions_json, asset_types, timeframe, key_rules}, …}}

Responses

CodeDescription
200Successful Response

GET /api/strategies/templates/{template_id}

Get Template

Return a single strategy template by id.

Parameters

NameInTypeRequiredDescription
template_idpathstringrequired

Responses

CodeDescription
200Successful Response
422Validation Error

DELETE /api/strategies/{strategy_id}

Delete Strategy

Soft-delete a strategy by setting is_active=FALSE. Keeps the row so historical agent_signals.strategy_id references stay intact.

Returns: {“strategy_id”: int, “is_active”: bool, “deleted”: bool}

Parameters

NameInTypeRequiredDescription
strategy_idpathintegerrequired
tenant_idqueryintegeroptional

Responses

CodeDescription
200Successful Response
422Validation Error

PATCH /api/strategies/{strategy_id}/assign-agent

Assign Agent

Set or clear the agent assignment. Pass agent_id=null to unassign.

Parameters

NameInTypeRequiredDescription
strategy_idpathintegerrequired

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error

PATCH /api/strategies/{strategy_id}/toggle

Toggle Strategy

Flip is_active on a strategy. Returns {strategy_id, is_active}.

Parameters

NameInTypeRequiredDescription
strategy_idpathintegerrequired

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error