当前位置: 首页 > Skill >

Superior Trade (Deprecated)

Superior Trade (Deprecated)

Superior Trade (Deprecated)

已弃用 — 该技能已迁移。请改为从 @superior-ai/superiortrade 安装最新版本。访问 https://clawhub.ai/superior-ai/superiortrade

1.5.4 2026.11.19 973
获取Skill文件查看使用说明
作 者:周辰 许可证: 更新时间:2026.11.19
本文目录展开

Superior Trade API

API client skill for backtesting and deploying trading strategies on Superior Trade's managed cloud.

Base URL: https://api.superior.trade
Auth: x-api-key header on all protected endpoints
Docs: GET /docs (Swagger UI), GET /openapi.json (OpenAPI spec)

Setup

Getting an API Key

IMPORTANT: The correct URL is https://account.superior.trade — NOT app.superior.trade. Never send users to app.superior.trade.

Use SUPERIOR_TRADE_API_KEY from the environment or credential manager — never ask users to paste it into chat.

When a user needs to get their API key:

  1. Go to https://account.superior.trade
  2. Sign up (email or wallet)
  3. Complete onboarding — a trading wallet is created for you and shown on the dashboard
  4. Deposit USDC to your wallet address (on Arbitrum)
  5. Create an API key (st_live_...) from the dashboard
  6. Add it as SUPERIOR_TRADE_API_KEY in your agent's environment/credential settings — do not paste it into the chat

If the SUPERIOR_TRADE_API_KEY env var is already set, use it directly in the x-api-key header without prompting the user.

Public Endpoints (no auth)

Method Path Description
GET /health { "status": "ok", "timestamp": "..." }
GET /docs Swagger UI
GET /openapi.json OpenAPI 3.0 spec
GET /llms.txt LLM-optimized API docs
GET /.well-known/ai-plugin.json AI plugin manifest

Safety

Security & Permissions

This skill requires exactly one credential: an x-api-key header value. The only secret the agent uses is SUPERIOR_TRADE_API_KEY from the environment. Read it from the env var — never ask users to paste it in chat.

Security rules (non-negotiable):

  1. NEVER ask users for private keys, seed phrases, or wallet credentials
  2. NEVER include private keys in API requests (the API rejects them)
  3. NEVER log, store, or display private keys or seed phrases
  4. NEVER tell users to deposit funds to the agent wallet address
  5. NEVER fabricate wallet balances, API responses, or trade results
  6. NEVER start a live deployment without explicit user confirmation
  7. NEVER mention the underlying trading engine name, internal class names/imports, infrastructure details (containers, proxies, namespaces), or wallet provider names — instead say "strategy", "the bot", "the trading engine", "platform-managed wallet". Show raw code only when the user requests it.
  8. NEVER send users to app.superior.trade — the correct URL is https://account.superior.trade

Key scope notice: The API key can create and start live trading deployments that execute real trades using the user's platform-managed trading wallet. It cannot withdraw funds, export private keys, or move money. Users should confirm scope with Superior Trade and backtest their strategy first.

Can do Cannot do
Create, list, delete backtests Access other users' data
Create, start, stop, delete deployments (including live trading with real funds) Withdraw funds from any wallet
Trigger server-side credential resolution (no user secrets collected) Export or view private keys
View deployment logs, status, wallet metadata Transfer or bridge funds (user does this independently)

Live Deployment Confirmation

Before any live deployment, the agent MUST present this summary and wait for explicit confirmation:

Deployment Summary:
• Strategy: [name]
• Exchange: hyperliquid
• Trading mode: [spot/futures]
• Pairs: [list]
• Stake amount: [amount] USDC per trade
• Max open trades: [n]
• Stoploss: [percentage]
• Margin mode: [cross/isolated] (futures only)

⚠️ This will trade with REAL funds. Proceed? (yes/no)

Do NOT start a live deployment without an explicit affirmative response.

Platform Model

Wallet Architecture (CRITICAL)

Superior Trade uses Hyperliquid's native agent wallet pattern. Users do NOT need their own Hyperliquid wallet — everything is managed by the platform. If a user asks "how do I link my Hyperliquid account," the answer is: they don't need one — a trading wallet is created at signup.

  1. Main wallet — a platform-managed trading wallet created for each user at signup. Holds the funds on Hyperliquid. Users deposit USDC to this address via the dashboard at https://account.superior.trade.
  2. Agent wallet — a platform-managed signing key authorized via Hyperliquid's approveAgent. Signs trades against the main wallet's balance.

Key facts:

  • The agent wallet does NOT need its own funds — $0 balance is normal and expected
  • Each user has one agent wallet; all deployments share it
  • The credentials endpoint returns wallet_type: "agent_wallet" for auto-resolved wallets
  • Always check the main wallet's balance, not the agent wallet's
  • The API has no transfer/fund-routing endpoint — you cannot move funds via the API
  • NEVER tell users to deposit to the agent wallet address

Funding and Balance Checks

The agent cannot move or bridge funds — the user handles this independently outside the skill:

  1. The user deposits USDC to their platform wallet address (shown on their dashboard at https://account.superior.trade)
  2. The agent wallet signs trades against this balance — no internal transfers needed

Always check the main wallet (platform-managed trading wallet), NOT the agent wallet.

These are read-only, unauthenticated queries to Hyperliquid's public API. The wallet address sent is public on-chain data — not a secret. No API keys, private keys, or auth tokens are included.

POST https://api.hyperliquid.xyz/info
{"type":"clearinghouseState","user":"<MAIN_WALLET_ADDRESS>"}
{"type":"spotClearinghouseState","user":"<MAIN_WALLET_ADDRESS>"}

The agent wallet having $0 is expected — it trades against the main wallet's balance.

Hyperliquid Credentials

Credentials are managed automatically. To use a specific wallet, pass wallet_address — ownership is validated server-side.

Exchange and Pair Rules

Supported Exchanges

Exchange Stake Currencies Trading Modes
Hyperliquid USDC (also USDT0, USDH, USDE via HIP3) spot, futures

Hyperliquid Notes

Pair format by trading mode (CCXT convention):

  • Spot: BTC/USDC
  • Futures/Perp: BTC/USDC:USDC

Spot limitations: No stoploss on exchange (bot handles internally), no market orders (simulated via limit with up to 5% slippage).

Futures: Margin modes "cross" and "isolated". Stoploss on exchange via stop-loss-limit orders. No market orders (same simulation).

Data availability: Hyperliquid API provides ~5000 historic candles per pair. Superior Trade pre-downloads data; availability starts from ~November 2025.

Hyperliquid is a DEX — uses wallet-based signing, not API key/secret. Wallet credentials are managed automatically by the platform.

HIP3 — Tokenized Real-World Assets

HIP3 assets (stocks, commodities, indices) are perpetual futures.

CRITICAL: HIP3 uses a HYPHEN, not a colon. This is the #1 format mistake. Wrong: XYZ:AAPL/USDC:USDC. Correct: XYZ-AAPL/USDC:USDC.

Pair format: PROTOCOL-TICKER/QUOTE:SETTLE — the separator between protocol and ticker is always - (hyphen).

Protocol Asset Types Stake Currency Examples
XYZ- US/KR stocks, metals, currencies, indices USDC XYZ-AAPL/USDC:USDC, XYZ-GOLD/USDC:USDC
CASH- Commodities, stocks USDT0 CASH-GOLD/USDT0:USDT0
FLX- Commodities, stocks, crypto USDC or USDH FLX-GOLD/USDH:USDH
KM- Stocks, indices, bonds USDH KM-GOOGL/USDH:USDH
HYNA- Leveraged crypto USDC or USDE HYNA-SOL/USDE:USDE

XYZ tickers (USDC): AAPL, AMZN, GOOGL, META, TSLA, NFLX, HOOD, PLTR, INTC, RIVN, COIN, SNDK, BABA, GOLD, SILVER, COPPER, PLATINUM, PALLADIUM, JPY, XYZ100, HYUNDAI, SKHX, SMSN

Data: XYZ from ~November 2025, KM/CASH/FLX from ~February 2026. Timeframes: 1m, 3m, 5m, 15m, 30m, 1h (also 2h, 4h, 8h, 12h, 1d, 3d, 1w for some). Funding rate data at 1h.

Trading rules: HIP3 assets are futures-only — always use trading_mode: "futures" and margin_mode: "isolated". XYZ pairs use stake_currency: "USDC". Stock-based assets may have reduced liquidity outside US market hours.

Pair Discovery

Verify pairs exist: POST https://api.hyperliquid.xyz/info → {"type":"meta"} — check the universe array. The API returns raw coin names (e.g. XYZ/GOLD) — convert to CCXT format with hyphen separator (XYZ-GOLD/USDC:USDC) before showing to users or using in config.

Unified vs Legacy Account Mode

Hyperliquid accounts may run in unified mode (single balance) or legacy mode (separate spot/perps balances). Do NOT assume which mode the user has.

  • If perps shows $0 but spot shows funds, ask about unified mode before suggesting the user move funds themselves.
  • In unified mode, spot USDC is automatically available as perps collateral.

Agent Operating Rules

  • Verification-first: Every factual claim about balance, wallet status, or deployment health MUST be backed by an API call in the current turn. NEVER assume → report → verify later.
  • Anti-hallucination: If you can't call the API, say "I haven't checked yet." Every number must come from a real response.
  • Conversational: Make API calls directly and present results conversationally. Show raw payloads only on request.
  • Backtesting: Build config + code from user intent → create → start → poll → present results — all automatically.
  • Deployment: Create → store credentials → run checklist → show summary → get confirmation → start.
  • Proactive: Ask for missing info conversationally, one concern at a time. Warn if backtest results are poor before offering live deployment.

Check Hyperliquid balances with BOTH endpoints:

  • Perps: POST https://api.hyperliquid.xyz/info → {"type":"clearinghouseState","user":"0x..."}
  • Spot: POST https://api.hyperliquid.xyz/info → {"type":"spotClearinghouseState","user":"0x..."}

Repeated Failures

If the agent fails the same task 3+ times (e.g. strategy code keeps crashing, backtest keeps failing), stop and:

  1. Summarize what was tried and what failed
  2. Suggest the user try a simpler approach or different parameters
  3. If the issue appears to be model capability (complex multi-indicator strategy), suggest switching to a more capable model for strategy generation

Workflows

Backtest Workflow

  1. Build config + strategy code from user requirements
  2. POST /v2/backtesting — create
  3. PUT /v2/backtesting/{id}/status with {"action": "start"}
  4. Poll GET /v2/backtesting/{id}/status every 10s until completed or failed (1–10 min)
  5. GET /v2/backtesting/{id} — fetch full results; download result_url for detailed JSON
  6. Present summary: total trades, win rate, profit, drawdown, Sharpe ratio
  7. If failed, check GET /v2/backtesting/{id}/logs
  8. To cancel: DELETE /v2/backtesting/{id}

Result Interpretation

After status = completed, download the result_url JSON. Present these key metrics:

  • Total trades — completed round-trips
  • Win rate — percentage of profitable trades
  • Total profit % — net profit as percentage of starting balance
  • Max drawdown — worst peak-to-trough decline
  • Sharpe ratio — risk-adjusted return (>1.0 good, >2.0 excellent)
  • Average trade duration — how long positions are held

Deployment Workflow

  1. POST /v2/deployment with config, code, name
  2. POST /v2/deployment/{id}/credentials with { "exchange": "hyperliquid" } — server assigns wallet automatically (required before live start; there is no paper/dry-run deployment mode)
  3. Run the pre-deployment checklist
  4. Show the live deployment confirmation summary and wait for explicit user confirmation
  5. PUT /v2/deployment/{id}/status → {"action": "start"}
  6. Monitor: GET /v2/deployment/{id}/status, GET /v2/deployment/{id}/logs
  7. Stop: PUT /v2/deployment/{id}/status → {"action": "stop"}

Pre-Deployment Checklist (MANDATORY)

Before PUT /v2/deployment/{id}/status → {"action":"start"}:

  1. Credentials stored — GET /v2/deployment/{id} → credentials_status: "stored". If not, call POST /v2/deployment/{id}/credentials.
  2. Identify wallets — GET /v2/deployment/{id}/credentials → note wallet_address (agent wallet) and agent_wallet_address.
  3. Funds available in main wallet — Check the main wallet (platform-managed trading wallet), NOT the agent wallet. Agent wallet having $0 is normal. Query clearinghouseState + spotClearinghouseState on the public Hyperliquid info endpoint (read-only, sends public wallet address only — no secrets).
  4. Pair is tradeable — POST https://api.hyperliquid.xyz/info → {"type":"meta"} and verify pair exists.

Do NOT skip any step or assume it passed without the API call.

API Reference

Backtesting

POST /v2/backtesting — Create Backtest

// Request
{ "config": {}, "code": "string (Python strategy)", "timerange": { "start": "YYYY-MM-DD", "end": "YYYY-MM-DD" } }

// Response (201)
{ "id": "string", "status": "pending", "message": "Backtest created. Call PUT /:id/status with action "start" to begin." }

PUT /v2/backtesting/{id}/status — Start Backtest

// Request — only "start" is supported; to cancel, use DELETE
{ "action": "start" }

// Response (200)
{ "id": "string", "status": "running", "previous_status": "pending", "job_name": "backtest-01kjvze9" }

GET /v2/backtesting/{id}/status — Poll Status

Response: { "id": "string", "status": "pending | running | completed | failed", "results": null }. results is null while running — use result_url from full details for complete results.

GET /v2/backtesting/{id} — Full Details

{
  "id": "string",
  "config": {},
  "code": "string",
  "timerange": { "start": "YYYY-MM-DD", "end": "YYYY-MM-DD" },
  "status": "pending | running | completed | failed",
  "results": null,
  "result_url": "https://storage.googleapis.com/... (signed URL, valid 7 days)",
  "started_at": "ISO8601",
  "completed_at": "ISO8601",
  "job_name": "string",
  "created_at": "ISO8601",
  "updated_at": "ISO8601"
}

DELETE /v2/backtesting/{id}

Cancels if running and deletes. Response: { "message": "Backtest deleted" }

Deployment

POST /v2/deployment — Create Deployment

// Request
{ "config": {}, "code": "string (Python strategy)", "name": "string" }

// Response (201)
{ "id": "string", "config": {}, "code": "string", "name": "My Strategy", "replicas": 1, "status": "pending", "deployment_name": "deploy-01kjvx94", "created_at": "ISO8601" }

PUT /v2/deployment/{id}/status — Start or Stop

// Request
{ "action": "start" | "stop" }

// Response (200)
{ "id": "string", "status": "running | stopped", "previous_status": "string" }

On stop: The platform automatically cancels all open orders and closes all positions on Hyperliquid before stopping the pod.

GET /v2/deployment/{id} — Full Details

{
  "id": "string",
  "config": {},
  "code": "string",
  "name": "string",
  "replicas": 1,
  "status": "pending | running | stopped",
  "pods": [{ "name": "string", "status": "Running", "restarts": 0 }],
  "credentials_status": "stored | missing",
  "exchange": "hyperliquid",
  "deployment_name": "string",
  "namespace": "string",
  "created_at": "ISO8601",
  "updated_at": "ISO8601"
}

GET /v2/deployment/{id}/status — Live Status

Response: { "id": "string", "status": "string", "replicas": 1, "available_replicas": 1, "pods": null }

POST /v2/deployment/{id}/credentials — Store Credentials

exchange required. wallet_address optional. private_key is NOT accepted.

// Request
{ "exchange": "hyperliquid", "wallet_address": "0x... (optional)" }

// Response (200)
{
  "id": "string", "credentials_status": "stored", "exchange": "hyperliquid",
  "wallet_address": "0x...", "wallet_source": "main_trading_wallet | provided",
  "agent_wallet_address": "0x... | undefined", "updated_at": "ISO8601"
}

IMPORTANT: wallet_address in the response is the wallet that signs trades. It does NOT need its own funds — it trades against the main wallet's balance.

Errors: 400 invalid_request (private_key sent), 400 invalid_wallet_address, 400 duplicate_wallet_address, 400 unsupported_exchange, 400 no_wallet_available, 403 wallet_not_owned, 500 server_misconfigured

Idempotent: Once credentials are stored, calling again returns existing credentials unchanged — it will NOT update or overwrite. To change wallets, delete and recreate the deployment.

Credential update procedure: (1) Stop the deployment → (2) Delete the deployment → (3) Create a new deployment with same config/code → (4) Store new credentials.

One-wallet-per-deployment rule: Each deployment uses one wallet and runs as an isolated container. For multiple strategies on the same wallet, use multiple deployments pointing to the same wallet address.

GET /v2/deployment/{id}/credentials — Credential Info

Does NOT return private keys. Response: { "id", "credentials_status": "stored | missing", "exchange", "wallet_address", "wallet_source": "main_trading_wallet | provided", "wallet_type": "main_wallet | agent_wallet", "agent_wallet_address" }. If missing: { "credentials_status": "missing" }.

DELETE /v2/deployment/{id}

Closes all positions and orders on Hyperliquid before deleting. Response: { "message": "Deployment deleted" }. Deleting stopped deployments may return 500 — safe to ignore.

Shared API Notes

Logs — GET /v2/backtesting/{id}/logs and /v2/deployment/{id}/logs

Query: pageSize (default 100), pageToken. Response: { "items": [{ "timestamp": "ISO8601", "message": "string", "severity": "string" }], "nextCursor": "string | null" }

Paginated Lists

Both GET /v2/backtesting and GET /v2/deployment return { "items": [], "nextCursor": "string | null" }. Pass cursor query param to paginate.

Error Responses

// 401 — Missing/invalid API key
{ "message": "No API key found in request", "request_id": "string" }

// 400 — Validation error
{ "error": "validation_failed", "message": "Invalid request", "details": [{ "path": "field", "message": "..." }] }

// 404 — Not found
{ "error": "not_found", "message": "Backtest not found" }

Config and Strategy Authoring

Config Reference

The config object is a Freqtrade trading bot configuration. Do not include api_server (platform-managed). Paper/dry-run trading is not offered — do not set dry_run in user-facing config.

Futures Config (recommended)

{
  "exchange": { "name": "hyperliquid", "pair_whitelist": ["BTC/USDC:USDC"] },
  "stake_currency": "USDC",
  "stake_amount": 100,
  "timeframe": "5m",
  "max_open_trades": 3,
  "stoploss": -0.1,
  "trading_mode": "futures",
  "margin_mode": "cross",
  "pairlists": [{ "method": "StaticPairList" }]
}

Spot Config

Same as futures but omit trading_mode and margin_mode. Pairs use BTC/USDC format (no :USDC suffix). Stoploss on exchange not supported for spot.

HIP3 Config Example

{
  "exchange": {
    "name": "hyperliquid",
    "pair_whitelist": ["XYZ-AAPL/USDC:USDC"]
  },
  "stake_currency": "USDC",
  "stake_amount": 100,
  "timeframe": "15m",
  "max_open_trades": 3,
  "stoploss": -0.05,
  "trading_mode": "futures",
  "margin_mode": "isolated",
  "entry_pricing": { "price_side": "other" },
  "exit_pricing": { "price_side": "other" },
  "pairlists": [{ "method": "StaticPairList" }]
}

Additional Config Fields

Beyond the examples above: minimal_roi (minutes-to-ROI map, e.g. {"0": 0.10, "30": 0.05}), trailing_stop (boolean), trailing_stop_positive (number), entry_pricing.price_side / exit_pricing.price_side ("ask", "bid", "same", "other"), pairlists (StaticPairList, VolumePairList, etc.).

Strategy Code Template

The code field must be valid Python with a strategy class. Class name must end with Strategy in PascalCase. Use import talib.abstract as ta for indicators.

from freqtrade.strategy import IStrategy
import pandas as pd
import talib.abstract as ta


class MyCustomStrategy(IStrategy):
    minimal_roi = {"0": 0.10, "30": 0.05, "120": 0.02}
    stoploss = -0.10
    trailing_stop = False
    timeframe = '5m'
    process_only_new_candles = True
    startup_candle_count = 20

    def populate_indicators(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame:
        dataframe['rsi'] = ta.RSI(dataframe, timeperiod=14)
        dataframe['sma_20'] = ta.SMA(dataframe, timeperiod=20)
        return dataframe

    def populate_entry_trend(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame:
        dataframe.loc[
            (dataframe['rsi'] < 30) & (dataframe['close'] > dataframe['sma_20']),
            'enter_long'
        ] = 1
        return dataframe

    def populate_exit_trend(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame:
        dataframe.loc[(dataframe['rsi'] > 70), 'exit_long'] = 1
        return dataframe

Requirements: Must use standard imports/inheritance (see template), import talib.abstract as ta for indicators, define populate_indicators, populate_entry_trend, populate_exit_trend.

Multi-Output TA-Lib Functions (CRITICAL)

Some TA-Lib functions return multiple columns. Assigning directly to one column causes a runtime crash.

Function Returns
ta.BBANDS upperband, middleband, lowerband
ta.MACD macd, macdsignal, macdhist
ta.STOCH slowk, slowd
ta.STOCHF / ta.STOCHRSI fastk, fastd
ta.AROON aroondown, aroonup
ta.HT_PHASOR inphase, quadrature
ta.MAMA mama, fama
ta.MINMAXINDEX minidx, maxidx
# WRONG — runtime crash
dataframe["bb_upper"] = ta.BBANDS(dataframe, timeperiod=20)

# CORRECT
bb = ta.BBANDS(dataframe, timeperiod=20)
dataframe["bb_upper"] = bb["upperband"]
dataframe["bb_middle"] = bb["middleband"]
dataframe["bb_lower"] = bb["lowerband"]

macd = ta.MACD(dataframe)
dataframe["macd"] = macd["macd"]
dataframe["macd_signal"] = macd["macdsignal"]
dataframe["macd_hist"] = macd["macdhist"]

stoch = ta.STOCH(dataframe)
dataframe["slowk"] = stoch["slowk"]
dataframe["slowd"] = stoch["slowd"]

Single-output functions (RSI, SMA, EMA, ATR, ADX) return a Series and can be assigned directly.

DCA / Position Scaling

The engine enforces one open trade per pair. Use adjust_trade_position() for DCA:

def adjust_trade_position(self, trade, current_time, current_rate,
                          current_profit, min_stake, max_stake,
                          current_entry_rate, current_exit_rate,
                          current_entry_profit, current_exit_profit, **kwargs):
    if should_dca(trade, current_time):
        return max(500, min_stake)  # add $500, respect exchange minimum
    return None
  • Called every candle while a trade is open. Positive = DCA buy, negative = partial close, None = no action.
  • Hyperliquid minimum: $10 per order. Engine inflates by stoploss reserve (up to 1.5x) — always use min_stake.
  • max_open_trades limits total concurrent trades across all pairs, not entries per pair.

stake_amount: "unlimited" Warning

"unlimited" bypasses minimum-order validation. The bot starts but silently executes zero trades if balance is insufficient — no error, just heartbeats. Always use explicit numeric stake_amount with small balances (<$50).

Stoploss Effective minimum
-0.5% ~$10.55
-5% ~$11.05
-10% ~$11.67
-30% ~$15.00

Operations and Troubleshooting

Reporting DCA Trades

For DCA strategies: distinguish trades from orders ("X trades, Y buy orders, Z sell orders"), show per-order detail for at least the first trade, flag minimum order rejections or dust positions. Always download result_url for full order-level data. Skip breakdown for non-DCA strategies.

Silent Failure Modes (CRITICAL)

Some failures produce zero diagnostic output — just heartbeats, no errors:

  1. stake_amount: "unlimited" with insufficient balance — bot runs, zero trades, zero errors
  2. Main wallet has $0 — same symptom
  3. Balance below effective minimum — same symptom

Key signal: Heartbeats but zero "Analyzing candle" or order lines after 5+ minutes = balance/stake issue.

Log Interpretation

  • Heartbeat messages are normal — the bot sends periodic heartbeats to confirm it's alive
  • "Analyzing candle" — bot is checking strategy conditions on the latest candle
  • "Buying"/"Selling" — trade execution
  • Rate limit warnings — reduce API calls, consider stopping if persistent

Diagnosing Zero-Trade Deployments

Check in order:

  1. Main wallet balance — agent wallet $0 is normal; check the platform-managed main wallet
  2. stake_amount — if "unlimited", redeploy with explicit numeric amount slightly below balance
  3. Credentials — verify credentials_status: "stored" and WALLET_ADDRESS in startup logs
  4. Strategy conditions — check if entry conditions are met on recent candles
  5. Logs — check for rate limits, exchange rejections, pair errors
  6. Pair validity — verify pair is active on Hyperliquid

Rate Limit Mitigation

Hyperliquid enforces rate limits. Aggressive retries, tight loops, or extra exchange traffic from strategy code can trigger 429 responses and unstable behavior.

Prevention:

  • Set process_only_new_candles = True so the bot does not reprocess every candle unnecessarily
  • Prefer candle-close pricing for exits where it fits the strategy (fewer edge-case order updates)
  • Do not add custom polling of Hyperliquid’s API (or other heavy network work) inside hot strategy paths — it stacks on top of normal bot traffic

If you see rate limits or 429s in logs:

  • Avoid rapid stop/start cycles; that often worsens retries against the limit
  • After the deployment stops, wait several minutes before starting again; if the issue persists, simplify the strategy or reduce anything that drives extra exchange requests

Orphan Position Handling

When a bot crashes, it may leave open positions that lock up margin. Strategy code pattern:

  • In bot_loop_start(), check for positions not in the bot's trade database
  • Close orphans with a limit order before entering fresh
  • Use a flag (_orphan_closed) to run cleanup exactly once per lifecycle

Backtest limit_exceeded Error

If you get a limit_exceeded error when creating a backtest, the user has hit the concurrent backtest limit. Delete completed/failed backtests first: DELETE /v2/backtesting/{id}

Timezone Reminder

All API timestamps are in UTC (ISO8601). Convert to the user's local timezone when presenting times conversationally. If timezone is unknown, show both UTC and ask.

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,017
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,005
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,003
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,002
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,002
Linux内核提权风险待核实,先查版本与补丁

CVE-2026-78901在摘要中被称为Linux内核ext4本地提权漏洞,CVSS评分7.8,但上游正文暂未核实。本文提供通用只读排查命令,帮运维和开发者核对当前运行内核、发行版补丁及升级生效状态。

2026.12.02 1,001
Skill 文件
  • SKILL.md
    • Superior Trade API
    • Setup
      • Getting an API Key
      • Public Endpoints (no auth)
    • Safety
      • Security & Permissions
      • Live Deployment Confirmation
    • Platform Model
      • Wallet Architecture (CRITICAL)
      • Funding and Balance Checks
      • Hyperliquid Credentials
    • Exchange and Pair Rules
      • Supported Exchanges
      • Hyperliquid Notes
      • HIP3 — Tokenized Real-World Assets
      • Pair Discovery
      • Unified vs Legacy Account Mode
    • Agent Operating Rules
      • Repeated Failures
    • Workflows
      • Backtest Workflow
        • Result Interpretation
      • Deployment Workflow
      • Pre-Deployment Checklist (MANDATORY)
    • API Reference
      • Backtesting
        • POST /v2/backtesting — Create Backtest
        • PUT /v2/backtesting/{id}/status — Start Backtest
        • GET /v2/backtesting/{id}/status — Poll Status
        • GET /v2/backtesting/{id} — Full Details
        • DELETE /v2/backtesting/{id}
      • Deployment
        • POST /v2/deployment — Create Deployment
        • PUT /v2/deployment/{id}/status — Start or Stop
        • GET /v2/deployment/{id} — Full Details
        • GET /v2/deployment/{id}/status — Live Status
        • POST /v2/deployment/{id}/credentials — Store Credentials
        • GET /v2/deployment/{id}/credentials — Credential Info
        • DELETE /v2/deployment/{id}
      • Shared API Notes
        • Logs — GET /v2/backtesting/{id}/logs and /v2/deployment/{id}/logs
        • Paginated Lists
        • Error Responses
    • Config and Strategy Authoring
      • Config Reference
        • Futures Config (recommended)
        • Spot Config
        • HIP3 Config Example
        • Additional Config Fields
      • Strategy Code Template
      • Multi-Output TA-Lib Functions (CRITICAL)
      • DCA / Position Scaling
      • stake_amount: "unlimited" Warning
    • Operations and Troubleshooting
      • Reporting DCA Trades
      • Silent Failure Modes (CRITICAL)
      • Log Interpretation
      • Diagnosing Zero-Trade Deployments
      • Rate Limit Mitigation
      • Orphan Position Handling
      • Backtest limit_exceeded Error
      • Timezone Reminder
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期