Skip to main content

Overview

“My TWAP disappeared” is the most common integration report on Bravado, and every time the order is exactly where it should be. The client was looking in the wrong place. Orders live in two systems. Some rest on Polymarket’s central limit order book. Others are supervised by Bravado’s execution engine, which places CLOB orders on your behalf over time. They are different objects with different identifiers, different endpoints, and different cancellation semantics. Once that model is clear, a whole class of bugs stops happening: orders that look missing, cancel-all buttons that do not cancel everything, and strategies churned into oblivion because PENDING was read as failure.
Read time: about 12 minutes. Useful before you build any UI or bot that displays order state.

TL;DR

  • LIMIT, MARKET, TAKE_PROFIT return an order_id and live on GET /v2/trade/orders/open.
  • TWAP, ICEBERG, PEGGED, TRAILING_STOP, and pre-trigger STOP_LOSS return a record_id and live on GET /v2/trade/strategies.
  • Iceberg appears in both at once: parent strategy plus the currently resting slice.
  • Stop-loss migrates from strategies to open orders when it triggers.
  • PENDING is accepted-and-waiting, not rejected.
  • cancel-all clears CLOB orders only. Strategies keep running.

What you will do

  • Understand why the two systems exist rather than memorising a table
  • Fetch complete working state across both endpoints
  • Map every order type to where it will appear
  • Render a unified list without losing the ability to cancel correctly
  • Implement a cancel-everything that actually cancels everything
  • Read warnings[] and bracket errors that a status code hides

What you will need

Knowledge Tools and access
  • A Bravado API key with trade.read and trade.cancel

Why there are two systems

A CLOB order is a standing instruction sitting on Polymarket: buy 100 shares at 62 cents. The venue holds it and matches it when someone crosses. A managed strategy is not an order at all. It is a supervisor running on Bravado: over the next hour, buy $2,000 worth in clips, skipping any clip where the price has moved more than 2%. To do that it places ordinary CLOB orders, waits, evaluates, and places more. So a TWAP is not resting anywhere for the venue to show you. It is a process, and at any given instant it may have no order on the book at all. That distinction explains everything else:

Fetch complete state

Render them as one list if that suits your UI. Just fetch from both, and keep kind so cancellation routes to the right endpoint.

Where each type appears

Iceberg appears twice, and that is correct

The parent is a strategy holding 5,000 shares of intent. The slice currently on the book is a real CLOB order for 100. Both are true at once. If your UI lists them side by side without indicating the relationship, users will believe they have two orders and try to cancel both. Group the slice under its parent, or hide slices whose parent you are already showing.

Stop-loss moves between lists

Pre-trigger, a stop-loss cannot rest on the book: a sell below the current market would fill instantly, which is the opposite of a stop. So Bravado holds it as a strategy and watches. When the trigger price hits, Bravado places a real CLOB order. At that moment the item stops being purely a strategy and starts appearing in open orders with is_stop_loss: true. A client watching only strategies will think it vanished. One watching only orders will not see it until it fires.

PENDING is not a failure

A strategy in PENDING has been accepted and is waiting for its entry conditions. Rendering it as an error, or cancelling and re-placing on PENDING, churns fees and guarantees the strategy never does the job it was created for.
Distinguish it visually from an error state. A muted badge reads correctly; a red one generates support tickets.

Cancel correctly

Cancel-all does not cancel everything

POST /v2/trade/orders/cancel-all clears CLOB orders only. Running strategies continue afterwards. A flatten-everything button wired to that endpoint alone leaves a TWAP quietly executing, and the user believes they are flat.
Two further points:
  • Cancelling a strategy stops future execution, not past. Whatever already filled is a position you hold. Read filled_size before deciding what happens next.
  • A stop-loss can only be cancelled pre-trigger. Once it fires, the strategy completes and you are cancelling the resulting order instead, via DELETE /v2/trade/orders/{order_id}.

Read warnings, not just status codes

Order responses carry warnings[] even on success:
That is a 200. The entry filled, the stop-loss attached, and the take-profit did not. A client branching only on status code reports complete success while the user holds a half-protected position.

Wrapping up

Two systems, because two genuinely different things are happening: a standing instruction on a venue, and a process running on your behalf. Every quirk in this guide follows from that. If you take one habit away, make it fetching both endpoints. Almost every “order disappeared” report resolves to a client that polled one.

Frequently asked questions

Check GET /v2/trade/strategies. A TWAP is a process, not a resting order, and may legitimately have nothing on the book at the instant you look.
The parent strategy and the currently resting slice are both real. One is your full intent, the other is the 100 shares visible to the market right now.
It triggered. Look for it on /v2/trade/orders/open with is_stop_loss: true. To cancel it now, cancel the order rather than the strategy.
No. It means accepted and waiting for entry conditions. Treating it as failure and re-placing is how people accidentally run three copies of the same strategy.
cancel-all covers CLOB orders only. Iterate /v2/trade/strategies and cancel each ACTIVE or PENDING record individually.
Yes, cancellation is a mutating request. Retrying a timed-out cancel with the same key returns the original outcome instead of erroring on an already-cancelled order.

Resources