Claude Code Plugins

Community-maintained marketplace

Feedback

using-nautilus-trader

@PoorRican/dotfiles
0
0

Provides expert guidance for NautilusTrader algorithmic trading platform. Covers backtesting strategies, live trading deployment, event-driven architecture, and building trading systems.

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name using-nautilus-trader
description Provides expert guidance for NautilusTrader algorithmic trading platform. Covers backtesting strategies, live trading deployment, event-driven architecture, and building trading systems.

NautilusTrader Skill

High-performance algorithmic trading platform with event-driven architecture. Identical code for backtesting and live trading. Rust/Cython core with Python bindings.

Always consult official docs for current API - the API evolves frequently with breaking changes before v2.x.

File Guide

Core Development

Data & Orders

  • data-models.md - QuoteTick, TradeTick, Bar, InstrumentId, BarType
  • orders.md - Order types, OrderFactory, bracket orders, emulation
  • cache.md - Query instruments, orders, positions, market data

Components

  • actors.md - Actor base class for non-trading components
  • indicators.md - Built-in indicators, registration, custom indicators
  • portfolio.md - Account balances, positions, PnL calculations
  • execution.md - Execution flow, risk engine, execution algorithms

Integration

Reference

Critical Patterns

Register indicators BEFORE subscribing:

self.register_indicator_for_bars(self.bar_type, self.ema)
self.subscribe_bars(self.bar_type)  # Must be after registration

Use strategy's order_factory:

order = self.order_factory.market(
    instrument_id=instrument_id,
    order_side=OrderSide.BUY,
    quantity=Quantity.from_str("1.0"),
)
self.submit_order(order)

BarType string format:

# Format: {instrument_id}-{step}-{aggregation}-{price_type}-{source}
bar_type = BarType.from_str("BTCUSDT.BINANCE-1-MINUTE-LAST-EXTERNAL")

InstrumentId format:

# Format: {symbol}.{venue}
instrument_id = InstrumentId.from_str("BTCUSDT.BINANCE")

Quantity/Price from strings (avoids precision issues):

quantity = Quantity.from_str("1.5")
price = Price.from_str("50000.00")

Check indicator initialization:

def on_bar(self, bar: Bar):
    if not self.ema.initialized:
        return
    # Safe to use self.ema.value

OMS Types

  • OmsType.NETTING - Single position per instrument (crypto-style)
  • OmsType.HEDGING - Multiple positions per instrument (traditional futures)

Account Types

  • AccountType.CASH - Spot trading
  • AccountType.MARGIN - Margin/leverage trading