Skip to main content
POST /v1/orders/preview runs an order without placing it. It takes the same body as placing an order, and nothing is recorded or sent. Use it to:
  • check an order is valid, and collect every problem in one call;
  • see what it would cost and how far the book would move;
  • show a person the outcome before they approve it.

A preview

  • order is the order as it would be sized now.
  • estimate walks the current order book: the average price you would get, how far that is from the mid price in basis points, the value that would fill, and the fee.
  • position_after and account_after are where you would stand if the order filled as estimated.
An estimate is not a quote. The book moves, so the real fill can differ.

When the order would be refused

A preview answers 200 for any JSON body. If the order would be refused, valid is false, and errors lists every reason at once, with the same error objects placing it would return:
The preview checks everything placing the order would: the fields, the market’s rules, your key’s limits and your balance. It does not use any of your key’s daily budget.

Asking a person first

A preview makes a simple approval step. Show the person the order and its estimate, and place it only when they approve:
The order is sized again when it is placed, at the price at that moment, so its size can differ slightly from the preview’s.