> For the complete documentation index, see [llms.txt](https://hyperalpha.gitbook.io/hyperalpha-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hyperalpha.gitbook.io/hyperalpha-docs/platform-features/import-api-key-connecting-your-exchange.md).

# Import API Key: Connecting Your Exchange

To activate HyperAlpha’s (hyperalpha.org) integrated AI engine and native execution agents, users must link their Hyperliquid accounts via a secure, non-custodial API Authorization.

Our framework leverages end-to-end encrypted tunnels to acquire strict, trade-execution-only (Trade-Only) permissions. By architectural design, HyperAlpha never maintains—and technically cannot achieve—access to your withdrawal or asset-transfer functionalities. Absolute asset sovereignty remains 100% under the control of your private Web3 wallet.

### 1. Wallet Management Dashboard Core Telemetry

The "My Wallets" quadrant serves as the distributed administrative command center for all connected exchange accounts. Operators can monitor the structural health and validation status of their global portfolio in real-time via the upper panel:

| **Field**           | **Industrial Clearing Definition**                                                                                                                     |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Account Name        | Your custom, user-defined identifier used to segregate disparate accounts (e.g., `HyperAlpha_Quant_01`).                                               |
| Main Wallet Address | Your primary Layer 1 (L1) cryptographic public key address anchored on the Hyperliquid protocol.                                                       |
| API Wallet Address  | The specific on-chain signing address uniquely coupled with your generated API Key.                                                                    |
| Expiry Time         | The legal operational lifespan of the API credentials. Note: Proactive renewal is strictly required before this timestamp to preserve task continuity. |
| Note                | A custom text container allowing users to log specific strategy parameters or drawdown limits (max 50 characters).                                     |

### 2. Step-by-Step: Rapid Account Importing Flow

HyperAlpha delivers two distinct account integration pathways. We strongly mandate the Quick Path, which allows you to programmatically generate an on-chain Trading Agent directly inside our terminal, removing the security hazards and friction of manual private key handling.

#### Quick Path: One-Click Trading Agent Generation & Import (Strongly Recommended)

1. Initialize Generation: Locate and click the \[Generate API Key] button on the wallet integration dashboard.
2. Assign Alias: Input a high-cognition, recognizable identifier into the `Hyper Account Name` text field.
3. Forge On-Chain Agent (Signature): Your Web3 wallet extension (MetaMask/OKX Wallet) will automatically prompt a secure signature request. This cryptographic signature directly mints (creates) a dedicated Trading Agent profile on the Hyperliquid blockchain.
4. Frictionless Auto-Integration: Upon successful signature verification, the HyperAlpha engine automatically retrieves, configures, and maps the Agent’s API credentials. Operators never copy or expose private API Secret Keys, achieving complete zero-exposure binding.

#### Legacy Path: Manual API Key Import

If you choose to manually link pre-existing API credentials generated directly from the official Hyperliquid dashboard, click 【Import Wallet】 and configure the three-tier matrix within the pop-up panel:

**🔹 Step 1: Profile & Identity Configuration**

* Hyper Account Name: Define a descriptive local account alias to ensure clear visualization within your Monitor cockpit.
* Hyper Account Address: Paste your main public Hyperliquid L1 wallet address (must begin with `0x`).
* Notes (Optional): Input brief strategy reminders or custom risk boundaries.

**🔹 Step 2: Primitive API Credential Encryption**

* API Private Key: Paste the Secret Key generated inside your Hyperliquid API settings dashboard.
* API Wallet Address: Input the corresponding public signing address designated for that specific API block.
* Wallet Expiry Time: Select the hard calendar expiration date of the key. *(💡 Risk Pro Tip: We strongly mandate setting a shorter validation window, such as 90 days, and recycling keys periodically to command the highest security posture).*

**🔹 Step 3: On-Chain Handshake & Final Validation**

* Commit Credentials: Click 【Submit】 to encrypt and commit the credentials to your local session cache.
* Rigid Activation: Locate the newly appended profile in your registry and click the 【Authorize】 button. This explicitly triggers a standard on-chain signature handshake via your wallet extension.
* Engine Primed: Upon signature confirmation, the system validation state instantly transitions to 【Authorized: Yes】, priming your AI automation core for immediate market deployment.

### 3. Non-Custodial Security Firewalls & Safety Adjustments

HyperAlpha implements an industry-leading Non-Custodial Security Architecture. Safeguarding your trading equity is our absolute directive, enforced via hard-coded backend infrastructure firewalls:

#### 1. Absolute "Trade-Only" Permission Isolation

The primitive cryptographic logic of the Hyperliquid ledger locks down strict behavioral boundaries when keys are generated:

* Execution Only: The credentials you route to HyperAlpha are restricted exclusively to sending buy/sell, open/close, and conditional order intents.
* Zero Transfer/Withdrawal Authorization: By protocol design, an API Key possesses zero authority to transfer capital between sub-accounts or execute external node withdrawals. HyperAlpha lacks any technical path to touch or redirect your underlying principal. Your assets remain permanently anchored inside your sovereign Hyperliquid ledger vaults.

#### 2. Real-Time Telemetry Polling & "Safety Pause" Desync Mitigation

To eliminate execution anomalies or missed block entries during massive market liquidations, HyperAlpha deploys a high-frequency Health Monitor:

* The exact millisecond your API state transitions to "No (Unauthorized)" or "Expired", the backend framework triggers an immediate "Safety Pause" override.
* All active Copy Matrix campaigns bound to that profile are instantly suspended. This programmatically blocks "Desync anomalies"—preventing catastrophic scenarios where a followed master trader closes an overleveraged position while your terminal remains trapped in an unmanaged, stale open-interest block due to API credential failure.

#### 3. Zero-Discrepancy Data Integrity Auditing

Precise algorithmic execution dictates absolute variable synchronization:

* Rigid Pair Validation: The pipeline requires that the provided Main Wallet Address and the input API Secret Key map exactly to the same unique Hyperliquid sub-account node.
* Connection Rejection: Any structural data mismatch will cause the balance polling loops to fail. The system will forcefully block account activation to prevent flawed net equity valuations from executing incorrect margin signals.

### Mandatory Pre-Flight Action: Funding the Perpetual Account

Before the HyperAlpha automation core can fire its initial Copy Matrix or manual Trade instruction onto the ledger, you must explicitly verify that your USDC capital is correctly allocated inside the Hyperliquid Perpetual Account partition.

#### 1. External Node Deposits vs. Protocol Internal Transfers

* External Inbound Flows: When you route USDC into Hyperliquid via the Smart Bridge or directly through the Arbitrum network, the assets arrive at your Layer-1 Hyperliquid account layer (your Spot/EVM settlement balance).
* Rigid Prerequisite: To initialize derivative copy-trading and manual executions, you must ensure your USDC capital resides inside the "Perpetual Account" boundary.

#### 2. Executing Internal Capital Allocation

If your multi-chain assets have cleared, but your available execution margin displays as `0` inside the HyperAlpha Monitor terminal, execute the following asset alignment:

1. Navigate to the Source Platform: Access the official clearing interface at `app.hyperliquid.xyz`.
2. Access Your Capital Portfolio: Select the \[Account] or \[Portfolio] dashboard tab.
3. Execute Local Transfer: Click the "Transfer" macro to move your USDC capital out of the Spot/EVM partition and directly into the Perpetual Account.
4. Immediate Synchronization: This transaction processes instantly on-chain. Upon returning to the HyperAlpha terminal, your available execution margin will perfectly align with the ledger truth.

#### 3. The Structural Necessity of Margin Alignment

HyperAlpha strictly replicates institutional-grade perpetual contract models. If your Perpetual Account balance registers at zero, the API order router will receive a definitive "Insufficient Margin" code from the ledger. To preserve the total integrity of your account and protect you from liquidation errors, our engine will automatically discard the trade signal.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hyperalpha.gitbook.io/hyperalpha-docs/platform-features/import-api-key-connecting-your-exchange.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
