Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.aioka.io/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The ghost.tp1 event fires once per trade, at the moment the Ghost Trader executes a TP1 (Take Profit 1) partial sell on any supported asset. TP1 closes 50% of the position and activates the Break-Even Shield, raising the stop-loss to the entry price. Assets covered: BTC, ETH, SOL, TAO, GOLD Latency: Up to 30 seconds (poll-based dispatcher).

Subscribe

Register via POST /v1/webhooks with "ghost.tp1" in the events array.
{
  "url": "https://your-server.com/aioka-hook",
  "events": ["ghost.tp1"]
}

Payload

{
  "event": "ghost.tp1",
  "timestamp": "2026-05-08T14:32:10.123456Z",
  "data": {
    "trade_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "asset": "ETH",
    "entry_price": "2845.50",
    "tp1_price": "2903.21",
    "tp1_pnl": "58.35",
    "be_shield_active": true,
    "timestamp": "2026-05-08 14:32:00+00:00"
  }
}

Data Fields

trade_id
string
UUID of the trade that fired TP1.
asset
string
Asset symbol. One of: BTC, ETH, SOL, TAO, GOLD.
entry_price
decimal
Original entry price in USD.
tp1_price
decimal
Price at which the TP1 partial sell executed (may be null if not separately tracked).
tp1_pnl
decimal
Locked P&L from the partial sell in USD. Null if not yet persisted.
be_shield_active
boolean
Always true for TP1 events — TP1 execution always activates the Break-Even Shield.
timestamp
string
ISO 8601 timestamp when TP1 was detected by the dispatcher.

Delivery

Delivered as a signed POST to your registered URL with:
  • X-AIOKA-Event: ghost.tp1
  • X-AIOKA-Signature: sha256=<hex>
  • X-AIOKA-Timestamp: <unix>
See Register Webhook for signature verification.