{% extends "base.html" %}{% from "_macros.html" import csrf, empty, flash, page_head, source_note %} {% block title %}Trade{% endblock %} {% block content %} {% call page_head("Trade by hand", "Formula 1 markets on Kalshi and Polymarket at their latest recorded prices. Fantasy trading is F1 only for now. Fantasy bucks only: nothing is sent to an exchange.") %} History →{% endcall %} {{ flash(msg) }} {% if not ready %}

Not open yet

Fantasy trading hasn't been set up on this site yet.

{% else %} {% if sel %}

{{ sel.group_title or sel.question }}

{{ sel.event_title or "" }} · {{ sel.exchange|capitalize }} · {{ sel.kind|kind }}{% if sel.group_title and sel.question != sel.group_title %} · {{ sel.question }}{% endif %}{% if sel.sport_ok %} · {% if sel.closes_at %}closes {{ sel.closes_at|fmt }}{% elif sel.season %}season future, no close{% else %}closing time not known yet{% endif %}{% endif %}

{% if not sel.sport_ok %}

Fantasy trading is Formula 1 only for now. This {{ (sel.sport or "")|upper }} market can't be traded here; you can follow its prices on Markets.

{% elif not book %}

No order book has been recorded for this market yet, so it can't be traded.

{% else %}

Book recorded {{ book.ts|fmt }} (orders are refused once it is over {{ "%.0f"|format(max_age) }} minutes old). Cash: F${{ "{:,.2f}".format(cash) }}{% if pos %} · you hold {{ "%g"|format(pos.shares) }} {{ pos.side|upper }}, cost F${{ "%.2f"|format(pos.cost) }}{% endif %}.

{% for name, bids, asks in [("YES", book.bids, book.asks), ("NO", book.no_bids, book.no_asks)] %}

{{ name }}

{% for i in range([[bids|length, asks|length]|max, 6]|min) %}{% endfor %}
BidSizeAskSize
{{ "%.2f"|format(bids[i][0]) if i < bids|length else "" }}{{ "%g"|format(bids[i][1]) if i < bids|length else "" }} {{ "%.2f"|format(asks[i][0]) if i < asks|length else "" }}{{ "%g"|format(asks[i][1]) if i < asks|length else "" }}
{% endfor %}
{% if is_demo_user %}

The demo accounts can look but not trade. Sign up to trade.

{% else %}
{{ csrf() }}
{% if quote %}

{% if quote.ok %}If filled now: {{ "buys" if action == "buy" else "sells" }} {{ "%g"|format(quote.filled) }}{% if quote.status == "partial" %} of {{ "%g"|format(quote.shares) }}{% endif %} {{ side|upper }} at an average of {{ "%.3f"|format(quote.avg_price) }}, F${{ "%.2f"|format(quote.notional) }}{% if quote.fee %} plus a fee of F${{ "%.2f"|format(quote.fee) }}{% endif %}: {{ "costs" if action == "buy" else "brings" }} F${{ "%.2f"|format(quote.total) }}{% if quote.status == "partial" %}; the rest isn't on the book at your limit{% endif %}. Book recorded {{ (quote.age_s / 60)|round|int }} min ago.{% else %}If placed now it would be refused: {{ quote.message }}{% endif %}

{% endif %}

Fills at once against the book at your limit or better, or not at all; whatever isn't on the book is cancelled. Up to F${{ "%.0f"|format(max_stake) }} an order (shares x limit). Kalshi charges its taker fee (7% of C x P x (1 - P), rounded up to the cent, once per order); Polymarket none. Both fees are our assumption until confirmed.

{% endif %} {% endif %}
{% endif %}

Markets {{ n }}

{% if q %} Clear{% endif %}
{% if events %}{% for ev in events %}

{{ ev.title }}{% if ev.start %} {{ ev.start|fmt }}{% endif %}

{% for m in ev.markets %} {% endfor %}
MarketKindExchangeYES bidYES ask
{{ m.group_title or m.question }}{{ m.kind|kind }}{{ m.exchange|capitalize }} {{ "%.2f"|format(m.bid) if m.bid is not none else "–" }}{{ "%.2f"|format(m.ask) if m.ask is not none else "–" }} Trade
{% endfor %} {% else %}{{ empty("No F1 markets with a recorded book in the last day" ~ (" match that search." if q else ".")) }}{% endif %} {{ source_note(note_sport, note_venues) }}
{% endif %} {% endblock %}