Trading on TxFlow
This section explains how trading on TxFlow works from a trader's point of view — the mechanics, formulas, and worked examples behind margin, liquidation, funding, and fees. If you're integrating programmatically instead, see the Info API and WebSocket API.
TxFlow offers three kinds of markets:
| Market | What you trade | Settles in |
|---|---|---|
| Spot | one asset against another (e.g. BTC/USDC) | a direct swap of balances |
| Perpetual | a leveraged contract tracking an oracle price | mark-to-market PnL + funding |
| Outcome | shares of a yes/no prediction market | redeemed at 0 or 1 on resolution |
Everything settles on-chain and is computed by the same deterministic rules for every trader — there is no hidden matching or off-book treatment.
In this section
- Margin & Leverage — cross vs. isolated, position modes, tiered margin, and the formulas that decide how much you can open.
- Entry Price & PnL — how entry price is averaged, and how unrealized and realized PnL follow from it.
- Liquidation — when it triggers, what happens to your position, and how to read the liquidation price.
- Auto-deleveraging (ADL) — the backstop when the book can't absorb a liquidation, and how to read your ADL light.
- Funding — who pays whom, how much, and when — with a worked example.
- Mark vs. Oracle Price — which price drives PnL, liquidation, and funding.
- Orders & Time-in-Force — order types, GTC/IOC/ALO/GTD, reduce-only, TP/SL, TWAP.
- Fees & Discounts — maker/taker, volume tiers, and the referral discount.
- Referral — how to unlock and use a referral code, invite slots, and what each side earns.