NightshadeDocs

Trade

Swaps

Trade at the best prices on the public book.

A swap trades at the best prices on the Public Book right now. Open a market, type how much you pay or how much you want, and press Swap.

What the form shows

  • You pay and You receive (after fees), with your balance of each and buttons for 25%, 50% and all of it.
  • Average price across everything the swap takes, and Price impact: how far that average is from the best price on the book.
  • Orders taken: the price pools the swap fills, best first.
  • Fee: the taker fee, 0.2%. A buyer pays it on top of what they spend; a seller has it taken off what they get. See Fees.

Exactly these pools

Your wallet proves the swap against the pools the form shows, and the swap takes exactly those, never at a worse price. Two buys (or two sells) on the same market at the same moment want the same best pool, so only one can land. A buy and a sell at the same moment both can.

If another trade takes your pools first, the form doesn't make you start again: it queues your swap, and it fills with the next batch at your price or better. If other swaps are already waiting on your side when you press Swap, yours joins them straight away. The queue and batches explains how batches work and who sends them.

Big swaps

One swap crosses up to 8 price pools, however many makers share each one. If what you typed needs more, the form says the swap fills part of it. Swap again for the rest.

Price impact turns amber from 5%, and from 15% the form asks you to confirm before it sends. A smaller amount or a limit order usually does better.

No sellers

If nobody is selling what you want, the form says so. Place a limit order instead, and it fills when someone sells at your price.

Swapping privately

A swap on the Public Book shows your Midnight address paying in and receiving. To keep it private, trade private twins on the Private Book or in the Dark Pool.