소스 정보
- 저장소
- alsk1992/CloddsBot
- 최근 소스 활동
- 2026년 2월 5일 16:34
- 감지된 SKILL.md 언어
- 영어
- 스타
- 716
- 포크
- 155
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/alsk1992/CloddsBot --skill positions명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | positions |
| description | Position management with stop-loss, take-profit, and trailing stops |
| emoji | 📍 |
Manage open positions with automated stop-loss, take-profit, and trailing stop orders.
/positions List all positions
/positions poly Polymarket positions only
/positions futures Futures positions only
/position <id> Position details
/sl <position-id> at 0.35 Set stop-loss price
/sl <position-id> -10% Stop-loss 10% below entry
/sl poly "Trump" at 0.35 Set by market name
/tp <position-id> at 0.65 Set take-profit price
/tp <position-id> +20% Take-profit 20% above entry
/tp poly "Trump" at 0.65 Set by market name
/trailing <position-id> 5% Trail 5% from high
/trailing <position-id> $0.05 Trail $0.05 from high
/tp <position-id> at 0.55 size 50% Take profit on half
/sl <position-id> at 0.40 size 25% Stop-loss on quarter
import { createPositionManager } from 'clodds/positions';
const positions = createPositionManager({
// Monitoring
checkIntervalMs: 5000,
// Execution
orderType: 'market', // 'market' | 'limit'
limitBuffer: 0.01, // Buffer for limit orders
// Storage
storage: 'sqlite',
dbPath: './positions.db',
});
// Start monitoring
await positions.start();
const all = await positions.list();
for (const pos of all) {
console.log(`${pos.id}: ${pos.platform} ${pos.market}`);
console.log(` Side: ${pos.side}`);
console.log(` Size: ${pos.size}`);
console.log(` Entry: ${pos.entryPrice}`);
console.log(` Current: ${pos.currentPrice}`);
console.log(` P&L: ${pos.pnl} (${pos.pnlPercent}%)`);
console.log(` Stop-loss: ${pos.stopLoss || 'none'}`);
console.log(` Take-profit: ${pos.takeProfit || 'none'}`);
}
// Absolute price
await positions.setStopLoss({
positionId: 'pos-123',
price: 0.35,
});
// Percentage from entry
await positions.setStopLoss({
positionId: 'pos-123',
percentFromEntry: 10, // 10% below entry
});
// Percentage from current
await positions.setStopLoss({
positionId: 'pos-123',
percentFromCurrent: 5, // 5% below current
});
// Partial stop-loss
await positions.setStopLoss({
positionId: 'pos-123',
price: 0.35,
sizePercent: 50, // Exit 50% of position
});
// Absolute price
await positions.setTakeProfit({
positionId: 'pos-123',
price: 0.65,
});
// Percentage from entry
await positions.setTakeProfit({
positionId: 'pos-123',
percentFromEntry: 20, // 20% above entry
});
// Multiple take-profit levels
await positions.setTakeProfit({
positionId: 'pos-123',
levels: [
{ price: 0.55, sizePercent: 25 }, // 25% at 0.55
{ price: 0.60, sizePercent: 25 }, // 25% at 0.60
{ price: 0.70, sizePercent: 50 }, // 50% at 0.70
],
});
// Percentage trail
await positions.setTrailingStop({
positionId: 'pos-123',
trailPercent: 5, // Trail 5% below high
});
// Absolute trail
await positions.setTrailingStop({
positionId: 'pos-123',
trailAmount: 0.05, // Trail $0.05 below high
});
// Activate after target
await positions.setTrailingStop({
positionId: 'pos-123',
trailPercent: 5,
activateAt: 0.55, // Only start trailing after 0.55
});
// Remove stop-loss
await positions.removeStopLoss('pos-123');
// Remove take-profit
await positions.removeTakeProfit('pos-123');
// Remove trailing stop
await positions.removeTrailingStop('pos-123');
// Remove all
await positions.removeAllStops('pos-123');
// Stop-loss triggered
positions.on('stopLossTriggered', (position, result) => {
console.log(`🛑 Stop-loss hit: ${position.market}`);
console.log(` Entry: ${position.entryPrice}`);
console.log(` Exit: ${result.exitPrice}`);
console.log(` P&L: ${result.pnl}`);
});
// Take-profit triggered
positions.on('takeProfitTriggered', (position, result) => {
console.log(`✅ Take-profit hit: ${position.market}`);
console.log(` P&L: ${result.pnl}`);
});
// Trailing stop triggered
positions.on('trailingStopTriggered', (position, result) => {
console.log(`📉 Trailing stop hit: ${position.market}`);
console.log(` High: ${position.highWaterMark}`);
console.log();
});
positions.(, {
.();
});
const summary = await positions.getSummary();
console.log(`Total positions: ${summary.count}`);
console.log(`Total value: $${summary.totalValue}`);
console.log(`Unrealized P&L: $${summary.unrealizedPnl}`);
console.log(`With stop-loss: ${summary.withStopLoss}`);
console.log(`With take-profit: ${summary.withTakeProfit}`);
| Type | Description |
|---|---|
| Stop-Loss | Exit when price drops to limit losses |
| Take-Profit | Exit when price rises to lock in gains |
| Trailing Stop | Dynamic stop that follows price up |
| Break-Even | Move stop to entry after profit target |
| Option | Description |
|---|---|
market | Immediate execution at current price |
limit | Execute at specified price or better |
buffer | Add buffer to limit price for fills |