tradehivecrypto.com
Menu
Language

API Reference

TradeHive REST API, stratejileri tetiklemek ve paper istatistiklerini çekmek için birkaç kritik uç nokta sunar. Tüm istekler Clerk JWT'si ile yetkilendirilmelidir.

Kimlik doğrulama

Authorization: Bearer <clerk-session-token>

NEXT_PUBLIC_API_BASE_URL ortam değişkeni, isteklerinizin yönlendirileceği temel URL'yi belirler.

/bots/run-once

Tek seferlik bir strateji çalıştırması tetikler. Paper veya canlı mod seçimi sorgu parametresi ile yapılır.

Authorization: Bearer <session-token>POST /bots/run-once?mode=paper
Content-Type: application/json```

İstek gövdesi

{
  "symbols": ["BTCUSDT", "ETHUSDT"],
  "balance": 100000,
  "leverage": 2,
  "context": {
    "reason": "manual-test",
    "requestedBy": "user_123"
  }
}

Başarılı yanıt

{
  "runId": "run_01HXYZ...",
  "status": "queued",
  "symbols": ["BTCUSDT", "ETHUSDT"],
  "mode": "paper"
}

Başlatılan koşunun detaylarını /user/paper/logs uç noktasından takip edebilirsiniz.

/paper/stats

Paper moduna ait özet metrikleri döner. Varsayılan olarak son 30 koşuyu kullanır.

GET /paper/stats?limit=30

Yanıt gövdesi

{
  "balance": 100124.42,
  "pnl24h": 42.18,
  "totalTrades": 128,
  "openPositions": 1,
  "equityCurve": [100000, 100012, 100055, 100042.18],
  "recentTrades": [
    {
      "id": "trade_01H...",
      "symbol": "BTCUSDT",
      "side": "buy",
      "price": 40215.2,
      "quantity": 0.024,
      "pnl": 12.4,
      "openedAt": "2024-05-22T10:11:00.000Z",
      "closedAt": "2024-05-22T10:13:10.000Z"
    }
  ]
}

Bu veri yapısı Paper dashboard'undaki kartları, grafiklerini ve işlem geçmişi tablolarını besler. equityCurve alanını sparkline oluşturmak için, recentTrades listesini ise tabloya aktarmak için kullanabilirsiniz.

Webhooklar

Manuel tetiklemelere ek olarak, POST /webhooks/signals uç noktası TradeHive'a harici sinyaller gönderir. Her webhook isteği X-TradeHive-Signature başlığında HMAC imzası ile doğrulanır.

Daha fazla örnek ve SDK entegrasyonu için TradeHive CLI deposunu ziyaret edin.

Important Notice

Our Trading Approach & Risk Disclosure

Our Strategy

TradeHive analyzes historical market data and technical indicators to open multiple trades with optimized risk/reward ratios. Our goal is to help you grow your balance sustainably over the long term.

Risk Management

Automatic stop-loss and take-profit levels are set for each trade. We focus on the overall performance of multiple trades, not just a single one. However, due to the volatile nature of crypto markets, every trade carries risk.

Important Note

No trading system can guarantee 100% profits. Even if past performance is 100%, do not ignore the possibility that the next trade could close at a loss. Please only trade with amounts you can afford to lose.

For questions, check our documentation or contact us .