
Triggers
- 12 installs
- 610 repo stars
- Updated June 26, 2026
- alsk1992/cloddsbot
triggers is a skill that creates conditional orders which auto-execute when price thresholds are met across prediction markets, futures, and crypto spot.
About
This skill sets up conditional orders that automatically execute trades when price conditions are met. It works across prediction markets, futures, and crypto spot, and supports entry and exit triggers, stop-loss, take-profit, trailing stops, and multi-condition logic. A developer uses it to automate rule-based order execution from the clodds bot.
- Conditional orders that auto-execute when price thresholds are met
- Works across prediction markets, futures, and crypto spot
- Stop-loss, take-profit, trailing stops, and multi-condition triggers
Triggers by the numbers
- 12 all-time installs (skills.sh)
- Ranked #781 of 1,106 Finance & Trading skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
triggers capabilities & compatibility
Requires the underlying platform credentials; stores triggers in a local SQLite file.
- Capabilities
- conditional orders · stop loss · take profit · trailing stop
- Use cases
- trading · orchestration
- Runs
- Runs locally
- Pricing
- Bring your own API key
What triggers says it does
Set up conditional orders that automatically execute trades when price conditions are met. Works across prediction markets, futures, and crypto spot.
Trailing stop (follows price up, triggers on pullback)
npx skills add https://github.com/alsk1992/cloddsbot --skill triggersAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 12 |
|---|---|
| repo stars | ★ 610 |
| Last updated | June 26, 2026 |
| Repository | alsk1992/cloddsbot ↗ |
What it does
Auto-execute trades across markets when price or multi-condition thresholds are met.
Who is it for?
Automating rule-based entries, exits, and stop-loss/take-profit across trading platforms.
Skip if: Manually placing a single immediate order.
When should I use this skill?
You want an order to fire automatically when a price or condition threshold is hit.
What you get
Conditional triggers that auto-execute orders on price or multi-condition rules.
- Pending conditional triggers
- Auto-executed entry/exit orders
By the numbers
- Default price check interval 5000ms
- Supports AND/OR multi-condition logic
Files
Triggers - Complete API Reference
Set up conditional orders that automatically execute trades when price conditions are met. Works across prediction markets, futures, and crypto spot.
---
Chat Commands
Create Trigger Orders
/trigger buy poly "Trump 2028" YES below 0.40 size 100
/trigger buy poly "Fed rate" NO above 0.60 size 50
/trigger sell poly "Trump 2028" YES above 0.55 size allFutures Triggers
/trigger long binance BTCUSDT below 95000 size 0.1 leverage 10x
/trigger short binance ETHUSDT above 4000 size 1 leverage 20x
/trigger close binance BTCUSDT above 105000Crypto Spot Triggers
/trigger buy sol SOL below 180 size 100usdc
/trigger sell eth ETH above 4000 size 0.5
/trigger swap arb USDC to ARB below 1.50 size 500Manage Triggers
/triggers List all active triggers
/triggers pending Show pending only
/triggers history Triggered order history
/trigger cancel <id> Cancel trigger
/trigger cancel all Cancel all triggersStop-Loss & Take-Profit
/sl poly "Trump" at 0.35 Stop-loss on position
/tp poly "Trump" at 0.65 Take-profit on position
/trailing-stop poly "Trump" 10% Trailing stop (% from high)---
TypeScript API Reference
Create Trigger Service
import { createTriggerService } from 'clodds/triggers';
const triggers = createTriggerService({
// Price monitoring
checkIntervalMs: 5000, // Check every 5 seconds
// Execution
maxSlippagePercent: 2,
retryAttempts: 3,
// Storage
storage: 'sqlite',
dbPath: './triggers.db',
});
// Start monitoring
await triggers.start();Create Prediction Market Trigger
// Buy YES when price drops below threshold
const trigger = await triggers.create({
type: 'entry',
platform: 'polymarket',
market: 'will-trump-win-2028',
side: 'YES',
direction: 'below',
triggerPrice: 0.40,
size: 100, // $100
orderType: 'limit', // 'market' | 'limit'
limitPrice: 0.41, // Optional: max price for limit
});
console.log(`Trigger ID: ${trigger.id}`);
console.log(`Status: ${trigger.status}`); // 'pending'
// Sell when price rises above threshold
await triggers.create({
type: 'exit',
platform: 'polymarket',
market: 'will-trump-win-2028',
side: 'YES',
direction: 'above',
triggerPrice: 0.55,
size: 'all', // Sell entire position
});Create Futures Trigger
// Long entry when BTC drops below support
await triggers.create({
type: 'entry',
platform: 'binance',
symbol: 'BTCUSDT',
side: 'long',
direction: 'below',
triggerPrice: 95000,
size: 0.1,
leverage: 10,
// Auto-set SL/TP on fill
stopLoss: 93000,
takeProfit: 105000,
});
// Short entry when ETH breaks above resistance
await triggers.create({
type: 'entry',
platform: 'bybit',
symbol: 'ETHUSDT',
side: 'short',
direction: 'above',
triggerPrice: 4000,
size: 1,
leverage: 20,
});
// Close position when price target hit
await triggers.create({
type: 'exit',
platform: 'binance',
symbol: 'BTCUSDT',
direction: 'above',
triggerPrice: 105000,
size: 'all',
});Create Crypto Spot Trigger
// Buy SOL when price drops
await triggers.create({
type: 'entry',
platform: 'jupiter', // Solana DEX
tokenIn: 'USDC',
tokenOut: 'SOL',
direction: 'below',
triggerPrice: 180,
size: 100, // 100 USDC
slippagePercent: 1,
});
// Sell ETH when price rises
await triggers.create({
type: 'exit',
platform: 'uniswap', // EVM DEX
chain: 'ethereum',
tokenIn: 'ETH',
tokenOut: 'USDC',
direction: 'above',
triggerPrice: 4000,
size: 0.5,
});Stop-Loss & Take-Profit
// Set stop-loss on existing position
await triggers.setStopLoss({
platform: 'polymarket',
market: 'will-trump-win-2028',
side: 'YES',
triggerPrice: 0.35,
size: 'all',
});
// Set take-profit
await triggers.setTakeProfit({
platform: 'polymarket',
market: 'will-trump-win-2028',
side: 'YES',
triggerPrice: 0.65,
size: 'all',
});
// Trailing stop (follows price up, triggers on pullback)
await triggers.setTrailingStop({
platform: 'polymarket',
market: 'will-trump-win-2028',
side: 'YES',
trailPercent: 10, // Trigger if drops 10% from high
size: 'all',
});Multi-Condition Triggers
// Trigger only when multiple conditions met
await triggers.create({
type: 'entry',
platform: 'polymarket',
market: 'will-trump-win-2028',
side: 'YES',
conditions: [
{ type: 'price', direction: 'below', value: 0.40 },
{ type: 'volume24h', direction: 'above', value: 100000 },
{ type: 'spread', direction: 'below', value: 0.02 },
],
// All conditions must be true
conditionLogic: 'AND', // 'AND' | 'OR'
size: 100,
});One-Cancels-Other (OCO)
// OCO: Either SL or TP triggers, other cancels
const oco = await triggers.createOCO({
platform: 'binance',
symbol: 'BTCUSDT',
stopLoss: {
direction: 'below',
triggerPrice: 93000,
size: 'all',
},
takeProfit: {
direction: 'above',
triggerPrice: 105000,
size: 'all',
},
});List & Manage Triggers
// List all triggers
const all = await triggers.list();
for (const t of all) {
console.log(`${t.id}: ${t.platform} ${t.market || t.symbol}`);
console.log(` ${t.direction} ${t.triggerPrice}`);
console.log(` Status: ${t.status}`);
console.log(` Created: ${t.createdAt}`);
}
// Get pending only
const pending = await triggers.list({ status: 'pending' });
// Get history (triggered)
const history = await triggers.list({ status: 'triggered' });
// Cancel trigger
await triggers.cancel(triggerId);
// Cancel all
await triggers.cancelAll();Event Handlers
// Trigger activated
triggers.on('triggered', async (trigger, result) => {
console.log(`Trigger ${trigger.id} activated!`);
console.log(`Order: ${result.orderId}`);
console.log(`Fill price: ${result.fillPrice}`);
console.log(`Size: ${result.filledSize}`);
});
// Trigger failed
triggers.on('failed', (trigger, error) => {
console.error(`Trigger ${trigger.id} failed: ${error.message}`);
});
// Price approaching trigger
triggers.on('approaching', (trigger, currentPrice) => {
console.log(`Price ${currentPrice} approaching trigger at ${trigger.triggerPrice}`);
});---
Supported Platforms
Prediction Markets
| Platform | Entry Triggers | Exit Triggers | SL/TP |
|---|---|---|---|
| Polymarket | ✓ | ✓ | ✓ |
| Kalshi | ✓ | ✓ | ✓ |
| Manifold | ✓ | ✓ | ✓ |
Futures
| Platform | Entry Triggers | Native Triggers | SL/TP |
|---|---|---|---|
| Binance | ✓ | ✓ | ✓ |
| Bybit | ✓ | ✓ | ✓ |
| MEXC | ✓ | ✓ Native | ✓ |
| Hyperliquid | ✓ | ✓ | ✓ |
Crypto Spot
| Platform | Entry Triggers | Exit Triggers |
|---|---|---|
| Jupiter (Solana) | ✓ | ✓ |
| Raydium | ✓ | ✓ |
| Uniswap (EVM) | ✓ | ✓ |
| 1inch (EVM) | ✓ | ✓ |
---
Trigger Types
| Type | Description |
|---|---|
| entry | Open new position when triggered |
| exit | Close position when triggered |
| stop-loss | Exit to limit losses |
| take-profit | Exit to lock in gains |
| trailing-stop | Dynamic stop that follows price |
| oco | One-cancels-other (SL + TP pair) |
---
Price Sources
| Platform | Price Source |
|---|---|
| Polymarket | WebSocket mid price |
| Kalshi | REST API best bid/ask |
| Binance | WebSocket mark price |
| Bybit | WebSocket last price |
| Jupiter | On-chain oracle |
---
Examples
Prediction Market Strategy
// Buy the dip, sell the rip
await triggers.create({
platform: 'polymarket',
market: 'trump-2028',
side: 'YES',
direction: 'below',
triggerPrice: 0.40,
size: 200,
});
await triggers.create({
platform: 'polymarket',
market: 'trump-2028',
side: 'YES',
direction: 'above',
triggerPrice: 0.55,
size: 'all',
});Futures Breakout Strategy
// Enter long on breakout above resistance
await triggers.create({
platform: 'binance',
symbol: 'BTCUSDT',
side: 'long',
direction: 'above',
triggerPrice: 100000,
size: 0.5,
leverage: 10,
stopLoss: 98000,
takeProfit: 110000,
});DCA on Dips
// Buy more as price drops
const levels = [180, 170, 160, 150];
for (const price of levels) {
await triggers.create({
platform: 'jupiter',
tokenOut: 'SOL',
tokenIn: 'USDC',
direction: 'below',
triggerPrice: price,
size: 50, // $50 at each level
});
}---
Best Practices
1. Use limit orders — Avoid slippage on triggers 2. Set expiration — Don't leave triggers forever 3. Monitor execution — Check fill prices 4. Use OCO for exits — SL + TP together 5. Test with small size — Verify triggers work 6. Account for fees — Include in trigger price
/**
* Triggers CLI Skill
*
* Commands:
* /triggers list - List active triggers
* /triggers create <event> <action> - Create trigger
* /triggers delete <id> - Delete trigger
* /triggers cron <expr> <action> - Create cron trigger
* /triggers events - List available events
*/
import type { CronJob, CronJobCreate } from '../../../cron/index';
// In-memory cron service instance (lazy init)
let cronInstance: any = null;
async function getCronService() {
if (cronInstance) return cronInstance;
try {
const { createCronService } = await import('../../../cron/index');
const { initDatabase } = await import('../../../db/index');
const db = await initDatabase();
cronInstance = createCronService({
db,
feeds: {} as any, // Triggers don't need feeds
sendMessage: async () => null,
});
return cronInstance;
} catch (error) {
const { logger } = await import('../../../utils/logger');
logger.error({ error }, 'Failed to initialize cron service');
return null;
}
}
function formatJob(job: CronJob): string {
const schedule = job.schedule.kind === 'cron'
? job.schedule.expr
: job.schedule.kind === 'every'
? `every ${job.schedule.everyMs / 1000}s`
: `at ${new Date(job.schedule.atMs).toLocaleString()}`;
const status = job.enabled ? 'active' : 'disabled';
const next = job.state.nextRunAtMs ? new Date(job.state.nextRunAtMs).toLocaleString() : 'n/a';
return `**${job.id}** ${job.name} [${status}]\n Schedule: ${schedule}\n Next: ${next}\n Payload: ${job.payload.kind}`;
}
async function execute(args: string): Promise<string> {
const parts = args.trim().split(/\s+/);
const cmd = parts[0]?.toLowerCase() || 'help';
try {
const cron = await getCronService();
switch (cmd) {
case 'list':
case 'active': {
if (!cron) return 'Cron service not available.';
const jobs = cron.list({ includeDisabled: true });
if (jobs.length === 0) return 'No active triggers or cron jobs.';
let output = `**Active Triggers** (${jobs.length})\n\n`;
for (const job of jobs) {
output += formatJob(job) + '\n\n';
}
const status = cron.status();
output += `Service: ${status.running ? 'running' : 'stopped'} | Jobs: ${status.jobCount}`;
return output;
}
case 'create': {
const event = parts[1];
const action = parts.slice(2).join(' ');
if (!event || !action) return 'Usage: /triggers create <event> <action>';
if (!cron) return 'Cron service not available.';
const job = cron.add({
name: `trigger:${event}`,
enabled: true,
schedule: { kind: 'every', everyMs: 60000 },
sessionTarget: 'main' as const,
wakeMode: 'next-heartbeat' as const,
payload: { kind: 'systemEvent' as const, text: `Event "${event}" triggered: ${action}` },
});
return `Trigger created (ID: ${job.id})\nEvent: ${event}\nAction: ${action}`;
}
case 'delete':
case 'remove': {
if (!parts[1]) return 'Usage: /triggers delete <trigger-id>';
if (!cron) return 'Cron service not available.';
const removed = cron.remove(parts[1]);
return removed
? `Trigger ${parts[1]} deleted.`
: `Trigger ${parts[1]} not found.`;
}
case 'cron': {
const expr = parts[1];
const action = parts.slice(2).join(' ');
if (!expr || !action) return 'Usage: /triggers cron <cron-expression> <action>\n\nExample: /triggers cron "0 9 * * *" "check portfolio"';
if (!cron) return 'Cron service not available.';
const job = cron.add({
name: `cron:${expr}`,
enabled: true,
schedule: { kind: 'cron' as const, expr },
sessionTarget: 'main' as const,
wakeMode: 'next-heartbeat' as const,
payload: { kind: 'agentTurn' as const, message: action },
});
return `Cron trigger created (ID: ${job.id})\nSchedule: ${expr}\nAction: ${action}`;
}
case 'hooks':
return 'Event hooks are managed via the hooks configuration file.\nSee the Clodds docs for hook setup.';
case 'events':
return `**Available Events**
message, response, tool:before, tool:after, agent:start, agent:stop, gateway:connect, gateway:disconnect, trade:executed, alert:triggered, feed:update`;
default:
return helpText();
}
} catch (error) {
return `Triggers error: ${error instanceof Error ? error.message : String(error)}`;
}
}
function helpText(): string {
return `**Triggers Commands**
/triggers list - List active triggers
/triggers create <event> <action> - Create event trigger
/triggers delete <id> - Delete trigger
/triggers cron <expr> <action> - Create cron trigger
/triggers hooks - List event hooks
/triggers events - Available event types`;
}
export default {
name: 'triggers',
description: 'Event triggers, cron schedules, and webhook hooks',
commands: ['/triggers', '/trigger'],
handle: execute,
};
Related skills
FAQ
Which markets do triggers work across?
Prediction markets, futures, and crypto spot.
How often does it check price?
The trigger service checks on a configurable interval, defaulting to every 5 seconds.