Details
Last updated
Last updated
This proof of concept is a paper trading simulator designed specifically for meme coins on the Solana blockchain. Built fully using python, it has basic features and functionality, allowing users to practice trading strategies without risking real assets, making it an ideal tool for both newcomers and experienced traders looking to test new approaches.
Frontend: Streamlit
Database: DuckDB (Local)
API: CoinGecko, BitQuery
Backend: Python
The POC v1 uses DuckDB as its local database system, implementing two primary tables to manage trading data efficiently.
date
- Date of the trade
time
- Time of the trade
symbol
- Token symbol/ticker (e.g., PPAWS)
token
- Token name
contract_address
- Token's contract address
action
- Type of trade (buy/sell)
market_cap
- Market cap at time of trade
token_price
- Token price at time of trade
token_amt
- Amount of tokens traded
total
- Total SOL value of trade
date
- Position opening date
time
- Position opening time
symbol
- Token symbol/ticker (e.g., PPAWS)
token
- Token name
contract_address
- Token's contract address
market_cap
- Current market cap
average_market_cap
- Average market cap for position
initial_investment
- Total SOL invested
remaining
- Current position value
sold
- Amount sold in SOL
unrealized_profit
- Current unrealized P/L
realized_profit
- Total realized P/L
roi
- Return on Investment (%)
total_token_amt
- Total tokens purchased
remaining_token_amt
- Remaining tokens held
Used for fetching SOL/USD price
Free tier API access
No authentication required
Public endpoint usage
Used for fetching real-time token data
Provides market cap and price information
Requires API key for authentication
Rate limited based on subscription tier
POC v2 manages data through two local files: settings.yaml
and trades.ddb
. When the application is first launched, it automatically creates a settings.yaml
file with default values for balance, trading fees, and API key storage. The trades.ddb
database file, however, must be manually created through the settings page in the user interface. This database is essential for storing trade history and tracking positions, and the application will display a warning message until it's created.
This YAML file serves as the central configuration hub, maintaining user preferences between sessions and ensuring trading parameters remain consistent. The file is easily accessible and can be modified through the settings interface in the application.
api_key
- BitQuery API key
balance
- Available balance (default: 3 SOL)
priority_buy_fee
- Priority buy fee (default: 0.01)
priority_sell_fee
- Priority sell fee (default: 0.01)
The trades database is the core storage system for all trading activity within POC v1. This DuckDB database maintains comprehensive records of all transactions and positions. It tracks every buy and sell order and stores detailed token information. The database enables real-time portfolio monitoring and provides the foundation for all trading functionality within the application. Through this database, users can access their complete trading history and monitor their current positions and performance metrics. The database contains 2 tables:
transactions
table - Records every buy and sell trade executed by the user, storing essential details like date, time, token information, trade type, and transaction values.
positions
table - Tracks all portfolio positions and their performance metrics, including investment amounts, current values, profits/losses, and token quantities.
Implementing a fully local data storage system ensures that all trading data, user settings, and API credentials remain solely on the user's machine, with no transmission to external servers or cloud storage.
This local data management approach ensures that sensitive information, such as trading strategies and portfolio values, stays private and secure. Users maintain complete ownership of their data, with the ability to manage, backup, or delete their information as needed. The application's design eliminates concerns about data breaches or unauthorized access to trading information, as there are no external connections beyond the necessary API calls for real-time market data.
The only external communication occurs through the BitQuery API for token data and CoinGecko API for SOL prices, but these interactions are limited to retrieving market information and do not involve sending any user data outward. This architecture provides users with the confidence that their trading activities and performance metrics remain completely private while still enabling full functionality for paper trading.