Notes on trading, infrastructure, and building in public.
What an API should expose to be walked correctly, and what a client should do to walk it safely.
Endpoints bounded by a start and an end truncate whatever falls between them from one end. Which end decides the only direction a client can walk safely, and almost nobody documents it.
Cursor pagination addresses rows by what they are instead of where they are. Opaque tokens, key cursors, and the boundary problem when the key is not unique.
A formal model of paginated APIs, page and offset paging as slices of an ordered sequence, and what breaks the moment the data moves under the walk.
How leading derivatives venues implement isolated, cross, and portfolio margin—and where similar product names conceal different risk models.
How scenario-based portfolio margin measures joint risk, credits real hedges, and adds buffers for risks its stress grid can miss.
How cross margin pools collateral across positions, calculates account-wide requirements, and fails to recognize offsetting hedges.
How isolated margin determines position limits, collateral requirements, and liquidation thresholds for futures and perpetuals.
Every exchange invented its own names for everything. Catalogue is the translation layer — a free, open API for crypto assets, networks, and instruments.
Why we built our own async, validated Python clients for every crypto exchange we trade on — and why we're making them public.
How to write API clients for simplicity, precision and ease of use.
An introduction to perpetual instruments and the arbitrage that makes them work.
An introduction to futures contracts, their pricing, linearity, and equivalence of multiple positions.