← 返回
安全合规 中文

Alura

Integrate with Alura Trading testnet API for user auth, trading sessions, market data, leaderboard, referrals, and USDC verification using Bearer token.
使用 Bearer token 与 Alura Trading 测试网 API 集成,实现用户认证、交易会话、市场数据、排行榜、推荐及 USDC 验证。
evilboyajay
安全合规 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 796
下载
💾 8
安装
1
版本
#latest

概述

Alura Backend API

Use this skill when integrating with or calling the Alura Trading backend API. The testnet API base URL is https://testnet-api.alura.fun.

Base URL

https://testnet-api.alura.fun
  • Swagger docs: https://testnet-api.alura.fun/api/docs
  • All authenticated endpoints require Authorization: Bearer

Authentication (EVM Wallet)

1. Get challenge

POST /auth/evm/challenge
Content-Type: application/json

{ "address": "0x..." }

Returns { address, nonce, message }.

2. Sign & verify

User signs message with MetaMask (personal_sign). Then:

POST /auth/evm/verify
Content-Type: application/json

{ "address": "0x...", "signature": "0x...", "referralCode": "OPTIONAL" }

Returns { ok: true, accessToken, tokenType: "Bearer", expiresIn: 86400, ... }. Use accessToken for subsequent requests.

Trading Sessions

Base path: /trading-sessions. All require Bearer token.

Quick trade – create session

POST /trading-sessions
Authorization: Bearer <token>
Content-Type: application/json

{
  "budget": 100,
  "profitTarget": 40,
  "lossThreshold": 5,
  "maxPositions": 3,
  "assetIndex": 0
}

Required: budget (min 10), profitTarget (max 500), assetIndex (Hyperliquid perp index: 0=BTC, 1=ETH, 2=SOL, etc.).

Advance trade – create session

POST /trading-sessions/advance
Authorization: Bearer <token>
Content-Type: application/json

{
  "amount": 100,
  "executionStrategy": "Conservative" | "Aggressive" | "Degen",
  "strategyDuration": "1D" | "3D" | "7D" | "30D" | "90D" | "365D",
  "assetIndex": 0,
  "maxWalletBudget": false
}

Other trading endpoints

MethodPathDescription
---------------------------
GET/trading-sessions/activeList active sessions
GET/trading-sessions/current-tradeCurrent trade with positions
GET/trading-sessions/:sessionId/logsSession logs
GET/trading-sessions/trades/:tradeId/logsTrade logs (paginated)
POST/trading-sessions/positions/:positionId/closeClose a position
POST/trading-sessions/positions/:positionId/close-signatureGet signed close tx for frontend
POST/trading-sessions/trades/:tradeId/closeClose trade (all positions)
POST/trading-sessions/trigger-cronManually trigger cron (testing)

User

Base path: /user. All require Bearer token.

MethodPathDescription
---------------------------
GET/user/profileCurrent user profile
POST/user/fills/syncSync fills from Hyperliquid
POST/user/withdrawWithdraw funds
POST/user/close-positionClose position by assetIndex
POST/user/close-all-positionsClose all positions
POST/user/send-usdcSend USDC
GET/auth/evm/trading-keyGet trading agent key (auth)
POST/user/claim-rewardClaim rewards

Indicators & Market Data

Base path: /api/indicators. Most are public.

MethodPathDescription
---------------------------
GET/api/indicators/healthService health
GET/api/indicators/candles/latestLatest candles
GET/api/indicators/candles/history/:symbolHistorical candles
GET/api/indicators/candles/:symbol/:intervalCandles by symbol/interval
GET/api/indicators/candles/aggregated/symbolsAvailable symbols
GET/api/indicators/signals/:symbol/:intervalSignals for symbol
GET/api/indicators/signals/all/:intervalAll symbols signals

Leaderboard

Base path: /api/leaderboard.

MethodPathDescription
---------------------------
GET/api/leaderboard/statsLeaderboard stats
GET/api/leaderboard/rankingsRankings
GET/api/leaderboard/user/:userIdUser ranking
GET/api/leaderboard/analyticsAnalytics
GET/api/leaderboard/healthHealth

Referrals

Base path: /referrals.

MethodPathDescription
---------------------------
GET/referrals/:userIdUser referral info
GET/referrals/:userId/statsReferral stats
POST/referrals/:userId/codeCreate referral code
POST/referrals/checkCheck referral code

USDC Verification

Base path: /usdc-verification.

MethodPathDescription
---------------------------
POST/usdc-verification/verifyVerify USDC deposit
GET/usdc-verification/my-transactionsMy transactions
GET/usdc-verification/total-depositedTotal deposited

Health

MethodPathDescription
---------------------------
GET/healthBasic health
GET/health/kafkaKafka health

Asset Indices (Hyperliquid Perps)

Common perp asset indices:

SymbolIndex
---------------
BTC0
ETH1
SOL2
XRP3
DOGE4
AVAX5

Error Handling

  • 401: Missing/invalid Bearer token. Re-auth via /auth/evm/challenge and /auth/evm/verify.
  • 400: Validation error. Check message in response body.
  • 429: Rate limit. Retry with backoff.
  • Common messages: Duplicate asset index: you already have an active trading session for this asset, Builder fee approval failed: HTTP request failed: status 429.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 10:15 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,697
security-compliance

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 89 📥 30,584
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,210 📥 266,143