> For the complete documentation index, see [llms.txt](https://docs.tradesurge.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tradesurge.co/concepts-and-reference/security-and-custody.md).

# Security and key custody

How TradeSurge checks, stores and uses your venue keys.

TradeSurge needs a venue key to trade for you. This page explains which keys we accept, how they are stored and when they are used. We name the mechanism rather than promise with adjectives.

{% hint style="info" %}
**Being rolled out.** Key permission checks are built. Managed key custody through a cloud key service is being completed before live trading opens.
{% endhint %}

## The promise

Your keys will be encrypted so that even our database cannot read them. They will be trade-scoped, with withdrawals disabled where the venue supports it, and we verify that before accepting them.

TradeSurge will see your key at the moment it places a trade. We say that plainly.

## We check every key before we accept it

When you paste a Bybit key, TradeSurge asks Bybit what that key can do. It refuses the key if it can withdraw funds or transfer between accounts. If Bybit cannot answer, the key is refused.

| Name                      | What it means                                  |
| ------------------------- | ---------------------------------------------- |
| **Trade permission**      | Required. A read-only key cannot place trades. |
| **Withdrawal permission** | Refused. TradeSurge never moves funds out.     |
| **Transfer permission**   | Refused. No moving funds between sub-accounts. |

## How keys will be stored

Each key will be encrypted with its own data key. Each data key will be encrypted by a master key held in a managed key service, never on disk, in the database or in code. Stealing the database would yield only ciphertext. Only the running engine will decrypt a key, and only at the moment it trades.

## Every decrypt will be on the record

Settings will list every decrypt of your venue keys (coming soon).

## Two-factor

You must enrol an authenticator app to use the app. A second-factor check at sign-in and before key changes is coming before live trading.

## You can revoke at any time

Delete the key at your venue and TradeSurge can no longer trade that account. Your positions keep any stops resting at the venue.

## Next steps

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Trade-scoped keys</strong></td><td>Create the right key on Bybit.</td><td><a href="/platform/accounts/trade-scoped-keys.md">Trade-scoped keys</a></td></tr><tr><td><strong>How order safety works</strong></td><td>The checks every order passes.</td><td><a href="/concepts-and-reference/order-safety.md">How order safety works</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tradesurge.co/concepts-and-reference/security-and-custody.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
