> ## Documentation Index
> Fetch the complete documentation index at: https://docs.4cx.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Deep links

> Send a player straight to one market with the take window already open.

A deep link opens 4Cx on the game, market and side you choose, with the take window already up. Add a referral code and the player who signs up after following it is credited to you.

```
https://4cx.io/?game={gameID}&market=spread&side=away&line=3.5&ref=YOUR_CODE
```

## Building a link

Start from a `gameID` — the same id you pass to [Get orderbook](https://docs.4cx.io/pages/markets/get-orderbook.md), which you can list with [Get active game IDs](https://docs.4cx.io/pages/markets/get-active-game-ids.md). Then name the market you want opened.

**game** `string` *required*

The game id (24-character hex).

**market** `string` *required*

`moneyline`, `spread`, or `total`. `ml` is accepted as shorthand for moneyline.

**side** `string` *required*

`home` or `away` for moneyline and spread. `over` or `under` for totals.

**line** `number`

The spread or total number, written from the chosen side's point of view. Away +3.5 is `side=away&line=3.5`; home -3.5 is `side=home&line=-3.5`. Omit it to open the main line.

**ref** `string`

Your referral code — the same one used in `/sign-up/{code}` links.

> [!NOTE]
>
> Game ids are per platform. A 4casters game id does not exist on 4Cx, so build 4Cx links from 4Cx game ids only.

## Examples

```text Away moneyline theme={null}
https://4cx.io/?game=6a70cb6648a3d38f0839bbf3&market=moneyline&side=away&ref=YOUR_CODE
```

```text Home -2.5 theme={null}
https://4cx.io/?game=6a70cb6648a3d38f0839bbf3&market=spread&side=home&line=-2.5&ref=YOUR_CODE
```

```text Main-line total, under theme={null}
https://4cx.io/?game=6a70cb6648a3d38f0839bbf3&market=total&side=under&ref=YOUR_CODE
```

## What the player sees

A signed-in player lands on the home page with the take window open on that side, showing the best price resting there and the rest of the ladder.

A signed-out visitor is taken to log in first, then lands on the market with the window open — 4Cx requires an account to see the board. If they create an account instead, your referral code is already filled in on the signup form.

The window opens in whichever mode the account is set to, Gold Coins or Sweepstakes. It does not switch modes on the player's behalf; see [Switch player mode](https://docs.4cx.io/pages/coins-only/switch-player-mode.md).

## Prices are live, not baked into the link

A link names a market, never a specific order. Orders rest and are cancelled constantly, so the price a player sees is read from the book when the page opens and may differ from the one you saw when you built the link. The player confirms the price themselves before anything is placed.

If nobody is offering that side when they arrive, the window switches to creating an offer at that line instead of taking one — the same thing that happens when you click an empty cell on the board.

## Notes

* **Games go live.** When a game starts, its pre-match market closes and a separate live market opens. A pre-match link followed after the start uses the live market's book. If the game started and has no live market, the link opens 4Cx with no window rather than showing a market that can no longer be traded.
* **Unknown lines.** If the line in the link is not one the game has (or `line` is omitted and no main line is published yet), 4Cx opens with no window. The player is never moved onto a different line silently.
* **Referral credit is first-touch.** The first code a browser arrives with is kept until that visitor signs up. Someone who already has an account is not re-credited.
* **Three-way markets, props and player markets** are not addressable with these parameters.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.