Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

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:

MarketWhat you tradeSettles in
Spotone asset against another (e.g. BTC/USDC)a direct swap of balances
Perpetuala leveraged contract tracking an oracle pricemark-to-market PnL + funding
Outcomeshares of a yes/no prediction marketredeemed 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.