Docs
API https://api.orblivion.com Home

Build-along: the code

In the build-along film, $ORBLIVION's own Orbio agent gets a wallet and trades real money through Orblivion. These are the scripts it runs, for you to read and run yourself. They use only the published SDK (orblivion 0.1.1 or later), and they're short on purpose: read them before you run them.

Last updated: 12 October 2026

The scripts#

ScriptWhat it doesSends anything?
keys.pymakes the agent's wallet key on your machine, in ~/.orblivion. The key is never printed.no
first_trade.pysells $5 of ETH for USDG by hand: a dry run with every check first, then the tradeyes, after you type SEND
house_agent.py createcreates a hosted rebalance agent (half ETH, half USDG) and signs its session: $10 a trade, $40 a day, ETH and USDG onlyone setup transaction, after SEND
house_agent.py gasshows how much ETH the agent's executor holds for gasno
checks.pythree trades Orblivion refuses before anything is signedno
house_agent.py start, watch, everyswitches the agent on, follows what it does, sets how often it checksstart lets it trade
house_agent.py off, renewthe off switch, then a fresh sessionoff sends the on-chain revoke
common.pywhat the scripts share: loading the key and the SEND promptno

Nothing real is sent unless you type SEND. The scripts are under the MIT License (LICENSE.txt).

Run it#

Shell
pip install "orblivion>=0.1.1"
python keys.py
  1. Send the printed wallet address the ETH you want it to trade (the film uses $100).
  2. python first_trade.py
  3. python house_agent.py create
  4. python house_agent.py gas, then send the executor what it asks for (about $2 of ETH).
  5. python house_agent.py start, then python house_agent.py watch.

Keep in mind#

  • The key in ~/.orblivion controls the wallet. Never share or commit it, and use a wallet that holds only what the agent trades.
  • The session's caps are enforced on chain, and Orblivion's co-signer checks every trade too. off ends the session at once.
  • A session lasts at most 30 days. Run renew before it ends to keep the agent trading.
  • This is example code, not financial advice. You bear the outcome of every trade it makes; see the Terms of Use.

Differences from the film#

The film ran SDK 0.1.0 and needed two extra commands, which these scripts no longer have:

  • smart: from 0.1.1, sessions.setup() sets a plain wallet's smart-account code itself (Sessions).
  • size: Orblivion now sizes an order down to fit the session's caps, so the agent can ask for its full limit.