Time SeventeenDocs

Trading

How Time Seventeen orders work — YES and NO in one book, limit and market orders, time in force, reservations, sizing in dollars and reading results.

YES and NO in one book

Each market has one order book in YES prices. An order names an outcome (YES or NO), a side (buy or sell) and a price in its own outcome:

You sendRests on the YES book as
Buy YES at pBid at p
Sell YES at pAsk at p
Buy NO at qAsk at 1 − q
Sell NO at qBid at 1 − q

A YES buyer meeting a NO buyer creates a new YES/NO pair (each pays their price, together $1.00). A YES seller meeting a NO seller retires a pair and both receive cash.

Reservations

  • Buy: price × quantity is reserved from your cash when the order is accepted (plus the maximum fee, 0 on testnet). It is released as the order fills or is cancelled.
  • Sell: the contracts are reserved. Selling more than you hold is refused (InsufficientPosition); to bet against an outcome, buy the other outcome instead.

Order types

TypeHow to send itBehaviour
Limit, GTCLimit + gtcTrades what it can now, rests the rest until filled or cancelled
Limit, IOCLimit + iocTrades what it can now, cancels the rest
Limit, FOKLimit + fokTrades the whole quantity now or nothing
Post-onlyLimit + post-only flagRefused (WouldCrossPostOnly) if it would trade on arrival
Reduce-onlyLimit + reduce-only flagCan only reduce your position
MarketLimit at the touch ± your slippage, iocSweeps the book up to your slippage limit; the rest is cancelled
Market, keep remainderLimit at the last level within slippage, gtcSweeps the same levels; the rest rests at that price

The engine also has stop, stop-limit, trailing-stop, pegged and iceberg orders. They are available over FIX today and will be added to the REST encoding.

Sizing in dollars

The exchange takes whole contracts. To spend a dollar amount B:

  • Limit: contracts = ⌊B / limit price⌋.
  • Market: walk the opposite side from the touch, taking whole contracts while the money lasts, no further than your slippage limit. The web terminal shows the result (”≈ 1,000 contracts”) before you send.

Remember that a buy reserves its limit price × quantity, so cap the quantity at ⌊available cash / limit price⌋.

Reading the result

A sequenced command returns its events in order:

EventMeaning
AcceptedPassed admission (balance, terms, limits).
FillA trade: YES price, no_price, qty, both legs, quantity left and filled on each order.
BookThe remainder joined the book.
DoneThe order left the book: Filled, Cancelled, IocRemainder, SelfTrade, Expired, MarketClosed.
RejectedRefused at admission, with a reason (see Errors).

Fills of your resting orders caused by other participants are pushed on the WebSocket ({"type":"private"}), FIX and BOE.