SIM Live Portfolio
Cash: Portfolio: Equity: P/L: —

Help & User Guide

Everything you need to know about using Codebull

Getting Started

What is Codebull?

Codebull is a modern trading platform that allows you to paper trade, experiment with strategies, and deploy automated trading bots—all from your browser. Whether you're learning trading basics or testing sophisticated algorithms, Codebull provides a sandbox environment with real market data.

First Steps
  1. Create an Account: Sign up with email or Google to get started with a virtual $10,000 balance.
  2. Browse Instruments: Visit the Instruments page to explore available stocks and securities.
  3. Place Your First Order: Use the Quick Trade form on the Dashboard to buy or sell.
  4. Monitor Your Portfolio: Check your Portfolio to see positions and P&L.

Trading

Order Types
  • Market Order: Executes immediately at the best available price.
  • Limit Order: Sets a maximum (buy) or minimum (sell) price. Only executes when the market reaches your price.
  • Stop Loss: Triggers a market order when price reaches your stop price—useful for limiting losses.
  • Stop Limit: Combines stop and limit: triggers a limit order when stop price is reached.
  • Trailing Stop: Dynamically follows the price at a specified distance, locking in profits as the market moves in your favor.
Placing Orders

Use the Quick Trade form on the Dashboard or visit the Orders page:

  1. Select a symbol (e.g., AAPL, TSLA)
  2. Choose Buy or Sell
  3. Enter quantity
  4. Select order type and set any required prices
  5. Click Submit
Order Matching

Codebull uses a real-time order book matching engine. Market orders execute immediately against the best available opposite orders. Limit orders wait in the book until matched with a counterparty.

Portfolio Management

Your Positions

The Portfolio page shows all your open positions with:

  • Quantity held
  • Average cost basis
  • Current market value
  • Profit/Loss (realized and unrealized)
Cash Balance

Your account balance tracks available cash and updates in real-time as you trade. Multi-currency support and auto-FX conversion are available in advanced tiers.

Instruments

Instrument Catalog

Browse available instruments on the Instruments page. Search by symbol, name, or ISIN. Real-time price data is provided via Yahoo Finance.

Market Data

Instruments automatically refresh in the background with gentle rate-limiting to respect data provider limits. Historical data is available for backtesting strategies.

Strategies & Automation

What are Strategies?

Strategies are automated trading bots written in Python that run server-side. They receive real-time price updates and can place orders automatically based on your logic.

Creating a Strategy

Visit the Strategies page and click "New Strategy":

  1. Write your strategy code in the editor
  2. Define an on_new_tick(self, symbol, price, ctx) method
  3. Use ctx.place_order() to submit orders
  4. Use ctx.log() for debugging
  5. Enable the strategy to start receiving ticks
Example Strategies
class Strategy:
    def __init__(self):
        self.last_price = None
    
    def on_new_tick(self, symbol, price, ctx):
        # Simple momentum strategy
        if self.last_price and price > self.last_price * 1.01:
            ctx.place_order(symbol, "buy", 10, "market")
            ctx.log("Bought on uptrend", price=price)
        
        self.last_price = price
Backtesting with Simulator

Test strategies on historical data using the Simulator. Set a date range, select symbols, and watch your strategy execute against past market conditions. Perfect for validating logic before going live.

Arena - Strategy Competition

What is Arena?

Arena is a competitive environment where multiple strategies compete against each other in a shared market. Each strategy starts with equal capital and trades on the same instruments over a defined period.

Creating an Arena

Visit the Arena page:

  1. Click "Create Arena"
  2. Select strategies to compete
  3. Set time range and symbols
  4. Configure starting capital
  5. Run and compare results in real-time
Understanding Results

Arena shows a leaderboard ranked by profit, displaying each strategy's ROI%, final balance, trade count, and win rate.

Frequently Asked Questions

No, Codebull uses virtual (paper) money for all trades. It's a safe environment to learn and experiment without financial risk.

We use Yahoo Finance data which updates every few minutes. It's near real-time but may have slight delays compared to professional data feeds.

Accounts start with $10,000 virtual cash. You can add or reset your balance anytime from the Portfolio page.

Use ctx.log() in your strategy code to write messages to the strategy log. View logs in real-time on the Strategies page. You can also use the Simulator to step through historical ticks and observe behavior.

Strategies are written in Python and run server-side in a sandboxed environment. You have access to math, statistics, and basic builtins.

Strategy order placement has rate limits (default 100 orders per strategy). API calls follow standard REST best practices. Excessive usage may be throttled.

Support & Resources

Documentation
Community & Contact

Need help? Have suggestions?

💡 Quick Tips
  • Start small: Test strategies with small quantities before scaling up
  • Use the Simulator: Always backtest strategies on historical data first
  • Monitor logs: Check strategy logs regularly to understand bot behavior
  • Limit orders: Use limit orders to control execution price
  • Risk management: Implement stop losses to protect against large losses