Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Lumibot
Light Logo Dark Logo

Start here

  • Home
  • Build and Deploy with BotSpot
  • BotSpot MCP Integration
  • Claude Code, Codex and Cursor
  • Start Here / Python Setup
  • The lumibot Command
  • Python Strategy Examples
  • AI Quickstart
  • AI Examples
    • Nancy Pelosi Stock Trading Bot
    • Nancy Pelosi Copy Trading Bot
    • Insider Trading Bot
    • Warren Buffett AI Stock Picker
    • Bill Ackman Portfolio AI Trading Bot
    • Fear and Greed Index Trading Bot
    • Bull vs Bear AI Stock Trading Bot
    • TQQQ Strategy AI Trading Bot
    • AI Iron Condor Trading Bot
    • Put Credit Spread AI Trading Bot
    • 0DTE Options AI Trading Bot
    • VWAP Strategy AI Trading Bot
    • Opening Range Breakout AI Trading Bot
    • Citadel Sector Pods AI Trading Team
    • Ray Dalio Idea Meritocracy AI Trading Team
  • Backtest, Paper, or Live
  • For Coding Agents

AI trading

  • AI Agent Guide
    • Design Your AI Trading Team
    • Use your ChatGPT subscription
    • Agent Built-In Tools
    • Stateful Browser Tools
    • One-Agent AI Trading Bot Demos
    • AI Agent Observability
    • Agent Memory
    • Agent Notifications
  • The Execution Gap
  • Compare AI Frameworks
    • Lumibot vs TradingAgents
    • Lumibot vs ai-hedge-fund
    • LumiBot vs OpenAlice
    • Lumibot vs QuantDinger
    • Lumibot vs QuantConnect LEAN
    • LumiBot vs freqtrade
    • LumiBot vs Backtrader

Build strategies

  • Strategy API
  • Imports and Startup
  • Reusable Components
  • Lifecycle Methods
    • Summary
    • def initialize
    • def on_trading_iteration
    • def before_market_opens
    • def before_starting_trading
    • def before_market_closes
    • def after_market_closes
    • def on_abrupt_closing
    • def on_bot_crash
    • def trace_stats
    • def tearsheet_custom_metrics
    • def on_new_order
    • def on_partially_filled_order
    • def on_filled_order
    • def on_canceled_order
    • def on_parameters_updated
  • Strategy Methods
    • Order Management
      • self.create_order
      • self.submit_order
      • self.submit_orders
      • self.cancel_order
      • self.cancel_orders
      • self.cancel_open_orders
      • self.get_selling_order
      • self.sell_all
      • self.get_order
      • self.get_orders
      • self.get_asset_potential_total
    • Account Management
      • self.adjust_cash
      • self.configure_cash_financing
      • self.deposit_cash
      • self.get_portfolio_value
      • self.get_cash
      • self.get_position
      • self.get_positions
      • self.set_cash_financing_rates
      • self.withdraw_cash
    • Data
      • self.get_last_price
      • self.get_last_prices
      • self.get_historical_prices
      • self.get_historical_prices_for_assets
      • self.get_quote
      • self.get_quotes
      • self.get_yesterday_dividend
      • self.get_next_trading_day
    • Chart Functions
      • self.add_marker
      • self.add_line
      • self.add_ohlc
      • self.get_markers_df
      • self.get_lines_df
    • Parameters
      • self.get_parameters
      • self.set_parameters
    • Options
      • self.get_chain
      • self.get_chains
      • self.get_greeks
      • self.get_strikes
      • self.get_expiration
      • self.get_multiplier
      • self.options_expiry_to_datetime_date
      • self.get_next_trading_day
    • DateTime
      • self.get_datetime
      • self.get_timestamp
      • self.get_round_minute
      • self.get_last_minute
      • self.get_round_day
      • self.get_last_day
      • self.get_datetime_range
      • self.localize_datetime
      • self.to_default_timezone
    • Miscellaneous
      • self.log_message
      • self.sleep
      • self.set_market
      • self.update_parameters
      • self.get_parameters
      • self.await_market_to_close
      • self.await_market_to_open
      • self.wait_for_order_registration
      • self.wait_for_order_execution
      • self.wait_for_orders_registration
      • self.wait_for_orders_execution
      • self.register_cron_callback
  • Strategy Properties
    • self.cash
    • self.portfolio_value
    • self.first_iteration
    • self.is_backtesting
    • self.quote_asset
    • self.name
    • self.initial_budget
    • self.minutes_before_closing
    • self.minutes_before_opening
    • self.sleeptime
    • self.last_on_trading_iteration_datetime
    • self.timezone
    • self.pytz
    • self.unspent_money
  • Assets and Orders
    • Asset
    • Bars
    • Data
    • Order
    • Partial execution observations
    • Position
    • Trading Fee
    • Trading Slippage
    • Smart Limit Config
    • Chains Entity
  • SEC Fundamentals
  • Macro Data

Indicators

  • Custom Indicators: What They Can Do
  • Build Your First Indicator
  • Settings and Outputs
  • Price Chart or Own Pane
  • Indicators in Backtests
  • Indicators in Live Strategies
  • Stream Live from a Crypto Exchange
  • Outside Data in an Indicator
  • Matching TradingView Numbers
  • Indicator Examples
  • Compare and FAQ
  • Indicator Reference
  • The self.indicators Accessor

Backtest and trade

  • Backtesting
    • How to Backtest a Python Trading Strategy with LumiBot
    • Files Generated from Backtesting
    • Backtesting Function
    • Backtesting Performance (Speed + Parity)
    • Free Daily Stock Backtesting with Yahoo and LumiBot
    • Pandas (CSV or other data)
    • Polygon.io Backtesting
    • Databento Backtesting with LumiBot
    • ThetaData Options and Stock Backtesting with LumiBot
    • Interactive Brokers (REST) Backtesting
    • Alpaca Backtesting
    • LumiBot Backtest Tear Sheets and Performance Reports
    • Trades Files
    • Indicators Files
    • Logs CSV
  • Brokers
    • Stocks
      • Alpaca
      • Charles Schwab
      • Interactive Brokers
      • Interactive Brokers (legacy TWS)
      • Tradier
    • Options
      • Alpaca
      • Charles Schwab
      • Interactive Brokers
      • Interactive Brokers (legacy TWS)
      • Tradier
    • Futures
      • Tradovate
      • TopstepX (ProjectX)
      • Interactive Brokers
      • Interactive Brokers (legacy TWS)
      • Bitunix (crypto perpetuals)
    • Crypto
      • How crypto exchange setup works
        • Alpaca crypto exchange setup
      • MetaMask Agent Wallet beta
      • Bitunix
      • Alpaca
      • AftermathFinance
      • Apex
      • Backpack
      • Bequant
      • BigONE
      • Binance
      • Binance COIN-M
      • Binance US
      • Binance USDⓈ-M
      • BingX
      • Bit2C
      • bitbank
      • Bitfinex
      • bitFlyer
      • Bitget
      • Bithumb
      • BitMart
      • BitMEX
      • BitoPro
      • Bitrue
      • Bitso
      • BitTrade
      • Bitvavo
      • BloFin
      • BTC Markets
      • BTCTurk
      • Bullish
      • Bybit
      • Bybit EU
      • CEX.IO
      • Coinbase Advanced
      • Coinbase Exchange
      • Coincheck
      • CoinEx
      • CoinMate
      • CoinOne
      • Coins.ph
      • CoinSpot
      • Crypto.com
      • Cryptomus
      • Deribit
      • DigiFinex
      • dYdX
      • Extended
      • FMFW.io
      • Foxbit
      • Gate
      • Gate EU
      • Gemini
      • HashKey Global
      • Hibachi
      • HitBTC
      • HollaEx
      • HTX
      • Hyperliquid
      • Independent Reserve
      • INDODAX
      • Kraken
      • Kraken Futures
      • KuCoin
      • KuCoin Futures
      • Latoken
      • LBank
      • Lighter
      • Luno
      • Mercado Bitcoin
      • MEXC Global
      • Mudrex
      • MyOKX (EEA)
      • NDAX
      • OKX
      • OKX (US)
      • One Trading
      • p2b
      • Pacifica
      • Paradex
      • Paymium
      • Phemex
      • Poloniex
      • Toobit
      • Upbit
      • Weex
      • WhiteBit
      • WOO X
      • WOOFI PRO
      • XT
      • Zaif
      • Zebpay
    • Forex
      • Interactive Brokers
      • Interactive Brokers (legacy TWS)
    • Prediction markets
      • Polymarket
    • Backtesting data sources
    • All brokers A to Z
  • Cash Accounting
  • Deployment
  • Reference
    • Variable Backup & Restore
    • Futures Trading
    • Smart Limit Orders
    • OptionsHelper
    • Environment Variables
  • Common Mistakes
  • FAQ

Community and learning

  • Free AI Trading Challenge
  • Partnerships and Sponsorship
  • Migrate from Backtrader
  • GitHub
  • Reddit Community
  • Discord Community
  • Get Pre-Built Strategies
Back to top
View this page

Entities¶

Entities are the main object types that are passed around within Lumibot to place orders, get to know your positions, load data and more.

Here’s a list of the main entities in Lumibot:

Contents:

  • Asset
  • Bars
  • Data
  • Order
  • Partial execution observations
  • Position
  • Trading Fee
  • Trading Slippage
  • Smart Limit Config
  • Chains Entity
Next
Asset
Previous
self.unspent_money
Copyright © 2021, Lumiwealth
Made with Sphinx and @pradyunsg's Furo
Last updated on November 05, 2026