Type/to search
Getting Started
Platform Basics
Writing Strategies
Development Tools
Backtesting System
Advanced Topics
Data and Research
Extended API Interface
AI Integration
Create ApiKey
Authentication Methods
Extended API Interface Details
GetAccount
GetNodeList
DeleteNode
GetExchangeList
GetPlatformList
GetStrategyList
GetRobotGroupList
GetRobotList
GetRobotDetail
GetRobotLogs
NewRobot
RestartRobot
StopRobot
CommandRobot
DeleteRobot
PluginRun
pub
Extended API Interface Return Codes
Live Trading Status Codes

Queries strategies by scope, type, language, keyword and other conditions.

Examples

Get your first 10 strategies with positional arguments, or all your Rust strategies with named arguments.

python
# api() is the function in the Python example on the signature authentication page r = api('GetStrategyList', 0, 10, -3, -1, -1, '') # your first 10 strategies r = api('GetStrategyList', strategyType=-3, language=7) # all your Rust strategies for s in r['data']['result']['strategies']: print(s['id'], s['name'])

Returns

TypeDescription

object

On success data.result holds the strategy count all and the strategy array strategies; fields are in the attributes table below.

Arguments

NameTypeRequiredDescription

offset

number

Yes

Paging offset.

length

number

Yes

Page size; less than or equal to 0 returns all.

strategyType

number

Yes

Scope, e.g. -3 for only your own strategies; values are listed in the remarks.

category

number

Yes

Strategy type: -1 all, 0 normal strategy, 20 template library, 21 trading plugin.

language

number

Yes

Programming language, -1 for all; values are listed in the remarks.

kw

string

Yes

Keyword matched fuzzily against strategy names, several words separated by spaces; an empty string means no filter. Starting with id: queries by strategy ID, e.g. id:123,456.

groupId

number

No

Strategy group: -1 all (default), 0 ungrouped, greater than 0 a specific group. Applies only to your own strategies.

orderBy

string

No

Sort field: name, last_modified or date; append asc for ascending (descending by default); an empty string is the default order.

Attributes

NameTypeDescription

all

number

Total number of matching strategies.

strategies

array

Array of strategies.

strategies[].id

number

Strategy ID, the strategy of a robot configuration.

strategies[].category

number

Strategy type, same values as the category argument.

strategies[].language

number

Programming language, same values as the language argument.

Remarks

There is no needArgs parameter: passing an extra argument after category as old documentation did shifts the following arguments. Pass the arguments in the order above, or by name.

Positional calls accept only 0, 6, 7 or 8 arguments. With no arguments (args is []) the server fills in (-1, -1, -1, -1, 1, ""), so language is 1 and only Python strategies are returned; to get all languages pass language as -1, or pass arguments by name (then language defaults to -1).

Parameter values

strategyType (scope):

ValueMeaning
-1Your own and rented strategies (official strategies included)
0Your own and rented strategies (official strategies excluded)
-3Only your own strategies
-6Only rented strategies (expired ones included)
-4Official strategies
-2Public and paid strategies in the strategy square
1Published strategies
2Strategies pending review

category (strategy type): -1 all, 0 normal strategy, 20 template library, 21 trading plugin.

language (programming language):

ValueMeaning
-1All languages
0JavaScript
1Python
3A discontinued strategy type that appears only in existing strategies
4My language
5PINE
6Workflow
7Rust

Example response
json
{ "code": 0, "data": { "result": { "all": 123, "strategies": [{ "category": 0, "date": "2024-11-10 20:40:04", "description": "", "forked": 0, "hits": 0, "id": 123, "is_buy": false, "is_owner": false, "language": 0, "last_modified": "2024-11-11 17:23:52", "name": "HedgeGridStrategy", "profile": { "avatar": "...", "nickname": "abc", "uid": "4ed225440db1eda23fe05ed10184113e" }, "public": 0, "tags": "", "uid": "4ed225440db1eda23fe05ed10184113e", "username": "abc" }] }, "error": null } }