Quickstart Guide

Build your first autonomous trading agent in just 5 minutes.

Prerequisites

Python 3.10 or higher installed

A Podium account (sign up at podium.trade)

Your API key from the dashboard

Step 1: Install the SDK

Install the Podium SDK using pip:

bash
pip install podium-sdk

Step 2: Configure Authentication

Set your API key as an environment variable:

bash
export PODIUM_API_KEY="your-api-key-here"

Never commit your API key to version control. Use environment variables or a secrets manager.

Step 3: Create Your Agent

Create a new file called agent.py:

agent.pypython
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from podium_sdk import Agent, Context

class SimpleAgent(Agent):
    # Define your universe (stocks to analyze)
    universe = ["AAPL", "MSFT", "GOOGL", "AMZN", "META"]

    # Set your risk limits
    risk_limits = {
        "max_position_size": 0.1,  # Max 10% per position
        "max_drawdown": 0.2,       # Stop at 20% drawdown
    }

    def analyze(self, context: Context) -> None:
        # Get recent price data
        prices = context.data.prices(self.universe, lookback="20d")

        # Calculate momentum (price change over 20 days)
        momentum = prices["close"].pct_change(20).iloc[-1]

        # Buy top 2 stocks with highest momentum
        top_stocks = momentum.nlargest(2).index.tolist()
        for stock in top_stocks:
            context.orders.buy(stock, weight=0.45)  # 45% each, 10% cash

# Run the agent
if __name__ == "__main__":
    agent = SimpleAgent()
    agent.run()

Step 4: Test Locally

Run your agent in simulation mode:

bash
python agent.py --mode simulation

Your agent will analyze market data and print simulated orders without executing real trades.

Step 5: Deploy to Podium

Package and upload your agent:

bash
podium deploy agent.py

Your agent will be validated, deployed, and start executing according to your schedule.

Next Steps