Petri: terminal and command line
Petri is Amoeba’s command-line app. The command is petri. It trades capped futures on the RAMX and NANDX memory-chip indexes, reads and writes the index oracle, and lets a local AI agent read markets through a Model Context Protocol (MCP) connection.
| Question | Answer |
|---|---|
| What can I trade? | A range of the RAMX or NANDX index, for one expiry. A long gains as the index settles higher inside the range; a short gains as it settles lower. |
| How much can I lose? | What you pay up front, and no more. A long pays its price; a short puts in the rest of the range’s value. There are no liquidations and no margin calls. |
| What can I make? | A fixed amount per lot for every index point inside your range: $0.01 per lot per point. A long collects the points the index settles above the range’s low end, up to its high end; a short collects the points below the high end, down to the low end. |
| When does it settle? | At the market’s expiry, on the oracle’s value of the index. A market named for a month settles at 00:00 UTC on the first day of the next month. You can close earlier. |
Availability
Section titled “Availability”Petri trades the capped futures markets on Solana mainnet, in real USDC. Out of the box it connects to Amoeba’s futures API at https://api.amoeba.farm and to Solana’s public mainnet RPC at https://api.mainnet-beta.solana.com, and trusts only Amoeba’s production programs; there is nothing to set up. petri config show shows the addresses in use. Solana’s public RPC is rate-limited: if you trade or read a lot, use your own mainnet RPC with --rpc or PETRI_RPC_URL, or save it with petri config set rpc. See Configuration and wallet safety.
Positions are paid in USDC from your wallet. With the local route your wallet also pays each transaction’s network fee in SOL; the sponsored route needs no SOL. See Fees and transaction costs.
First commands
Section titled “First commands”petri wallet new # create a signing wallet; prints only its addresspetri wallet # its address, SOL, USDC and cash in each marketpetri markets # every market: price, index, settlementpetri market ramx # one market: price, index, suggested rangepetri quote long ramx 100 # price 100 lots without sending anythingpetri long ramx 100 # go long 100 lots at 10x on the suggested rangepetri positions # your positions, orders, cash and P&Lpetri close ramx 78 # close position #78petri withdraw ramx-oct26 all # after settlement: move the cash to your walletFund a new wallet before you trade: send it USDC on Solana (mint EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v), and some SOL if you use the local route.
petri on its own shows a short guide and whether a wallet is attached. petri help lists every command, and every command explains itself with --help. Add --json to any command for structured output.
How a position works
Section titled “How a position works”A position is a claim on a range of the index, from a low end to a high end. Here is petri quote long ramx 100 with RAMX near 97:
Long 100 RAMX Oct 26 · range 87–135 · 10x Entry 97.37 average Per point $1.00 from 87 to 135 You pay $10.37, the most you can lose Pays up to $48.00 if RAMX settles at 135 or aboveAt settlement this long collects $1.00 (100 lots × $0.01) for every point RAMX settles above 87, up to 135. If RAMX settles at 110, it pays $23.00: a $12.63 gain. At 87 or below it pays nothing, and the $10.37 is lost. It can never lose more.
A short collects the points below the high end instead, down to the low end. It puts in the rest of the range’s value up front: on this range at this entry, $48.00 − $10.37 = $37.63.
- Leverage (
-x, default 10) sets the losing end: entry minus entry ÷ leverage for a long, entry plus entry ÷ leverage for a short. Higher leverage costs less, and is lost after a smaller move. --tosets the winning end. By default it is the end of the market’s suggested range, where the index can reach by expiry (2σ).--range LO-HInames both ends instead.
Different ranges trade against each other on one book, with a treasury market maker filling in the pieces between them. There is no trading fee.
Name a market
Section titled “Name a market”Each market is one index and one expiry, such as RAMX Oct 26. Name it by:
- symbol:
ramxornandx, the open market of that index that expires first; - name:
ramx-nov26; - address.
--expiry picks another expiry for a bare symbol: petri market ramx --expiry nov26.
Every order is quoted first
Section titled “Every order is quoted first”petri long, short, close, cancel, deposit and withdraw show what they will do and ask before sending. --yes sends without asking. An order takes the USDC it needs from your wallet in the same transaction, so you don’t have to deposit first.
--route decides who pays the Solana network fee. With local, your wallet pays and Petri builds the order from the chain itself. With sponsored, the futures API prepares the transaction and its sponsor pays; Petri checks the transaction before it signs. auto, the default, uses local when your wallet has SOL for fees. See Trading and wallet actions.
What Petri does not do
Section titled “What Petri does not do”- Earn. Petri has no Earn commands. Use the web app.
- Sign through an AI agent. The MCP connection only reads. Trades and oracle writes run in your own terminal. See Connect an AI agent.
Install
Section titled “Install”Packaged Petri apps for Windows and macOS that trade on Solana mainnet are coming with Petri’s mainnet release. This page will say where to download them once the release is out. Each package will have a matching .sha256 checksum file: check it before you open the package.
Install from source
Section titled “Install from source”You can build Petri yourself from the cli/ folder of Amoeba’s source tree, which also holds the futures SDK and the oracle program crate it builds against. You need Rust 1.93.1, and Node.js 24 on your PATH for the oracle research workspace.
cargo build --release --locked --bin petri./target/release/petri --versionA build from source is not publisher-signed or Apple-notarized. Build only from source you trust.
Updates
Section titled “Updates”Packaged apps update themselves on request:
petri update check # is a newer release available?petri update # review and confirm the updatepetri update --restart # update, then reopen the terminal interfacepetri update recover # restore the previous app files after an interrupted updatepetri update asks for confirmation; --yes approves it without a prompt. Updates come only from Petri’s official GitHub releases and must match their published SHA-256 checksums. Your wallet files, settings and agent connections are left alone. Close other Petri windows before updating. A build from source updates from Git instead; see Command reference.
The terminal interface
Section titled “The terminal interface”petri tui opens Petri’s terminal interface. It has a Markets view next to the oracle research workspace, where contributors connect research agents and follow their evidence and rewards.
Wallet safety
Section titled “Wallet safety”petri wallet newsaves a new key file that only you can read, and prints only its address. Petri never prints a private key.- Never put a seed phrase, private key or key file contents in a command, a chat or an MCP setting.
- Reads work with any public address, such as
petri positions <OWNER>, without opening a key file.

