> ## Documentation index
> Fetch the complete documentation index at: https://docs.predictefy.com/llms.txt
> Use it to discover every available page before exploring further.

# Gemini

> The build request schema, signing scheme, and bounds for Gemini.

## Step zero — from nothing to your first trade

Gemini uses a venue-custodied cash account. You do not need a crypto wallet or gas asset for this
lane.

1. **Create the account.** Sign up at [gemini.com](https://gemini.com/), complete the venue's
   regulated identity checks, and accept its current prediction-market terms. Expect
   government-ID KYC.
2. **Create credentials.** In your venue account's API settings, create a Trader API key and
   secret. Enable a time-based nonce, disable heartbeat, and use Unrestricted trusted-IP mode while
   Predictefy egress is not pinned. Predictefy uses the credential in-process and never retains it.
3. **Fund it.** Deposit USD through Gemini's own supported bank or card rail; no chain or crypto
   collateral applies. Start with enough to meet the selected instrument's published
   `quantityMinimum` plus fees. The repo sources establish no universal deposit minimum.
4. **Allow time.** Setup is about 10 minutes after approval; KYC may take a day.
5. **Check access.** Gemini controls product and geographic eligibility, so confirm both before
   funding.

## What you need first

- **Production status:** Armed for build, submit, and cancel as verified on 2026-08-15.
- **Wallet and chain:** No wallet or chain transaction signs the order body. Gemini request auth is
  the only signature.
- **Venue account:** Yes. Use a funded Gemini account and accept the current prediction-market terms.
- **Credentials:** A caller-owned Trader API key and secret. Keep them in your process and send them
  only for submit, cancel, or refresh; Predictefy uses them in-process and never retains them.
- **Funding:** Fund the venue-custodied Gemini account through Gemini's own rails. The funding
  registry pins no chain or collateral token for this lane.

Gemini is a strict server-built, per-request HMAC transit lane. It is **source-ready but default
off** behind `GEMINI_EXECUTION_ENABLED=true`; check `GET /v1/exec/venues` before integrating.

:::note[Production update — 2026-08-15]
The default-off wording above records Gemini's 2026-08-11 source-ready phase. Production now
advertises build, submit, and cancel for Gemini. Continue to check the live capability endpoint
before every integration because arming can change independently of this page.
:::

Build accepts no credential and performs no venue request. Send `asset` (the Core outcome id), or
`outcome` + `outcomeSide`, with these plain fields:

| Field           | Type                                                        | Required | Meaning                                          |
| --------------- | ----------------------------------------------------------- | -------- | ------------------------------------------------ |
| `isBuy`         | boolean                                                     | yes      | `true` → Gemini `buy`; `false` → `sell`          |
| `price`         | number in `(0,1)`                                           | yes      | Limit price, persisted as a decimal string       |
| `size`          | number greater than zero                                    | yes      | Contract quantity, persisted as a decimal string |
| `timeInForce`   | `good-til-cancel`, `immediate-or-cancel`, or `fill-or-kill` | no       | Defaults to `good-til-cancel`                    |
| `makerOrCancel` | boolean                                                     | no       | `true` requires maker-only behavior              |

The catalog supplies the exact Gemini instrument `symbol` and `yes`/`no` outcome. The stored
version-1 artifact contains only `{ venue, buildVersion, request, body }`, where `request` is pinned
to `/v1/prediction-markets/order` and `body` is the documented venue shape:
`symbol`, `orderType: "limit"`, `side`, `quantity`, `price`, `outcome`, `timeInForce`, and optional
`makerOrCancel: true`. Stop-limit is not supported. Notional is `quantity × price` and passes the
same build and submit caps as every other order lane. Gemini also publishes instrument-specific
`quantityIncrement`, `quantityMinimum`, `priceIncrement`, and `priceMinimum` values in contract
metadata; choose aligned inputs or Gemini will reject the order without placing it.

Submit `{ executionId, apiKey, apiSecret }`. Master API keys must also supply `account` with the
Gemini account name (for example, `primary`); account-scoped keys omit it. Only after version, shape,
request-path, notional, and artifact-bounds checks pass does Predictefy read the credentials. It
constructs `{ request, nonce, account, ...body }` when `account` is present (otherwise
`{ request, nonce, ...body }`), base64-encodes the JSON, computes the hex HMAC-SHA384 with
`apiSecret`, and sends one empty-body POST with Gemini's three auth headers. Credentials and
generated headers are excluded from both persisted artifacts and logs.

:::caution[Gemini account and key prerequisites]
Complete these yourself; Predictefy never changes account settings or accepts terms for you.

- Accept the current prediction-market terms once via Gemini's
  `POST /v1/prediction-markets/terms/accept` flow.
- Use a third-party key with the **Trader** role.
- Enable **Uses a time based nonce**. Counter-nonce keys are unsafe for a stateless relay because a
  relay request can race and regress the caller's own bot. Gemini requires epoch seconds within
  plus or minus 30 seconds. A rejection returns `409 GEMINI_TIME_NONCE_REQUIRED` with the fix.
- Disable **Requires Heartbeat**. Thirty seconds of authenticated silence cancels that session's
  open orders. If Gemini exposes this setting in an error, Predictefy returns
  `409 GEMINI_HEARTBEAT_KEY_UNSUPPORTED`.
- Gemini trading keys require trusted-IP configuration. Predictefy does not provide pinned egress,
  so this lane requires choosing **Unrestricted** and accepting that it removes the IP allowlist
  layer of protection.
:::

Gemini holds the account balance, just as a venue holds other venue-account balances; this is fund
custody by Gemini, not custody by Predictefy. Predictefy never holds those funds and never retains
the API key or secret. The same private REST family supports cancel and status: cancel builds a new
zero-notional artifact containing the stored integer `orderId`, while status refresh signs
`/orders/active` and then `/orders/history` with the caller's transient credentials. No automatic
background poll is possible because no credential is retained.
