Paper trading: simulate trades with virtual portfolios
Create paper trading accounts, place simulated buy and sell orders, track holdings, and understand the action approval flow for safe financial operations.
Paper trading lets you simulate stock trades with virtual money. Create an account with a starting balance, buy and sell securities, and track your portfolio — all without risking real capital.
Paper trading uses Yoshi’s action approval model. When you create an account or place a trade, the API returns a pending action that must be approved before execution. This safety layer prevents accidental trades.
import Yoshi from "@yoshi-ai/sdk";const yoshi = new Yoshi();const result = await yoshi.paperTrading.accounts.create({ name: "Tech Portfolio", starting_cash_balance: "50000", // $50,000});console.log("Action ID:", result.action_id);console.log("Status:", result.status);console.log("Approve at:", result.approval_url);
The response includes an approval_url — open it in your Yoshi dashboard to approve the account creation.