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
Theghost.closed event fires when a Ghost Trader position is fully closed on any
supported asset. It includes the final P&L (net of any TP1 partial sell), the exit
price, and a canonical close_reason label.
Assets covered: BTC, ETH, SOL, TAO, GOLD
Latency: Up to 30 seconds (poll-based dispatcher).
Subscribe
Register viaPOST /v1/webhooks with "ghost.closed" in the events array.
Payload
Data Fields
UUID of the closed trade.
Asset symbol. One of:
BTC, ETH, SOL, TAO, GOLD.Entry price in USD.
Final exit price in USD.
Net P&L in USD, including TP1 partial sell profit if TP1 fired before close.
Canonical close reason. One of:
| Value | Description |
|---|---|
STOP_LOSS | Hard stop loss hit |
TP1 | Closed at TP1 level (rare — usually TSL fires after TP1) |
TP2 | Take Profit 2 hit |
TSL | Trailing stop loss triggered |
BE_SHIELD | Break-Even Shield triggered |
MANUAL | Manually closed via Telegram command |
EXIT_SIGNAL | Score-based exit signal |
REGIME_EXIT | Market regime change forced exit |
CONVICTION_EXIT | AI Council low-conviction exit |
FLASH_CRASH | Emergency flash-crash exit |
ISO 8601 timestamp when the trade closed.
Delivery
Delivered as a signedPOST to your registered URL with:
X-AIOKA-Event: ghost.closedX-AIOKA-Signature: sha256=<hex>X-AIOKA-Timestamp: <unix>