How Do You Place a Paper Trade in Python?
You need an Aries account, a personal-token client (a client ID that starts withARI-PERSONAL-TK.) from the API tab in Client Center, and Python 3. There’s nothing to install. The API and its market data are free with the account, and stock and options brokerage comes from RAM Financial LLC (DBA Aries), member FINRA and SIPC. The Client Credentials guide explains how the token works.
Save this as paper_trade.py:
paper_trade.py
ARIES_BASE=https://api.tradearies.dev). With your own account, leave ARIES_BASE unset and the file calls https://api.aries.com. The account ID above is made up, and F and 1 share are an example, not a recommendation.
Three parts of the file do the work:
simulation_account()asksGET /v2/users/me/accountsfor every account the token can see and returns only an open one whoseis_simistrue. SetARIES_ACCOUNT_IDto pin one account, and it returns that account only if it’s a simulation account. When we pinned a live account’s ID, it stopped with... is not an open simulation account. Nothing was sent.It stops the same way when it finds no simulation account at all.order()sends a market order withPOST /v1/orders. The reply comes back with statusPENDING_NEW, so the function readsGET /v2/accounts/{id}/ordersonce a second until that order showsFILLED.- The User-Agent header. The API turns away Python’s default User-Agent with a 403, so the file sends its own.
What Did the Simulation Fill At?
Our run on Aries' staging server, Nov 30, 2026. The quote was read just before the buy.
NEW. We canceled it with POST /v1/orders/cancel, sending the order’s clOrdId as origClOrdId with the same symbol and side, and got back "status": "CANCELED". The order then dropped off the active list.
How Do Other Brokers Set Up Paper Trading?
Here’s how paper trading works at Aries and four other brokers with trading APIs:
Tradier also gives each account a paper sandbox.
On Aries you keep one set of credentials and one base URL, test on the same market data you’d trade on, and let the guard in
simulation_account() keep the two accounts apart. If you’re coming from Alpaca, Switching From Alpaca maps its paper setup and order fields to the Aries API.
How Do You Move From Paper to Live?
Keep the file and the token. The guard refuses live accounts on purpose, so going live is a change you make on purpose too: for example, a separateLIVE_ACCOUNT_ID setting that the code checks has is_sim set to false. Never let a live account become the fallback when no simulation account turns up.
Before you switch, preview every order first. The trading bot guide shows POST /v1/orders/preview in a full bot. Once you’re live, follow fills on the account updates WebSocket rather than treating a sent order as filled.