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

# Send your traders to the trading platform

> Open trdrs's trading platform for your trader, already signed in and on the account you issued them, from a Trade button on your own site.

Give your traders a Trade button that opens trdrs's trading platform on their account, with no second
sign-in. Your backend asks trdrs for a one-time link for the trader's email, your site opens it in
their browser, and the trading platform signs them in as that email and opens the account you name.
After that they're an ordinary trdrs trader: they can also sign in to trdrs on their own with an
email code and find the same accounts.

Use this page once you issue accounts by email, as [Issue and run accounts](/guides/venue-accounts)
shows. By the end your Trade button opens the trading platform on the trader's account, and you know
what your trader sees the first time.

## Before you start

1. A Venue key with the `trader:handoff` scope, kept on your server. [Venue keys](/guides/venue-keys)
   shows how to create one.
2. An account you issued by email, and its `accountId`.
3. The trader's email, checked by your own sign-in. Send only an address you know the trader holds:
   the link signs whoever opens it in as that email.

## How the first visit goes

Your trader is one of three people, and each sees one thing:

| The email | What the trader sees |
| - | - |
| Nobody signs in to trdrs with it yet | The trading platform, signed in, on their account. trdrs made their sign-in when you issued the account or when they first opened a link |
| It signs in to trdrs, and the trader has let your venue sign them in | The trading platform, signed in, on their account |
| It signs in to trdrs, and the trader hasn't let your venue sign them in yet | A screen asking for the email code trdrs sends them, once. Then the trading platform, on their account |

The email code is asked once per venue, so no venue can open an account that belongs to someone
else. Your trader removes your venue in their trdrs settings whenever they like, and the next link
asks for the code again.

<Steps>
  <Step title="Ask for a link from your backend">
    Ask for a link when your trader presses Trade, and name the account it opens on.

    ```bash theme={null}
    curl --fail-with-body "$TRDRS_API_BASE_URL/api/venues/$VENUE_ID/handoffs" \
      -H "Authorization: Bearer $TRDRS_VENUE_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: trade-$(uuidgen)" \
      -d '{ "email": "trader@example.com", "accountId": "'"$ACCOUNT_ID"'" }'
    ```

    Required scope: `trader:handoff`.

    The answer is the link and when it stops working:

    ```json theme={null}
    { "url": "https://app.trdrs.co/handoff#token=...", "expiresAt": "2026-10-19T18:01:00.000Z" }
    ```

    The token is in the link's fragment, which no server receives. Each request makes a new link,
    and the `Idempotency-Key` is recorded in your venue's audit as the link's reference.
  </Step>

  <Step title="Open it in the trader's browser at once">
    Send the trader's browser to the `url` straight away: the link lasts 60 seconds and opens one
    session. A browser that opens a new window after a slow request may block it as a pop-up, so
    navigate the same tab, or open the window before your request and set its address after.

    The session the link opens lasts as any trdrs sign-in does, 30 days from the trader's last
    visit.
  </Step>
</Steps>

## What the session can do

The session is your trader's own: it trades and reads every account they hold, yours and any other.
It links nothing new. Connecting a provider, creating a key, accepting someone else's account and
running a venue all need a session the trader opened themselves with their email code, and the
trading platform asks them to sign in that way when they try.

## When something is refused

| Answer | What it means |
| - | - |
| `400` `invalid_request` with `field: "email"` | The email isn't one address of at most 254 characters |
| `403` `permission_denied` | Your key lacks `trader:handoff`, or the owner who created it is no longer an owner |
| `404` `not_found` | The venue isn't yours, or `accountId` isn't an account you issued to this trader |

A link opened after its 60 seconds, or a second time, shows the trader "This link has expired" with a
way back to your site. Ask for a new link when they press Trade again.


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