RADIX WikiRADIX Wiki

How do I script Radix in Python?

Read the ledger by sending JSON over HTTPS to the Gateway API, which any HTTP library such as requests can do, and build and sign transactions with radix-engine-toolkit; neither needs a Radix node of your own. Install both with pip:

pip install requests
pip install radix-engine-toolkit

The Gateway answers at https://mainnet.radixdlt.com for mainnet and https://stokenet.radixdlt.com for Stokenet, the test network, and needs no API key (Network APIs). A first call to try is a POST of an empty JSON object, {}, to /status/gateway-status, which returns the network's current epoch and ledger state version. radix-engine-toolkit is the Python package of the Radix Engine Toolkit; its current release on PyPI is 2.3.5, published on 25 March 2026, for Python 3.6 or later.

Using Python with Radix takes both steps in full, with the Gateway calls for reading ledger data and the toolkit's steps for building and submitting a transaction. This page collects the Python programs on this wiki that work with Radix.

Worked examples

Proof of Work is a short script that mines SHA-256 hashes to a set number of leading zeros, the mechanism Bitcoin uses to make it costly to create many identities, and needs nothing beyond Python's standard library. Radix itself secures its ledger by delegated proof of stake instead. DLT Efficiency Metric is an experiment that compares blockchain ecosystems by dividing their GitHub repository count by their Google Trends search interest, with a sample run from 14 July 2023 covering Ethereum, Solana, Avalanche, Cardano and Radix.

HydrateLast updated 10h agov1.1.02 revisions
CiteRADIX Wiki. "Python Scripts for Radix." November 18, 2026. https://radix.wiki/contents/resources/python-scripts