Harbor SDK
manifest
The manifest is the strategy's declaration. The platform uses it to decide which exchanges, markets, and symbols the strategy may touch, and which fields the create page asks for.
| Field | Form | Role |
|---|---|---|
| name | string | Strategy name shown on the instance |
| version | string such as 1.0.0 | Strategy version |
| ccxtIds | string array, such as ["binance"] | Allowed exchanges |
| markets | ["spot"], ["swap"], or both | Spot, perpetual, or both |
| symbolMode | single, dual, or basket | One symbol, two legs, or a basket |
| symbols | array of Harbor symbols | Required for dual and basket |
| params | parameter definitions | Fields shown when the instance is created |
| permissions | market, order, account | Runtime abilities the strategy will use |
01symbolMode
- single: one symbol, chosen on the create page. symbols may be omitted.
- dual: two legs, for example spot BINANCE:BTC/USDT and perpetual BINANCE:BTC/USDT:USDT. symbols must list both.
- basket: several symbols to rotate or rebalance. symbols is required. The run may use only that list.
02params
Each parameter has type and label. An enum also has options. type is number, string, boolean, or enum. label is the field name on the create page. Use the value the user entered. Do not keep a second hardcoded size that disagrees with it.
const manifest = {
name: "示例",
version: "1.0.0",
ccxtIds: ["binance"],
markets: ["spot"],
symbolMode: "single",
params: {
amount: { type: "number", label: "数量" },
},
permissions: ["market", "order", "account"],
};