POST /v1/strategy-tasks
创建暂停的策略任务
提交完整 spec 与 Idempotency-Key;spec.enabled 必须为 false,随后调用恢复接口开始交易。无需 Lab 开关,仍校验钱包归属与执行能力。需要 copytrade:write scope。
所需 Scope:copytrade:write 请求头
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
Idempotency-Key | string | ✓ | 8-128 character key for this create intent. Reuse the same key and body when retrying. |
请求体 application/json
| 字段 | 类型 | 必填 | 约束 | 说明 |
|---|---|---|---|---|
labels | array<string> | maxItems: 10 | Caller-defined task labels. Up to 10 labels of 1–24 characters. Whitespace is trimmed and duplicates are removed. | |
spec | object | ✓ | apm.task/2 task specification without id. Created paused; call resume to start trading. | |
spec.schema | const "apm.task/2" | ✓ | Task specification format version. | |
spec.id | string | pattern: ^(?:stk_[0-9A-Za-z]{26}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$ | Server-assigned task ID. Client-supplied IDs are ignored on strategy create and update. | |
spec.name | string | ✓ | Task display name; must not be blank. | |
spec.description | string | Optional task description. | ||
spec.schedule | object | Daily buy window; outside it new buys stop while exits remain active. | ||
spec.schedule.timezone | string | ✓ | maxLength: 64 | IANA timezone for the daily buy window. |
spec.schedule.start_minute | integer | ✓ | min: 0, max: 1439 | Inclusive start minute after local midnight, from 0 to 1439. |
spec.schedule.end_minute | integer | ✓ | min: 0, max: 1439 | Exclusive end minute; less than start crosses midnight. Must differ from start. |
spec.labels | array<string> | Task labels. | ||
spec.chain | enum ("solana" | "bsc" | "robinhood") | ✓ | Execution chain; immutable after creation. | |
spec.mode | enum ("live" | "paper") | ✓ | Execution mode: live trading or paper decisions without sending trades. | |
spec.enabled | boolean | ✓ | Must be false on Open API creation. Use pause or resume to change trading state. | |
spec.wallets | array<object> | ✓ | maxItems: 10 | Owned execution wallets; enabled tasks require at least one. |
spec.wallets[].wallet_id | string | ✓ | minLength: 1, maxLength: 128 | Owned wallet ID. |
spec.wallets[].address | string | ✓ | minLength: 1, maxLength: 128 | Wallet address on the task chain. |
spec.strategies | array<object> | ✓ | minItems: 1, maxItems: 8 | Task strategies evaluated in order. |
spec.strategies[].id | string | ✓ | pattern: ^[a-z0-9_]{1,32}$ | Strategy ID, unique within the task. |
spec.strategies[].name | string | minLength: 1, maxLength: 64 | Optional display name. | |
spec.strategies[].enabled | boolean | Whether this rule or strategy is enabled; omitted means enabled. | ||
spec.strategies[].position | object | Position selection and accounting settings. | ||
spec.strategies[].position.source | enum ("strategy" | "wallet") | ✓ | Position source; supported source and basis combinations are capability-checked. | |
spec.strategies[].position.tokens | array<string> | Token addresses included in position selection. | ||
spec.strategies[].position.exclude_tokens | array<string> | Token addresses excluded from position selection. | ||
spec.strategies[].position.basis | enum ("per_buy" | "per_position") | Position accounting basis. | ||
spec.strategies[].entries | array<object> | ✓ | Entry rules evaluated by the executor. | |
spec.strategies[].entries[].id | string | ✓ | minLength: 1, maxLength: 64 | Rule ID, unique within its strategy or task guard list. |
spec.strategies[].entries[].name | string | minLength: 1, maxLength: 64 | Optional display name. | |
spec.strategies[].entries[].enabled | boolean | Whether this rule or strategy is enabled; omitted means enabled. | ||
spec.strategies[].entries[].on | array<object | object | object | object | object | object> | minItems: 1 | Trigger events; required for entry rules. | |
spec.strategies[].entries[].when | object | object | object | object | null | Condition tree; omitted or null means unconditional. | ||
spec.strategies[].entries[].do | object | ✓ | Actions to perform when this rule matches. | |
spec.strategies[].entries[].do.buy | object | Buy action, only in contexts with buy capability. | ||
spec.strategies[].entries[].do.buy.sizing | object | object | object | object | object | ✓ | Buy sizing. | |
spec.strategies[].entries[].do.buy.order | object | object | ✓ | Buy order definition. | |
spec.strategies[].entries[].do.buy.delay_ms | integer | min: 0 | Delay before buying in milliseconds. | |
spec.strategies[].entries[].do.sell | object | Sell action. | ||
spec.strategies[].entries[].do.sell.amount | enum ("all" | "bps_of_remaining" | "bps_of_initial" | "leader_ratio") | ✓ | Sell sizing basis. For exit rules, all and bps_of_initial use this buy. For bps_of_remaining, ordinary exits use the current task position, staged exits use the remaining amount of this buy in the graph, and repeating trailing rules use this buy’s ladder remainder. Position guards support all and bps_of_initial. | |
spec.strategies[].entries[].do.sell.bps | integer | min: 1, max: 10000 | Fraction for bps_of_initial or bps_of_remaining; 10000 is 100%. | |
spec.strategies[].entries[].do.sell.leader_position | enum ("since_task" | "total" | "followed") | Leader position basis; execution support is catalog-defined. | ||
spec.strategies[].entries[].do.sell.order | object | Sell order definition. | ||
spec.strategies[].entries[].do.sell.order.type | const "market" | ✓ | Market order. | |
spec.strategies[].entries[].do.goto | string | pattern: ^[a-z0-9_]{1,32}$ | Later exit stage to enter after this action. | |
spec.strategies[].entries[].do.pause | enum ("strategy" | "task") | Pause target, where supported. | ||
spec.strategies[].entries[].do.notify | object | Notification action, where supported. | ||
spec.strategies[].entries[].do.notify.template | string | ✓ | minLength: 1, maxLength: 128 | Notification template ID. |
spec.strategies[].inherit_exits | const "auto_tpsl" | Legacy syntax; rejected by current execution capabilities. Set explicit exits instead. | ||
spec.strategies[].exits | object | Exit presets, rules and ordered stages for positions opened by this strategy. | ||
spec.strategies[].exits.tpsl_configs | array<object> | minItems: 1, maxItems: 20 | Fixed-price take-profit and stop-loss rows. | |
spec.strategies[].exits.tpsl_configs[].price_percentage | object | ✓ | Price change from the buy price in basis points; negative is stop loss. | |
spec.strategies[].exits.tpsl_configs[].amount_percentage | integer | ✓ | min: 1, max: 10000 | Sell fraction in basis points; 10000 is 100%. |
spec.strategies[].exits.tpsl_configs[].expiration | integer | ✓ | min: 0, max: 9007199254740991 | Lifetime in milliseconds; 0 uses the executor preset default. |
spec.strategies[].exits.tpsl_configs[].goto | string | pattern: ^[a-z0-9_]{1,32}$ | Later exit stage to enter after this action. | |
spec.strategies[].exits.rules | array<object> | minItems: 1, maxItems: 20 | Conditional exit rules. | |
spec.strategies[].exits.rules[].id | string | ✓ | minLength: 1, maxLength: 64 | Stable exit rule ID, unique across all stages. |
spec.strategies[].exits.rules[].name | string | minLength: 1, maxLength: 64 | Optional display name. | |
spec.strategies[].exits.rules[].when | object | object | object | object | ✓ | Condition tree; executable fields depend on the chain capability catalog. | |
spec.strategies[].exits.rules[].do | object | ✓ | Actions to perform when this rule matches. | |
spec.strategies[].exits.rules[].do.buy | object | Buy action, only in contexts with buy capability. | ||
spec.strategies[].exits.rules[].do.buy.sizing | object | object | object | object | object | ✓ | Buy sizing. | |
spec.strategies[].exits.rules[].do.buy.order | object | object | ✓ | Buy order definition. | |
spec.strategies[].exits.rules[].do.buy.delay_ms | integer | min: 0 | Delay before buying in milliseconds. | |
spec.strategies[].exits.rules[].do.sell | object | Sell action. | ||
spec.strategies[].exits.rules[].do.sell.amount | enum ("all" | "bps_of_remaining" | "bps_of_initial" | "leader_ratio") | ✓ | Sell sizing basis. For exit rules, all and bps_of_initial use this buy. For bps_of_remaining, ordinary exits use the current task position, staged exits use the remaining amount of this buy in the graph, and repeating trailing rules use this buy’s ladder remainder. Position guards support all and bps_of_initial. | |
spec.strategies[].exits.rules[].do.sell.bps | integer | min: 1, max: 10000 | Fraction for bps_of_initial or bps_of_remaining; 10000 is 100%. | |
spec.strategies[].exits.rules[].do.sell.leader_position | enum ("since_task" | "total" | "followed") | Leader position basis; execution support is catalog-defined. | ||
spec.strategies[].exits.rules[].do.sell.order | object | Sell order definition. | ||
spec.strategies[].exits.rules[].do.sell.order.type | const "market" | ✓ | Market order. | |
spec.strategies[].exits.rules[].do.goto | string | pattern: ^[a-z0-9_]{1,32}$ | Later exit stage to enter after this action. | |
spec.strategies[].exits.rules[].do.pause | enum ("strategy" | "task") | Pause target, where supported. | ||
spec.strategies[].exits.rules[].do.notify | object | Notification action, where supported. | ||
spec.strategies[].exits.rules[].do.notify.template | string | ✓ | minLength: 1, maxLength: 128 | Notification template ID. |
spec.strategies[].exits.rules[].expiration | integer | ✓ | max: 9007199254740991 | Required positive rule lifetime in milliseconds. |
spec.strategies[].exits.rules[].repeat | const true | Repeat this trailing sell as a ladder tier. Use bps_of_remaining, a distinct activation gain per tier, and no goto or stages. Only the highest reached tier fires. | ||
spec.strategies[].exits.segmented_take_profit_basis | const "remaining" | Sell each price or timeout percentage from the amount remaining in this segmented group. Omit to use the bought amount. | ||
spec.strategies[].exits.segmented_take_profit_configs | array<object> | minItems: 1 | Sequential take-profit segments. | |
spec.strategies[].exits.segmented_take_profit_configs[].price_percentage | integer | ✓ | min: 0, max: 9007199254740991 | Segment price change in basis points. |
spec.strategies[].exits.segmented_take_profit_configs[].amount_percentage | integer | ✓ | min: 0, max: 9007199254740991 | Segment sell fraction in basis points. |
spec.strategies[].exits.segmented_take_profit_configs[].expiration | integer | ✓ | min: 0, max: 9007199254740991 | Lifetime in milliseconds; 0 uses the executor preset default. |
spec.strategies[].exits.segmented_take_profit_configs[].timeout_sell_enabled | boolean | ✓ | Whether to sell when this segment expires. | |
spec.strategies[].exits.segmented_take_profit_configs[].timeout_amount_percentage | integer | ✓ | min: 0, max: 9007199254740991 | Timeout sell fraction in basis points. |
spec.strategies[].exits.trailing_stop_config | object | Trailing stop preset. | ||
spec.strategies[].exits.trailing_stop_config.threshold_bps | integer | ✓ | min: 0, max: 9007199254740991 | Gain needed to activate trailing protection, in basis points. |
spec.strategies[].exits.trailing_stop_config.stop_bps | integer | ✓ | max: 9007199254740991 | Trailing distance below the high, in basis points. |
spec.strategies[].exits.trailing_stop_config.amount_percentage | integer | ✓ | min: 1, max: 10000 | Sell fraction in basis points; 10000 is 100%. |
spec.strategies[].exits.trailing_stop_config.expiration | integer | ✓ | min: 0, max: 9007199254740991 | Lifetime in milliseconds; 0 uses the executor preset default. |
spec.strategies[].exits.trailing_stop_config.goto | string | pattern: ^[a-z0-9_]{1,32}$ | Later exit stage to enter after this action. | |
spec.strategies[].exits.break_even_stop_config | object | Break-even stop preset. | ||
spec.strategies[].exits.break_even_stop_config.threshold_bps | integer | ✓ | min: 1, max: 100000000 | Gain needed to activate break-even protection, in basis points. |
spec.strategies[].exits.break_even_stop_config.lock_bps | integer | ✓ | min: 0, max: 9007199254740991 | Locked gain in basis points; less than threshold_bps. |
spec.strategies[].exits.break_even_stop_config.amount_percentage | integer | ✓ | min: 1, max: 10000 | Sell fraction in basis points; 10000 is 100%. |
spec.strategies[].exits.break_even_stop_config.expiration | integer | ✓ | max: 9007199254740991 | Required positive break-even lifetime in milliseconds. |
spec.strategies[].exits.break_even_stop_config.goto | string | pattern: ^[a-z0-9_]{1,32}$ | Later exit stage to enter after this action. | |
spec.strategies[].exits.stages | array<object> | minItems: 1, maxItems: 7 | Later stages reachable through forward goto references. | |
spec.strategies[].exits.stages[].tpsl_configs | array<object> | minItems: 1, maxItems: 20 | Fixed-price take-profit and stop-loss rows. | |
spec.strategies[].exits.stages[].tpsl_configs[].price_percentage | object | ✓ | Price change from the buy price in basis points; negative is stop loss. | |
spec.strategies[].exits.stages[].tpsl_configs[].amount_percentage | integer | ✓ | min: 1, max: 10000 | Sell fraction in basis points; 10000 is 100%. |
spec.strategies[].exits.stages[].tpsl_configs[].expiration | integer | ✓ | min: 0, max: 9007199254740991 | Lifetime in milliseconds; 0 uses the executor preset default. |
spec.strategies[].exits.stages[].tpsl_configs[].goto | string | pattern: ^[a-z0-9_]{1,32}$ | Later exit stage to enter after this action. | |
spec.strategies[].exits.stages[].rules | array<object> | minItems: 1, maxItems: 20 | Conditional exit rules. | |
spec.strategies[].exits.stages[].rules[].id | string | ✓ | minLength: 1, maxLength: 64 | Stable exit rule ID, unique across all stages. |
spec.strategies[].exits.stages[].rules[].name | string | minLength: 1, maxLength: 64 | Optional display name. | |
spec.strategies[].exits.stages[].rules[].when | object | object | object | object | ✓ | Condition tree; executable fields depend on the chain capability catalog. | |
spec.strategies[].exits.stages[].rules[].do | object | ✓ | Actions to perform when this rule matches. | |
spec.strategies[].exits.stages[].rules[].do.buy | object | Buy action, only in contexts with buy capability. | ||
spec.strategies[].exits.stages[].rules[].do.buy.sizing | object | object | object | object | object | ✓ | Buy sizing. | |
spec.strategies[].exits.stages[].rules[].do.buy.order | object | object | ✓ | Buy order definition. | |
spec.strategies[].exits.stages[].rules[].do.buy.delay_ms | integer | min: 0 | Delay before buying in milliseconds. | |
spec.strategies[].exits.stages[].rules[].do.sell | object | Sell action. | ||
spec.strategies[].exits.stages[].rules[].do.sell.amount | enum ("all" | "bps_of_remaining" | "bps_of_initial" | "leader_ratio") | ✓ | Sell sizing basis. For exit rules, all and bps_of_initial use this buy. For bps_of_remaining, ordinary exits use the current task position, staged exits use the remaining amount of this buy in the graph, and repeating trailing rules use this buy’s ladder remainder. Position guards support all and bps_of_initial. | |
spec.strategies[].exits.stages[].rules[].do.sell.bps | integer | min: 1, max: 10000 | Fraction for bps_of_initial or bps_of_remaining; 10000 is 100%. | |
spec.strategies[].exits.stages[].rules[].do.sell.leader_position | enum ("since_task" | "total" | "followed") | Leader position basis; execution support is catalog-defined. | ||
spec.strategies[].exits.stages[].rules[].do.sell.order | object | Sell order definition. | ||
spec.strategies[].exits.stages[].rules[].do.sell.order.type | const "market" | ✓ | Market order. | |
spec.strategies[].exits.stages[].rules[].do.goto | string | pattern: ^[a-z0-9_]{1,32}$ | Later exit stage to enter after this action. | |
spec.strategies[].exits.stages[].rules[].do.pause | enum ("strategy" | "task") | Pause target, where supported. | ||
spec.strategies[].exits.stages[].rules[].do.notify | object | Notification action, where supported. | ||
spec.strategies[].exits.stages[].rules[].do.notify.template | string | ✓ | minLength: 1, maxLength: 128 | Notification template ID. |
spec.strategies[].exits.stages[].rules[].expiration | integer | ✓ | max: 9007199254740991 | Required positive rule lifetime in milliseconds. |
spec.strategies[].exits.stages[].rules[].repeat | const true | Repeat this trailing sell as a ladder tier. Use bps_of_remaining, a distinct activation gain per tier, and no goto or stages. Only the highest reached tier fires. | ||
spec.strategies[].exits.stages[].segmented_take_profit_basis | const "remaining" | Sell each price or timeout percentage from the amount remaining in this segmented group. Omit to use the bought amount. | ||
spec.strategies[].exits.stages[].segmented_take_profit_configs | array<object> | minItems: 1 | Sequential take-profit segments. | |
spec.strategies[].exits.stages[].segmented_take_profit_configs[].price_percentage | integer | ✓ | min: 0, max: 9007199254740991 | Segment price change in basis points. |
spec.strategies[].exits.stages[].segmented_take_profit_configs[].amount_percentage | integer | ✓ | min: 0, max: 9007199254740991 | Segment sell fraction in basis points. |
spec.strategies[].exits.stages[].segmented_take_profit_configs[].expiration | integer | ✓ | min: 0, max: 9007199254740991 | Lifetime in milliseconds; 0 uses the executor preset default. |
spec.strategies[].exits.stages[].segmented_take_profit_configs[].timeout_sell_enabled | boolean | ✓ | Whether to sell when this segment expires. | |
spec.strategies[].exits.stages[].segmented_take_profit_configs[].timeout_amount_percentage | integer | ✓ | min: 0, max: 9007199254740991 | Timeout sell fraction in basis points. |
spec.strategies[].exits.stages[].trailing_stop_config | object | Trailing stop preset. | ||
spec.strategies[].exits.stages[].trailing_stop_config.threshold_bps | integer | ✓ | min: 0, max: 9007199254740991 | Gain needed to activate trailing protection, in basis points. |
spec.strategies[].exits.stages[].trailing_stop_config.stop_bps | integer | ✓ | max: 9007199254740991 | Trailing distance below the high, in basis points. |
spec.strategies[].exits.stages[].trailing_stop_config.amount_percentage | integer | ✓ | min: 1, max: 10000 | Sell fraction in basis points; 10000 is 100%. |
spec.strategies[].exits.stages[].trailing_stop_config.expiration | integer | ✓ | min: 0, max: 9007199254740991 | Lifetime in milliseconds; 0 uses the executor preset default. |
spec.strategies[].exits.stages[].trailing_stop_config.goto | string | pattern: ^[a-z0-9_]{1,32}$ | Later exit stage to enter after this action. | |
spec.strategies[].exits.stages[].break_even_stop_config | object | Break-even stop preset. | ||
spec.strategies[].exits.stages[].break_even_stop_config.threshold_bps | integer | ✓ | min: 1, max: 100000000 | Gain needed to activate break-even protection, in basis points. |
spec.strategies[].exits.stages[].break_even_stop_config.lock_bps | integer | ✓ | min: 0, max: 9007199254740991 | Locked gain in basis points; less than threshold_bps. |
spec.strategies[].exits.stages[].break_even_stop_config.amount_percentage | integer | ✓ | min: 1, max: 10000 | Sell fraction in basis points; 10000 is 100%. |
spec.strategies[].exits.stages[].break_even_stop_config.expiration | integer | ✓ | max: 9007199254740991 | Required positive break-even lifetime in milliseconds. |
spec.strategies[].exits.stages[].break_even_stop_config.goto | string | pattern: ^[a-z0-9_]{1,32}$ | Later exit stage to enter after this action. | |
spec.strategies[].exits.stages[].id | string | ✓ | pattern: ^[a-z0-9_]{1,32}$ | Stage ID referenced by goto. |
spec.strategies[].exits.stages[].name | string | minLength: 1, maxLength: 64 | Optional display name. | |
spec.strategies[].exits.flash_sell_config | object | Timed sell from buy send time. Either block-gap override selects the delay on our buy receipt. An elapsed deadline sells immediately. Cannot be combined with stages. | ||
spec.strategies[].exits.flash_sell_config.delay_ms | integer | ✓ | min: 0, max: 86400000 | Default delay from sending the buy, in milliseconds. Used for unknown gaps and unset tiers. |
spec.strategies[].exits.flash_sell_config.same_block_delay_ms | integer | min: 0, max: 86400000 | Delay for a buy landing in the same block (Solana slot) as the leader. | |
spec.strategies[].exits.flash_sell_config.next_block_delay_ms | integer | min: 0, max: 86400000 | Delay for a buy landing in the same block (Solana slot) as the leader. | |
spec.strategies[].exits.flash_sell_config.amount_percentage | integer | ✓ | min: 1, max: 10000 | Sell fraction in basis points; 10000 is 100%. |
spec.strategies[].exits.follow_sell | object | Follow leader sells for task positions. | ||
spec.strategies[].exits.follow_sell.sell_amount_mode | enum ("proportional" | "sell-all") | ✓ | Sell proportionally to the leader or sell the full task position. | |
spec.strategies[].exits.follow_sell.scope | enum ("bundle" | "buyer") | For grouped wallet copy, bundle (default) follows any group member using the combined position. buyer follows each target only for the position bought after that target and uses its own position for ratios. Also applies to leader transfer-out sells. Buy rules and other exits are unchanged. | ||
spec.strategies[].exits.follow_sell.sell_all_percentage_enabled | boolean | ✓ | Enable the leader-sale threshold for selling the full position. | |
spec.strategies[].exits.follow_sell.sell_all_percentage | integer | ✓ | min: 0, max: 10000 | Leader-sale threshold in basis points; 10000 means 100%. |
spec.strategies[].exits.dev_sell_config | object | Sell when the token creator sells. | ||
spec.strategies[].exits.dev_sell_config.sell_all_percentage | integer | ✓ | min: 1, max: 10000 | Creator sell threshold in basis points; 10000 is 100%. At or above it, sell all remaining; otherwise follow the creator sell proportion. |
spec.strategies[].exits.migration_sell_config | object | Sell on token migration after a buy on a launch curve. | ||
spec.strategies[].exits.migration_sell_config.sell_percentage | integer | ✓ | min: 1, max: 10000 | Fraction to sell on migration in basis points; 10000 is 100%. |
spec.strategies[].exits.leader_transfer_sell | object | Sell when the leader transfers tokens. | ||
spec.strategies[].exits.leader_transfer_sell.mode | enum ("proportional" | "position") | ✓ | Leader transfer response mode. | |
spec.strategies[].exits.leader_transfer_sell.percentage | integer | min: 1, max: 10000 | Position share to sell in basis points for position mode. | |
spec.strategies[].exits.anti_wick | boolean | Anti-wick. Off (absent or false): on Solana, ordinary take profit, stop loss and the limit buys of the same strategy trigger as soon as a qualifying trade touches the trigger price and then sell or buy at market (trades that do not count: https://apm.fun/docs/copy-trading/strategy-settings#anti-wick), so the fill can differ from the trigger price. A limit buy is not triggered by single trades in the block it was placed in. On: they trigger only if the price still meets the condition at the end of the block (Solana slot), ignoring brief spikes and dips inside it. Segmented take profit, trailing and break-even stops and conditional exits always trigger on the end-of-block price, either way. No effect on BSC and Robinhood. Not an exit by itself: exits still need at least one exit. | ||
spec.strategies[].rules | array<object> | Additional strategy rules; execution support is capability-checked. | ||
spec.strategies[].rules[].id | string | ✓ | minLength: 1, maxLength: 64 | Rule ID, unique within its strategy or task guard list. |
spec.strategies[].rules[].name | string | minLength: 1, maxLength: 64 | Optional display name. | |
spec.strategies[].rules[].enabled | boolean | Whether this rule or strategy is enabled; omitted means enabled. | ||
spec.strategies[].rules[].on | array<object | object | object | object | object | object> | minItems: 1 | Trigger events; required for entry rules. | |
spec.strategies[].rules[].when | object | object | object | object | null | Condition tree; omitted or null means unconditional. | ||
spec.strategies[].rules[].do | object | ✓ | Actions to perform when this rule matches. | |
spec.strategies[].rules[].do.buy | object | Buy action, only in contexts with buy capability. | ||
spec.strategies[].rules[].do.buy.sizing | object | object | object | object | object | ✓ | Buy sizing. | |
spec.strategies[].rules[].do.buy.order | object | object | ✓ | Buy order definition. | |
spec.strategies[].rules[].do.buy.delay_ms | integer | min: 0 | Delay before buying in milliseconds. | |
spec.strategies[].rules[].do.sell | object | Sell action. | ||
spec.strategies[].rules[].do.sell.amount | enum ("all" | "bps_of_remaining" | "bps_of_initial" | "leader_ratio") | ✓ | Sell sizing basis. For exit rules, all and bps_of_initial use this buy. For bps_of_remaining, ordinary exits use the current task position, staged exits use the remaining amount of this buy in the graph, and repeating trailing rules use this buy’s ladder remainder. Position guards support all and bps_of_initial. | |
spec.strategies[].rules[].do.sell.bps | integer | min: 1, max: 10000 | Fraction for bps_of_initial or bps_of_remaining; 10000 is 100%. | |
spec.strategies[].rules[].do.sell.leader_position | enum ("since_task" | "total" | "followed") | Leader position basis; execution support is catalog-defined. | ||
spec.strategies[].rules[].do.sell.order | object | Sell order definition. | ||
spec.strategies[].rules[].do.sell.order.type | const "market" | ✓ | Market order. | |
spec.strategies[].rules[].do.goto | string | pattern: ^[a-z0-9_]{1,32}$ | Later exit stage to enter after this action. | |
spec.strategies[].rules[].do.pause | enum ("strategy" | "task") | Pause target, where supported. | ||
spec.strategies[].rules[].do.notify | object | Notification action, where supported. | ||
spec.strategies[].rules[].do.notify.template | string | ✓ | minLength: 1, maxLength: 128 | Notification template ID. |
spec.strategies[].exec | object | Strategy-level execution overrides. | ||
spec.strategies[].exec.buy | object | Strategy buy overrides applied over task buy settings. | ||
spec.strategies[].exec.buy.anti_mev | boolean | Use the chain-specific protected execution route. On Solana, Anti-MEV fills are slower than normal mode. Below 0.000001 SOL the executor rejects the order with LANDING_FEE_TOO_LOW. From that minimum up to (but below) 0.0001 SOL, only a very few Anti-MEV routes take it. Past your slippage the transaction is dropped and shows as not filled, still with a small on-chain fee. Raise the tip, widen slippage or turn off Anti-MEV. | ||
spec.strategies[].exec.buy.slippage_base | enum ("quote" | "leader_fill") | Buy slippage reference: current quote or leader fill price. | ||
spec.strategies[].exec.buy.retries | integer | min: 0 | Execution retry count; support is capability-checked. | |
spec.strategies[].exec.buy.block_offset | integer | min: 0, max: 6 | BSC snipe anti-sniper fee tier. | |
spec.strategies[].exec.buy.long_offset_sec | integer | min: 0, max: 10 | Robinhood Long.xyz buy tier in seconds. Omit to buy at the end of the tax period. | |
spec.strategies[].exec.buy.fee | object | Normal execution fees and slippage. | ||
spec.strategies[].exec.buy.fee.slippage_bps | integer | ✓ | min: 0, max: 10000 | Slippage in basis points; 100 bps equals 1%. |
spec.strategies[].exec.buy.fee.priority_fee | string | pattern: ^\d+(?:\.\d+)?$ | Priority fee as a decimal string: SOL on Solana, Gwei on EVM. | |
spec.strategies[].exec.buy.fee.landing_fee | object | Landing tip as a decimal string in the chain native token. When the effective Solana fee mode is manual, the priority fee and this tip are used on every landing route without a per-route split; the tip is charged only when the trade succeeds, and some routes do not pass it to the block producer, so only the priority fee ranks there. Solana tip guidance: below 0.0001 SOL, ordinary orders have no acceleration routes and failed orders still pay fees. Anti-MEV orders need at least 0.000001 SOL (LANDING_FEE_TOO_LOW below this), and only a very few protected routes take tips in this range. From 0.0001 to below 0.001 SOL, some routes are available. At 0.001 SOL or above, all routes for the selected mode are available. These tiers do not block saving settings. In auto mode, use the total fee budget to read these tiers. | ||
spec.strategies[].exec.buy.fee.auto_gas | boolean | Solana automatic fee mode. | ||
spec.strategies[].exec.buy.fee.tip_first | boolean | Lower failure cost for Solana automatic buy fees; ignored for sells and manual fees. | ||
spec.strategies[].exec.buy.fee.tip_first_min | boolean | No longer affects execution; retained for compatibility and accepted and read back as before. | ||
spec.strategies[].exec.buy.fee.slippage_sol | object | Solana follow-buy slippage amount in SOL, replacing percentage slippage when present. | ||
spec.strategies[].exec.buy.fee.landing_budget | object | Total fee budget for Solana automatic buy fees. | ||
spec.strategies[].exec.buy.fee.landing_budget.bps | integer | ✓ | min: -9007199254740991, max: 9007199254740991 | Total buy fee ratio in basis points; 100 bps equals 1%. |
spec.strategies[].exec.buy.fee.landing_budget.min | string | pattern: ^\d+(?:\.\d+)?$ | Minimum total buy fee in SOL. | |
spec.strategies[].exec.buy.fee.landing_budget.max | string | pattern: ^\d+(?:\.\d+)?$ | Maximum total buy fee in SOL. | |
spec.strategies[].exec.buy.high_tip | object | High-tip execution overrides. | ||
spec.strategies[].exec.buy.high_tip.enabled | boolean | ✓ | Enable high-tip execution settings. | |
spec.strategies[].exec.buy.high_tip.slippage_bps | integer | min: 0, max: 10000 | Slippage in basis points; 100 bps equals 1%. | |
spec.strategies[].exec.buy.high_tip.priority_fee | string | pattern: ^\d+(?:\.\d+)?$ | Priority fee as a decimal string: SOL on Solana, Gwei on EVM. | |
spec.strategies[].exec.buy.high_tip.landing_fee | string | pattern: ^\d+(?:\.\d+)?$ | Priority fee as a decimal string: SOL on Solana, Gwei on EVM. | |
spec.strategies[].exec.sell | object | Strategy buy overrides applied over task buy settings. | ||
spec.strategies[].exec.sell.anti_mev | boolean | Use the chain-specific protected execution route. On Solana, Anti-MEV fills are slower than normal mode. Below 0.000001 SOL the executor rejects the order with LANDING_FEE_TOO_LOW. From that minimum up to (but below) 0.0001 SOL, only a very few Anti-MEV routes take it. Past your slippage the transaction is dropped and shows as not filled, still with a small on-chain fee. Raise the tip, widen slippage or turn off Anti-MEV. | ||
spec.strategies[].exec.sell.slippage_base | enum ("quote" | "leader_fill") | Buy slippage reference: current quote or leader fill price. | ||
spec.strategies[].exec.sell.retries | integer | min: 0 | Execution retry count; support is capability-checked. | |
spec.strategies[].exec.sell.block_offset | integer | min: 0, max: 6 | BSC snipe anti-sniper fee tier. | |
spec.strategies[].exec.sell.long_offset_sec | integer | min: 0, max: 10 | Robinhood Long.xyz buy tier in seconds. Omit to buy at the end of the tax period. | |
spec.strategies[].exec.sell.fee | object | Normal execution fees and slippage. | ||
spec.strategies[].exec.sell.fee.slippage_bps | integer | ✓ | min: 0, max: 10000 | Slippage in basis points; 100 bps equals 1%. |
spec.strategies[].exec.sell.fee.priority_fee | string | pattern: ^\d+(?:\.\d+)?$ | Priority fee as a decimal string: SOL on Solana, Gwei on EVM. | |
spec.strategies[].exec.sell.fee.landing_fee | object | Landing tip as a decimal string in the chain native token. When the effective Solana fee mode is manual, the priority fee and this tip are used on every landing route without a per-route split; the tip is charged only when the trade succeeds, and some routes do not pass it to the block producer, so only the priority fee ranks there. Solana tip guidance: below 0.0001 SOL, ordinary orders have no acceleration routes and failed orders still pay fees. Anti-MEV orders need at least 0.000001 SOL (LANDING_FEE_TOO_LOW below this), and only a very few protected routes take tips in this range. From 0.0001 to below 0.001 SOL, some routes are available. At 0.001 SOL or above, all routes for the selected mode are available. These tiers do not block saving settings. In auto mode, use the total fee budget to read these tiers. | ||
spec.strategies[].exec.sell.fee.auto_gas | boolean | Solana automatic fee mode. | ||
spec.strategies[].exec.sell.fee.tip_first | boolean | Lower failure cost for Solana automatic buy fees; ignored for sells and manual fees. | ||
spec.strategies[].exec.sell.fee.tip_first_min | boolean | No longer affects execution; retained for compatibility and accepted and read back as before. | ||
spec.strategies[].exec.sell.fee.slippage_sol | object | Solana follow-buy slippage amount in SOL, replacing percentage slippage when present. | ||
spec.strategies[].exec.sell.fee.landing_budget | object | Total fee budget for Solana automatic buy fees. | ||
spec.strategies[].exec.sell.fee.landing_budget.bps | integer | ✓ | min: -9007199254740991, max: 9007199254740991 | Total buy fee ratio in basis points; 100 bps equals 1%. |
spec.strategies[].exec.sell.fee.landing_budget.min | string | pattern: ^\d+(?:\.\d+)?$ | Minimum total buy fee in SOL. | |
spec.strategies[].exec.sell.fee.landing_budget.max | string | pattern: ^\d+(?:\.\d+)?$ | Maximum total buy fee in SOL. | |
spec.strategies[].exec.sell.high_tip | object | High-tip execution overrides. | ||
spec.strategies[].exec.sell.high_tip.enabled | boolean | ✓ | Enable high-tip execution settings. | |
spec.strategies[].exec.sell.high_tip.slippage_bps | integer | min: 0, max: 10000 | Slippage in basis points; 100 bps equals 1%. | |
spec.strategies[].exec.sell.high_tip.priority_fee | string | pattern: ^\d+(?:\.\d+)?$ | Priority fee as a decimal string: SOL on Solana, Gwei on EVM. | |
spec.strategies[].exec.sell.high_tip.landing_fee | string | pattern: ^\d+(?:\.\d+)?$ | Priority fee as a decimal string: SOL on Solana, Gwei on EVM. | |
spec.strategies[].exec.follow_sell | object | Gas overrides for wallet-triggered sells, including leader transfers. Omitted fields inherit sell execution settings. | ||
spec.strategies[].exec.follow_sell.anti_mev | boolean | Use the chain-specific protected execution route. On Solana, Anti-MEV fills are slower than normal mode. Below 0.000001 SOL the executor rejects the order with LANDING_FEE_TOO_LOW. From that minimum up to (but below) 0.0001 SOL, only a very few Anti-MEV routes take it. Past your slippage the transaction is dropped and shows as not filled, still with a small on-chain fee. Raise the tip, widen slippage or turn off Anti-MEV. | ||
spec.strategies[].exec.follow_sell.slippage_base | enum ("quote" | "leader_fill") | Buy slippage reference: current quote or leader fill price. | ||
spec.strategies[].exec.follow_sell.retries | integer | min: 0 | Execution retry count; support is capability-checked. | |
spec.strategies[].exec.follow_sell.block_offset | integer | min: 0, max: 6 | BSC snipe anti-sniper fee tier. | |
spec.strategies[].exec.follow_sell.long_offset_sec | integer | min: 0, max: 10 | Robinhood Long.xyz buy tier in seconds. Omit to buy at the end of the tax period. | |
spec.strategies[].exec.follow_sell.fee | object | Ordinary follow-sell fee overrides. Only priority_fee, landing_fee and auto_gas apply. | ||
spec.strategies[].exec.follow_sell.fee.slippage_bps | integer | min: 0, max: 10000 | Slippage in basis points; 100 bps equals 1%. | |
spec.strategies[].exec.follow_sell.fee.priority_fee | string | pattern: ^\d+(?:\.\d+)?$ | Priority fee as a decimal string: SOL on Solana, Gwei on EVM. | |
spec.strategies[].exec.follow_sell.fee.landing_fee | object | Landing tip as a decimal string in the chain native token. When the effective Solana fee mode is manual, the priority fee and this tip are used on every landing route without a per-route split; the tip is charged only when the trade succeeds, and some routes do not pass it to the block producer, so only the priority fee ranks there. Solana tip guidance: below 0.0001 SOL, ordinary orders have no acceleration routes and failed orders still pay fees. Anti-MEV orders need at least 0.000001 SOL (LANDING_FEE_TOO_LOW below this), and only a very few protected routes take tips in this range. From 0.0001 to below 0.001 SOL, some routes are available. At 0.001 SOL or above, all routes for the selected mode are available. These tiers do not block saving settings. In auto mode, use the total fee budget to read these tiers. | ||
spec.strategies[].exec.follow_sell.fee.auto_gas | boolean | Solana automatic fee mode. | ||
spec.strategies[].exec.follow_sell.fee.tip_first | boolean | Lower failure cost for Solana automatic buy fees; ignored for sells and manual fees. | ||
spec.strategies[].exec.follow_sell.fee.tip_first_min | boolean | No longer affects execution; retained for compatibility and accepted and read back as before. | ||
spec.strategies[].exec.follow_sell.fee.slippage_sol | object | Solana follow-buy slippage amount in SOL, replacing percentage slippage when present. | ||
spec.strategies[].exec.follow_sell.fee.landing_budget | object | Total fee budget for Solana automatic buy fees. | ||
spec.strategies[].exec.follow_sell.fee.landing_budget.bps | integer | ✓ | min: -9007199254740991, max: 9007199254740991 | Total buy fee ratio in basis points; 100 bps equals 1%. |
spec.strategies[].exec.follow_sell.fee.landing_budget.min | string | pattern: ^\d+(?:\.\d+)?$ | Minimum total buy fee in SOL. | |
spec.strategies[].exec.follow_sell.fee.landing_budget.max | string | pattern: ^\d+(?:\.\d+)?$ | Maximum total buy fee in SOL. | |
spec.strategies[].exec.follow_sell.high_tip | object | Follow-sell high-tip overrides. Omit enabled to inherit the effective sell switch. | ||
spec.strategies[].exec.follow_sell.high_tip.enabled | boolean | Enable high-tip execution settings. | ||
spec.strategies[].exec.follow_sell.high_tip.slippage_bps | integer | min: 0, max: 10000 | Slippage in basis points; 100 bps equals 1%. | |
spec.strategies[].exec.follow_sell.high_tip.priority_fee | object | Priority fee as a decimal string: SOL on Solana, Gwei on EVM. | ||
spec.strategies[].exec.follow_sell.high_tip.landing_fee | object | Landing tip as a decimal string in the chain native token. Solana tip guidance: below 0.0001 SOL, ordinary orders have no acceleration routes and failed orders still pay fees. Anti-MEV orders need at least 0.000001 SOL (LANDING_FEE_TOO_LOW below this), and only a very few protected routes take tips in this range. From 0.0001 to below 0.001 SOL, some routes are available. At 0.001 SOL or above, all routes for the selected mode are available. These tiers do not block saving settings. In manual mode, use the higher of the normal and high-tip values to read these tiers. | ||
spec.on_conflict | enum ("first_match" | "all") | Matching policy; current execution supports first_match only. | ||
spec.guards | object | Task-wide position and task rules. | ||
spec.guards.positions | array<object> | Rules applied across all task positions. | ||
spec.guards.positions[].id | string | ✓ | minLength: 1, maxLength: 64 | Stable exit rule ID, unique across all stages. |
spec.guards.positions[].name | object | Optional rule display name. | ||
spec.guards.positions[].when | object | object | object | object | ✓ | Condition tree; executable fields depend on the chain capability catalog. | |
spec.guards.positions[].do | object | ✓ | Action when the condition holds; supported actions depend on the rule context. | |
spec.guards.positions[].expiration | integer | max: 9007199254740991 | Lifetime in milliseconds; 0 uses the executor preset default. | |
spec.guards.task | array<object> | At most one rule per trigger. For wallet_trade entries, use buy_filled with task.follow_count gte N and pause: task to pause new buys after N distinct successfully followed transactions. position_closed uses task.loss_streak. order_failed uses task.buy_fail_streak gte 1..100 with within_sec 60..86400 in whole minutes; broadcast slippage failures count. | ||
spec.guards.task[].id | string | ✓ | minLength: 1, maxLength: 64 | Rule ID, unique within its strategy or task guard list. |
spec.guards.task[].name | string | minLength: 1, maxLength: 64 | Optional display name. | |
spec.guards.task[].enabled | boolean | Whether this rule or strategy is enabled; omitted means enabled. | ||
spec.guards.task[].on | array<object | object | object | object | object | object> | minItems: 1 | Trigger events; required for entry rules. | |
spec.guards.task[].when | object | object | object | object | null | Condition tree; omitted or null means unconditional. | ||
spec.guards.task[].do | object | ✓ | Actions to perform when this rule matches. | |
spec.guards.task[].do.buy | object | Buy action, only in contexts with buy capability. | ||
spec.guards.task[].do.buy.sizing | object | object | object | object | object | ✓ | Buy sizing. | |
spec.guards.task[].do.buy.order | object | object | ✓ | Buy order definition. | |
spec.guards.task[].do.buy.delay_ms | integer | min: 0 | Delay before buying in milliseconds. | |
spec.guards.task[].do.sell | object | Sell action. | ||
spec.guards.task[].do.sell.amount | enum ("all" | "bps_of_remaining" | "bps_of_initial" | "leader_ratio") | ✓ | Sell sizing basis. For exit rules, all and bps_of_initial use this buy. For bps_of_remaining, ordinary exits use the current task position, staged exits use the remaining amount of this buy in the graph, and repeating trailing rules use this buy’s ladder remainder. Position guards support all and bps_of_initial. | |
spec.guards.task[].do.sell.bps | integer | min: 1, max: 10000 | Fraction for bps_of_initial or bps_of_remaining; 10000 is 100%. | |
spec.guards.task[].do.sell.leader_position | enum ("since_task" | "total" | "followed") | Leader position basis; execution support is catalog-defined. | ||
spec.guards.task[].do.sell.order | object | Sell order definition. | ||
spec.guards.task[].do.sell.order.type | const "market" | ✓ | Market order. | |
spec.guards.task[].do.goto | string | pattern: ^[a-z0-9_]{1,32}$ | Later exit stage to enter after this action. | |
spec.guards.task[].do.pause | enum ("strategy" | "task") | Pause target, where supported. | ||
spec.guards.task[].do.notify | object | Notification action, where supported. | ||
spec.guards.task[].do.notify.template | string | ✓ | minLength: 1, maxLength: 128 | Notification template ID. |
spec.limits | object | Task trading limits; execution support is capability-checked. | ||
spec.limits.max_buy_native | object | Maximum buy amount in native token units. | ||
spec.limits.max_buys_per_day | integer | min: 1 | Maximum daily buys; execution support is capability-checked. | |
spec.exec | object | ✓ | Task-level buy and sell execution settings. | |
spec.exec.min_sell_usd | string | pattern: ^0*(?:0\.0?[1-9]\d*|[1-9]\d{0,4}(?:\.\d+)?|100000(?:\.0+)?)$ | Minimum automatic sell value in USD, a decimal string from 0.01 to 100000 inclusive. A smaller sell is enlarged up to the available position. A remainder worth less than the higher of this minimum and the sell cost is included. Omit for remainder cleanup only, using $1 and the sell cost. EVM flash sells before the buy receipt may fall below the minimum. | |
spec.exec.retain_bps | integer | min: 1, max: 9999 | Share of each new buy retained from automatic sells (including stop loss), in integer basis points (1–9999, 100 bps = 1%). Omit for no retention. Changing the share affects future buys. Manual sells can use the retained tokens. An EVM task flash sell sent before the buy receipt approximates the reserve. | |
spec.exec.buy | object | ✓ | Base buy execution settings. | |
spec.exec.buy.anti_mev | boolean | Use the chain-specific protected execution route. On Solana, Anti-MEV fills are slower than normal mode. Below 0.000001 SOL the executor rejects the order with LANDING_FEE_TOO_LOW. From that minimum up to (but below) 0.0001 SOL, only a very few Anti-MEV routes take it. Past your slippage the transaction is dropped and shows as not filled, still with a small on-chain fee. Raise the tip, widen slippage or turn off Anti-MEV. | ||
spec.exec.buy.slippage_base | enum ("quote" | "leader_fill") | Buy slippage reference: current quote or leader fill price. | ||
spec.exec.buy.retries | integer | min: 0 | Execution retry count; support is capability-checked. | |
spec.exec.buy.block_offset | integer | min: 0, max: 6 | BSC snipe anti-sniper fee tier. | |
spec.exec.buy.long_offset_sec | integer | min: 0, max: 10 | Robinhood Long.xyz buy tier in seconds. Omit to buy at the end of the tax period. | |
spec.exec.buy.fee | object | Normal execution fees and slippage. | ||
spec.exec.buy.fee.slippage_bps | integer | ✓ | min: 0, max: 10000 | Slippage in basis points; 100 bps equals 1%. |
spec.exec.buy.fee.priority_fee | string | pattern: ^\d+(?:\.\d+)?$ | Priority fee as a decimal string: SOL on Solana, Gwei on EVM. | |
spec.exec.buy.fee.landing_fee | object | Landing tip as a decimal string in the chain native token. When the effective Solana fee mode is manual, the priority fee and this tip are used on every landing route without a per-route split; the tip is charged only when the trade succeeds, and some routes do not pass it to the block producer, so only the priority fee ranks there. Solana tip guidance: below 0.0001 SOL, ordinary orders have no acceleration routes and failed orders still pay fees. Anti-MEV orders need at least 0.000001 SOL (LANDING_FEE_TOO_LOW below this), and only a very few protected routes take tips in this range. From 0.0001 to below 0.001 SOL, some routes are available. At 0.001 SOL or above, all routes for the selected mode are available. These tiers do not block saving settings. In auto mode, use the total fee budget to read these tiers. | ||
spec.exec.buy.fee.auto_gas | boolean | Solana automatic fee mode. | ||
spec.exec.buy.fee.tip_first | boolean | Lower failure cost for Solana automatic buy fees; ignored for sells and manual fees. | ||
spec.exec.buy.fee.tip_first_min | boolean | No longer affects execution; retained for compatibility and accepted and read back as before. | ||
spec.exec.buy.fee.slippage_sol | object | Solana follow-buy slippage amount in SOL, replacing percentage slippage when present. | ||
spec.exec.buy.fee.landing_budget | object | Total fee budget for Solana automatic buy fees. | ||
spec.exec.buy.fee.landing_budget.bps | integer | ✓ | min: -9007199254740991, max: 9007199254740991 | Total buy fee ratio in basis points; 100 bps equals 1%. |
spec.exec.buy.fee.landing_budget.min | string | pattern: ^\d+(?:\.\d+)?$ | Minimum total buy fee in SOL. | |
spec.exec.buy.fee.landing_budget.max | string | pattern: ^\d+(?:\.\d+)?$ | Maximum total buy fee in SOL. | |
spec.exec.buy.high_tip | object | High-tip execution overrides. | ||
spec.exec.buy.high_tip.enabled | boolean | ✓ | Enable high-tip execution settings. | |
spec.exec.buy.high_tip.slippage_bps | integer | min: 0, max: 10000 | Slippage in basis points; 100 bps equals 1%. | |
spec.exec.buy.high_tip.priority_fee | string | pattern: ^\d+(?:\.\d+)?$ | Priority fee as a decimal string: SOL on Solana, Gwei on EVM. | |
spec.exec.buy.high_tip.landing_fee | string | pattern: ^\d+(?:\.\d+)?$ | Priority fee as a decimal string: SOL on Solana, Gwei on EVM. | |
spec.exec.sell | object | Strategy buy overrides applied over task buy settings. | ||
spec.exec.sell.anti_mev | boolean | Use the chain-specific protected execution route. On Solana, Anti-MEV fills are slower than normal mode. Below 0.000001 SOL the executor rejects the order with LANDING_FEE_TOO_LOW. From that minimum up to (but below) 0.0001 SOL, only a very few Anti-MEV routes take it. Past your slippage the transaction is dropped and shows as not filled, still with a small on-chain fee. Raise the tip, widen slippage or turn off Anti-MEV. | ||
spec.exec.sell.slippage_base | enum ("quote" | "leader_fill") | Buy slippage reference: current quote or leader fill price. | ||
spec.exec.sell.retries | integer | min: 0 | Execution retry count; support is capability-checked. | |
spec.exec.sell.block_offset | integer | min: 0, max: 6 | BSC snipe anti-sniper fee tier. | |
spec.exec.sell.long_offset_sec | integer | min: 0, max: 10 | Robinhood Long.xyz buy tier in seconds. Omit to buy at the end of the tax period. | |
spec.exec.sell.fee | object | Normal execution fees and slippage. | ||
spec.exec.sell.fee.slippage_bps | integer | ✓ | min: 0, max: 10000 | Slippage in basis points; 100 bps equals 1%. |
spec.exec.sell.fee.priority_fee | string | pattern: ^\d+(?:\.\d+)?$ | Priority fee as a decimal string: SOL on Solana, Gwei on EVM. | |
spec.exec.sell.fee.landing_fee | object | Landing tip as a decimal string in the chain native token. When the effective Solana fee mode is manual, the priority fee and this tip are used on every landing route without a per-route split; the tip is charged only when the trade succeeds, and some routes do not pass it to the block producer, so only the priority fee ranks there. Solana tip guidance: below 0.0001 SOL, ordinary orders have no acceleration routes and failed orders still pay fees. Anti-MEV orders need at least 0.000001 SOL (LANDING_FEE_TOO_LOW below this), and only a very few protected routes take tips in this range. From 0.0001 to below 0.001 SOL, some routes are available. At 0.001 SOL or above, all routes for the selected mode are available. These tiers do not block saving settings. In auto mode, use the total fee budget to read these tiers. | ||
spec.exec.sell.fee.auto_gas | boolean | Solana automatic fee mode. | ||
spec.exec.sell.fee.tip_first | boolean | Lower failure cost for Solana automatic buy fees; ignored for sells and manual fees. | ||
spec.exec.sell.fee.tip_first_min | boolean | No longer affects execution; retained for compatibility and accepted and read back as before. | ||
spec.exec.sell.fee.slippage_sol | object | Solana follow-buy slippage amount in SOL, replacing percentage slippage when present. | ||
spec.exec.sell.fee.landing_budget | object | Total fee budget for Solana automatic buy fees. | ||
spec.exec.sell.fee.landing_budget.bps | integer | ✓ | min: -9007199254740991, max: 9007199254740991 | Total buy fee ratio in basis points; 100 bps equals 1%. |
spec.exec.sell.fee.landing_budget.min | string | pattern: ^\d+(?:\.\d+)?$ | Minimum total buy fee in SOL. | |
spec.exec.sell.fee.landing_budget.max | string | pattern: ^\d+(?:\.\d+)?$ | Maximum total buy fee in SOL. | |
spec.exec.sell.high_tip | object | High-tip execution overrides. | ||
spec.exec.sell.high_tip.enabled | boolean | ✓ | Enable high-tip execution settings. | |
spec.exec.sell.high_tip.slippage_bps | integer | min: 0, max: 10000 | Slippage in basis points; 100 bps equals 1%. | |
spec.exec.sell.high_tip.priority_fee | string | pattern: ^\d+(?:\.\d+)?$ | Priority fee as a decimal string: SOL on Solana, Gwei on EVM. | |
spec.exec.sell.high_tip.landing_fee | string | pattern: ^\d+(?:\.\d+)?$ | Priority fee as a decimal string: SOL on Solana, Gwei on EVM. | |
spec.exec.follow_sell | object | Gas overrides for wallet-triggered sells, including leader transfers. Omitted fields inherit sell execution settings. | ||
spec.exec.follow_sell.anti_mev | boolean | Use the chain-specific protected execution route. On Solana, Anti-MEV fills are slower than normal mode. Below 0.000001 SOL the executor rejects the order with LANDING_FEE_TOO_LOW. From that minimum up to (but below) 0.0001 SOL, only a very few Anti-MEV routes take it. Past your slippage the transaction is dropped and shows as not filled, still with a small on-chain fee. Raise the tip, widen slippage or turn off Anti-MEV. | ||
spec.exec.follow_sell.slippage_base | enum ("quote" | "leader_fill") | Buy slippage reference: current quote or leader fill price. | ||
spec.exec.follow_sell.retries | integer | min: 0 | Execution retry count; support is capability-checked. | |
spec.exec.follow_sell.block_offset | integer | min: 0, max: 6 | BSC snipe anti-sniper fee tier. | |
spec.exec.follow_sell.long_offset_sec | integer | min: 0, max: 10 | Robinhood Long.xyz buy tier in seconds. Omit to buy at the end of the tax period. | |
spec.exec.follow_sell.fee | object | Ordinary follow-sell fee overrides. Only priority_fee, landing_fee and auto_gas apply. | ||
spec.exec.follow_sell.fee.slippage_bps | integer | min: 0, max: 10000 | Slippage in basis points; 100 bps equals 1%. | |
spec.exec.follow_sell.fee.priority_fee | string | pattern: ^\d+(?:\.\d+)?$ | Priority fee as a decimal string: SOL on Solana, Gwei on EVM. | |
spec.exec.follow_sell.fee.landing_fee | object | Landing tip as a decimal string in the chain native token. When the effective Solana fee mode is manual, the priority fee and this tip are used on every landing route without a per-route split; the tip is charged only when the trade succeeds, and some routes do not pass it to the block producer, so only the priority fee ranks there. Solana tip guidance: below 0.0001 SOL, ordinary orders have no acceleration routes and failed orders still pay fees. Anti-MEV orders need at least 0.000001 SOL (LANDING_FEE_TOO_LOW below this), and only a very few protected routes take tips in this range. From 0.0001 to below 0.001 SOL, some routes are available. At 0.001 SOL or above, all routes for the selected mode are available. These tiers do not block saving settings. In auto mode, use the total fee budget to read these tiers. | ||
spec.exec.follow_sell.fee.auto_gas | boolean | Solana automatic fee mode. | ||
spec.exec.follow_sell.fee.tip_first | boolean | Lower failure cost for Solana automatic buy fees; ignored for sells and manual fees. | ||
spec.exec.follow_sell.fee.tip_first_min | boolean | No longer affects execution; retained for compatibility and accepted and read back as before. | ||
spec.exec.follow_sell.fee.slippage_sol | object | Solana follow-buy slippage amount in SOL, replacing percentage slippage when present. | ||
spec.exec.follow_sell.fee.landing_budget | object | Total fee budget for Solana automatic buy fees. | ||
spec.exec.follow_sell.fee.landing_budget.bps | integer | ✓ | min: -9007199254740991, max: 9007199254740991 | Total buy fee ratio in basis points; 100 bps equals 1%. |
spec.exec.follow_sell.fee.landing_budget.min | string | pattern: ^\d+(?:\.\d+)?$ | Minimum total buy fee in SOL. | |
spec.exec.follow_sell.fee.landing_budget.max | string | pattern: ^\d+(?:\.\d+)?$ | Maximum total buy fee in SOL. | |
spec.exec.follow_sell.high_tip | object | Follow-sell high-tip overrides. Omit enabled to inherit the effective sell switch. | ||
spec.exec.follow_sell.high_tip.enabled | boolean | Enable high-tip execution settings. | ||
spec.exec.follow_sell.high_tip.slippage_bps | integer | min: 0, max: 10000 | Slippage in basis points; 100 bps equals 1%. | |
spec.exec.follow_sell.high_tip.priority_fee | object | Priority fee as a decimal string: SOL on Solana, Gwei on EVM. | ||
spec.exec.follow_sell.high_tip.landing_fee | object | Landing tip as a decimal string in the chain native token. Solana tip guidance: below 0.0001 SOL, ordinary orders have no acceleration routes and failed orders still pay fees. Anti-MEV orders need at least 0.000001 SOL (LANDING_FEE_TOO_LOW below this), and only a very few protected routes take tips in this range. From 0.0001 to below 0.001 SOL, some routes are available. At 0.001 SOL or above, all routes for the selected mode are available. These tiers do not block saving settings. In manual mode, use the higher of the normal and high-tip values to read these tiers. | ||
spec.exec.usdc | boolean | Solana USDC trading switch. New Solana tasks default to false; omitted updates preserve the stored value. | ||
spec.meta | object | Task source and template metadata. | ||
spec.meta.template | string | minLength: 1, maxLength: 64 | Template identifier. pump marks a Pump App copy-trading task. Use wallet_trade triggers with fomo_pairs containing both EVM and Solana addresses for Pump bridge buys on Robinhood and BSC. | |
spec.meta.created_via | enum ("web" | "extension" | "telegram" | "openapi" | "system") | Client channel that created the task. | ||
spec.meta.system | const "auto_tpsl" | System template marker; execution support is capability-checked. |
响应
201 — Committed
| 字段 | 类型 | 必填 | 约束 | 说明 |
|---|---|---|---|---|
data | object | ✓ | Response payload. | |
data.labels | array<string> | default: [] | The caller's task labels. Empty if none are set. | |
data.task_id | string | ✓ | Strategy task ID. | |
data.name | string | ✓ | Task display name. | |
data.chain | string | ✓ | Execution chain. | |
data.status | enum ("active" | "paused" | "deleted") | ✓ | Requested task state; engine reports synchronization separately. deleted appears only in the DELETE response. | |
data.version | number | ✓ | Current version, also returned as the ETag. | |
data.spec | object | ✓ | Stored apm.task/2 specification, including the server-assigned id. | |
data.engine | object | null | ✓ | Engine synchronization state, or null when absent. | |
data.engine.applied_version | number | null | ✓ | Last acknowledged version, or null before the first acknowledgement. | |
data.engine.sync_state | string | ✓ | Engine synchronization state: syncing, synced or failed. | |
data.engine.error_code | string | Engine rejection code, when present. | ||
data.engine.warning_code | string | The config has taken effect. prior_buyers_unavailable means listed wallet history is still loading. prior_buyers_fast_unavailable means updates for some listed wallets are delayed. The task may miss purchases those wallets make just before the leader buys. This warning does not reject buys. prior_buyers_over_limit means the account exceeds the wallet limit on this chain. Purchases by wallets beyond the limit are not checked. prior_buyers_history_truncated means a listed wallet bought more than 5,000 distinct tokens inside the window. Only its most recent 5,000 are checked. The task keeps running. | ||
data.engine.updated_at | string | ✓ | Engine state update time in RFC 3339 UTC. | |
data.run_state | object | ✓ | Effective task runtime state. | |
data.run_state.state | enum ("running" | "buy_paused" | "stopped") | ✓ | Effective runtime state: running, buy_paused or stopped. | |
data.run_state.reason | string | null | ✓ | Known buy-pause reasons: account, loss_streak, creator_limit, leader_token_limit, follow_count, buy_fail_streak, funding_low. Buys pause while sells and exits continue. For run-bound pauses, reopen to start a new run: follow, loss and creator counts reset; leader distinct-token counts persist, so raise the limit or disable that filter before reopening. Known stop reasons: low_balance, inactivity, loss_streak, creator_limit. Null means no recorded reason or user stop; unknown reasons are preserved. | |
data.buy_paused | object | null | ✓ | Buy pause for this run, or null. | |
data.buy_paused.rule_id | string | ✓ | Rule that paused buying. | |
data.buy_paused.observed | object | ✓ | Observed values that triggered the pause. | |
data.buy_paused.at | string | ✓ | Buy pause time in RFC 3339 UTC. | |
data.funding_low_since | string | null | ✓ | Start of the low-funding interval in RFC 3339 UTC, or null. | |
data.deactivation_close_position | boolean | ✓ | Whether the latest pause or delete requested closing positions. | |
data.created_at | string | ✓ | Creation time in RFC 3339 UTC. | |
data.updated_at | string | ✓ | Last update time in RFC 3339 UTC. | |
meta | object | ✓ | Request id, plus paging fields when this operation is a list. | |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. | |
meta.persistence | enum ("committed") | ✓ | The write has been committed to storage. | |
warnings | array<object | object> | Advisory fees from the saved configuration. The write succeeded. No confirmation or retry is needed. Empty when no threshold is exceeded. |
400 — validation_error / unsupported_chain_feature / wallet_unavailable
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
401 — unauthorized (missing/invalid/revoked/expired Bearer token)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
403 — insufficient_scope / ip_not_allowed
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
404 — not_found
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
409 — not_paused / invalid_state / idempotency_conflict
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
412 — version_conflict
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
428 — precondition_required
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
429 — rate_limited (Retry-After response header set)
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
500 — internal_error
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
error | object | ✓ | Why the request failed. |
error.code | string | ✓ | Stable machine-readable error code. |
error.message | string | ✓ | Human-readable explanation of the error. |
error.total | number | Number of distinct blacklisted wallets the account would have on this chain after saving. | |
error.limit | number | Maximum distinct blacklisted wallets per account on this chain. | |
error.details | array<object> | Only present when at least one field-level validation issue exists. | |
error.details[].field | string | ✓ | Request field this issue refers to, or a dotted path such as buy.amount. |
error.details[].reason | string | ✓ | Why that field was rejected. |
error.details[].code | string | Stable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change. | |
meta | object | ✓ | Request id for this failure. |
meta.request_id | string | ✓ | Id of this request. Also sent as the X-Request-Id response header. |
请求示例
curl -X POST "https://api.apm.fun/v1/strategy-tasks" \
-H "Authorization: Bearer apm_live_<prefix>.<secret>" \
-H "Idempotency-Key: a-client-generated-key" \
-H "Content-Type: application/json" \
-d '{
"spec": {
"schema": "apm.task/2",
"name": "X signal with token filters",
"chain": "bsc",
"mode": "live",
"enabled": false,
"wallets": [
{
"wallet_id": "0x1111111111111111111111111111111111111111",
"address": "0x1111111111111111111111111111111111111111"
}
],
"strategies": [
{
"id": "s1",
"entries": [
{
"id": "buy",
"on": [
{
"kind": "social_mention",
"sources": [
{
"platform": "x",
"source_id": "alphacaller"
}
]
}
],
"when": {
"id": "c0",
"all": [
{
"id": "c1",
"f": "signal.ca_count",
"op": "is",
"v": 1
},
{
"id": "c2",
"f": "signal.age_sec",
"op": "lte",
"v": 30
},
{
"id": "c3",
"f": "token.market_cap_usd",
"op": "lte",
"v": "500000"
},
{
"id": "c4",
"f": "token.buy_tax_bps",
"op": "lte",
"v": 1000
},
{
"id": "c5",
"f": "token.sell_tax_bps",
"op": "lte",
"v": 1000
},
{
"id": "c6",
"f": "token.age_sec",
"op": "lte",
"v": 86400
},
{
"id": "c7",
"f": "token.address",
"op": "nin",
"v": [
"0x2222222222222222222222222222222222222222"
]
}
]
},
"do": {
"buy": {
"sizing": {
"mode": "fixed",
"amount": "0.05"
},
"order": {
"type": "market"
}
}
}
}
]
}
],
"exec": {
"buy": {
"fee": {
"slippage_bps": 1500
}
}
}
}
}' 响应示例 201
{
"data": {
"labels": [],
"task_id": "cfg_8f2a1c9b",
"name": "string",
"chain": "string",
"status": "active",
"version": 0,
"spec": {},
"engine": {
"applied_version": null,
"sync_state": "string",
"error_code": "string",
"warning_code": "string",
"updated_at": "string"
},
"run_state": {
"state": "running",
"reason": null
},
"buy_paused": {
"rule_id": "cfg_8f2a1c9b",
"observed": {},
"at": "string"
},
"funding_low_since": null,
"deactivation_close_position": true,
"created_at": "string",
"updated_at": "string"
},
"meta": {
"request_id": "cfg_8f2a1c9b",
"persistence": "committed"
},
"warnings": [
{
"code": "high_fee",
"path": "string",
"side": "buy",
"item": "priority_fee",
"amount": "0.05",
"threshold": "string",
"unit": "SOL"
}
]
}