Scripts
Write Python and run it on your Furge runtime.
Open Scripts → Scripts from the header. Use an example to start, or create a script from scratch.
Furge uses Python scripting v2. You do not need to install Python on your computer to use the browser editor.
Start with a read-only example
Choose an example that observes market data. A script without trading calls can print data and publish metrics without placing orders.
script = {"name": "candle-monitor", "version": "2", "lookback": 2}
SOURCE = "btc@candles@hyperliquidf:timeframe=60"
def on_data(ctx, history):
candle = history.source(SOURCE, 0)
if candle is None:
return
print(f"BTC close: {candle['c']}")
return {"metrics": {"close": candle["c"]}}This example observes 60-second BTC candles. It contains no trading instructions. Use Data sources in the editor to find a market and insert its source selector.
Editor workflow
Edits save automatically. Wait for Saved before leaving. A run uses a saved revision, so changes in the editor do not rewrite a script already running.
Open Run settings to choose duration and parameter overrides. For supported backtests, also choose the historical UTC date range.
- Backtest runs supported logic on historical data.
- Deploy starts a live run on your runtime after confirmation.
Backtest support depends on the data source and execution action. A live-only source cannot be made historical by choosing an older date.
Read output
Open the run panel or the run's job page. Use Results for returned metrics, Logs for printed output, and Artifacts for files produced by the script.
A quiet script is not always a failed script. Check its source, interval and whether a complete new record has arrived.
Add trading
Live execution uses the configured exchange agent or automated trading wallet. A browser sign-in wallet is not automatically the execution account.
Use the Furge scripting reference for source formats, returned records, execution inputs and Python examples. That reference remains in MarketLab docs; this site explains how to use the Furge app.
If Hedge Builder is enabled for your account, it appears in the Scripts menu. Its availability is separate from the Python editor.