OS Trading Engine
Getting Started
Core Concepts
Trading Signals

Trading Signals

Trading signals are the triggers that initiate trades. They represent buy recommendations for specific tokens.


What is a Trading Signal?

A trading signal is a structured message that tells Nexgent:

  • Which token to consider trading
  • Signal type (e.g., Hypersurge, Breakout confirmation, Price Reversal). Agents can filter for specific types.
  • How strong the recommendation is (1-5)
  • The signal provider (e.g., Nexgent AI)

Signal Properties

PropertyTypeDescription
tokenAddressstringSolana token mint address
symbolstringToken ticker (e.g., BONK)
signalTypestringSignal type name (e.g., "Hypersurge", "Breakout confirmation", "Price Reversal")
signalStrengthnumber1 (weak) to 5 (strong)
sourcestringThe signal provider (e.g., "Nexgent AI")
activationReasonstringOptional description

Signal Strength

Signal strength indicates confidence level:

StrengthMeaningAgent Behavior
1Very weakUsually filtered out
2WeakFiltered by most configs
3ModerateDefault minimum threshold
4StrongHigh confidence
5Very strongMaximum confidence

Configure minScore in your agent's trading config to filter signals by strength.


Signal Flow

┌─────────────────┐
│  Signal Source  │
│  (API/Webhook)  │
└────────┬────────┘


┌─────────────────┐
│ Signal Received │
│   by Backend    │
└────────┬────────┘


┌─────────────────┐
│ Stored in DB    │
│ & Broadcast     │
└────────┬────────┘


┌─────────────────┐
│  Each Agent     │
│  Evaluates      │
└────────┬────────┘

    ┌────┴────┐
    │         │
    ▼         ▼
Eligible   Not Eligible
    │         │
    ▼         │
Execute     Skip
Trade

Signal Sources

1. API (Programmatic)

Send signals from your own systems:

curl -X POST http://localhost:4000/api/v1/trading-signals \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "tokenAddress": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
    "symbol": "BONK",
    "signalType": "Hypersurge",
    "signalStrength": 4,
    "source": "Nexgent AI",
    "activationReason": "RSI oversold"
  }'

API signal creation requires an API key with signals scope. The activationReason field is optional.

2. External Services

Connect external signal providers:

  • Trading bots
  • Social sentiment analyzers
  • Technical analysis services
  • Custom algorithms

Creating API Keys for Signals

To send signals programmatically:

  1. Navigate to the Integrations page in the sidebar
  2. In the API Keys card, click Create Key (or Create API Key if you have no keys yet)
  3. In the dialog, enter a Name (e.g., "Signal Engine Production")
  4. Open the Restricted tab, then select the Signals scope (read & write trading signals)
  5. Click Create API Key
  6. Copy the API key from the confirmation dialog (shown only once)
  7. Click I've copied my key to close

Use the key in the X-API-Key header:

curl -X POST http://localhost:4000/api/v1/trading-signals \
  -H "X-API-Key: nex_abc123..." \
  -H "Content-Type: application/json" \
  -d '{ ... }'

Signal Filtering

Agents filter signals based on configuration:

Signal Type Filter

Users can restrict an agent to only respond to specific strategy types (e.g., only Price Reversal). If no types are specified, the agent accepts all types.

Signal Strength Filter

signals: {
  minScore: 3  // Only process signals with strength >= 3
}

Blacklist

signals: {
  blacklist: [
    "TokenAddressToBlock1...",
    "TokenAddressToBlock2..."
  ]
}

Whitelist

signals: {
  whitelistEnabled: true,
  whitelist: [
    "OnlyTradeThis1...",
    "OnlyTradeThis2..."
  ]
}

Signal Types

Signals trigger buy trades. Common signal types include:

  • Hypersurge - Strong momentum indicators
  • Price Reversal - Potential trend reversals
  • Breakout confirmation - Breakout validation

Example signal:

{
  "signalType": "Hypersurge",
  "tokenAddress": "...",
  "signalStrength": 4
}

When received:

  1. Agents evaluate eligibility
  2. Eligible agents execute buy
  3. Position created

Viewing Signals

Dashboard

The Trading Signals page shows:

ColumnDescription
TimeWhen signal was created
TokenSymbol and address
TypeSignal type name
Strength1-5 rating
SourceSignal provider name

API

# List recent signals
curl http://localhost:4000/api/v1/trading-signals \
  -H "X-API-Key: your-api-key"
 
# Filter by token
curl "http://localhost:4000/api/v1/trading-signals?tokenAddress=DezXAZ8z..." \
  -H "X-API-Key: your-api-key"
 
# Filter by date range
curl "http://localhost:4000/api/v1/trading-signals?startDate=2025-01-01&endDate=2025-01-31" \
  -H "X-API-Key: your-api-key"

Best Practices

1. Use Meaningful Sources

If you're a signal generation platform, include a source identifier to track signal origins:

{
  "source": "telegram-alpha-bot"
}

This helps analyze which sources produce profitable signals.

2. Set Appropriate Strength

Be honest about signal confidence:

  • 5: High conviction, well-researched
  • 3-4: Moderate confidence
  • 1-2: Speculative

3. Include Activation Reasons

Document why the signal was generated:

{
  "activationReason": "Volume spike + whale accumulation detected"
}

4. Test Before Production

Use simulation mode agents to test signal integrations.

5. Monitor Signal Quality

Regularly review which signals led to profitable trades.


Integration Examples

Python

import requests
 
def send_signal(token_address: str, symbol: str, strength: int):
    response = requests.post(
        'http://localhost:4000/api/v1/trading-signals',
        headers={
            'X-API-Key': 'your-api-key',
            'Content-Type': 'application/json'
        },
        json={
            'tokenAddress': token_address,
            'symbol': symbol,
            'signalType': 'Hypersurge',
            'signalStrength': strength,
            'source': 'Nexgent AI'
        }
    )
    return response.json()
 
# Usage
send_signal(
    'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263',
    'BONK',
    4
)

JavaScript

async function sendSignal(tokenAddress, symbol, strength) {
  const response = await fetch('http://localhost:4000/api/v1/trading-signals', {
    method: 'POST',
    headers: {
      'X-API-Key': 'your-api-key',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      tokenAddress,
      symbol,
      signalType: 'Hypersurge',
      signalStrength: strength,
      source: 'Nexgent AI'
    })
  });
  return response.json();
}
 
// Usage
sendSignal(
  'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263',
  'BONK',
  4
);