Open the app

Take an offer

Buy from an ask or sell to a bid. Units, cash and the fee settle in one instruction.

Taking an offer trades at a price already on the board: you buy from an ask or sell to a bid, and pay the settlement fee. The units and the cash cross in one instruction.

Before you start

  • You are admitted, and you didn't post the offer.
  • To take an ask: units times price plus the fee, free in your ledger cash.
  • To take a bid: the units, free in your position.

In the app

  1. Pick an offer

    In Markets, open the instrument. Its Offer board lists bids and asks with price, size and maker; choose one.

  2. Enter the units

    The panel reads Buy from this ask or Sell to this bid. Enter units, up to the offer's open size, and press Review trade: it shows both legs and the settlement fee before you sign.

  3. Sign and settle

    The trade settles with its signature, and See it on the ledger opens it on the ledger. If any leg is short, the panel shows Failed with the program's error name and nothing moves.

Through the API

ts
const { bids } = await api.book('HALDEN')
const best = bids[0] // highest bid first
if (best) {
  const build = await api.buildTakeOffer({ wallet, offerId: best.id, units: '25' })
  // build.summary.legs: your units to the maker, the maker's cash to you; build.summary.fee
  await send(build, sign)
}

Bids come highest first and asks lowest first. send is the helper from A first settlement.

What it ends in

You takeYou payYou receive
An askunits × price + fee, from free cashthe units, in your free lane
A bidthe units, from your free laneunits × price − fee, in free cash

The maker's side comes out of their lock. The offer's open size falls by your units, and closes at zero. The instrument's last price becomes the offer's price, and the settlement is the kind trade, with every leg and the fee.

If it fails

  • SelfTrade: you posted this offer.
  • OfferTooSmall: more units than the offer has open. Read the book again: someone may have filled part of it.
  • InsufficientFreeCash: taking an ask, your free cash is short of the cash leg plus the fee.
  • InsufficientFreeUnits: taking a bid, your free units are short.
  • NotAdmitted: the wallet isn't a member.