Strategies¶
List Strategies¶
GET /strategies
Every stored strategy, each with any problem it has, such as an index that has gone. A strategy the server cannot read is left out and counted, as the index list does.
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | StrategyCollection |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Create Strategy¶
POST /strategies
Save a new strategy. An id already taken is refused with a 409:
replacing a strategy is PUT /strategies/{strategy_id}.
Request body: StrategyDocument
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | SavedStrategy |
| 409 | A strategy with this id already exists. |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Validate¶
POST /strategies/validate
Check a strategy without saving it: the findings a save would refuse it with, each at its field's path.
Request body: StrategyDocument
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | ValidationReport |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Get Strategy¶
GET /strategies/{strategy_id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
strategy_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | StoredStrategy |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Put Strategy¶
PUT /strategies/{strategy_id}
Save a strategy under its id, replacing any stored there.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
strategy_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
Request body: StrategyDocument
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | SavedStrategy |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.
Delete Strategy¶
DELETE /strategies/{strategy_id}
Remove a stored strategy, with its saved run and every result of its backtests. One the server cannot read can still be deleted.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
strategy_id |
path | string | yes | Letters, digits, dash and underscore; up to 64. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Successful Response | StrategyDeletion |
Also the shared errors: 400, 401, 404, 405, 422, 500, 501, 503.