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

# Quickstart

> Install the SDK, approve the ZEUS contracts once and place a first trade.

**1. Install**

```bash theme={null}
npm install @zeustrade/sdk
```

**2. Create a client**

```ts theme={null}
import { Zeus } from '@zeustrade/sdk'

const zeus = new Zeus({
  network: 'base',
  rpcUrl: process.env.RPC_URL!,
  privateKey: process.env.PRIVATE_KEY as `0x${string}`,
  apiKey: process.env.ZEUS_API_KEY
})
```

Without a signer the client is read only. `apiKey` is optional and unlocks the [market-maker gateway](https://sdk.zeustrade.io/api/market-maker.md).

**3. Approve once**

ZEUS routes trades through two plugins of its Router: the PositionRouter for market orders and the OrderBook for limit, take profit and stop loss orders. Approve both once per wallet, and the token you pay with.

```ts theme={null}
const status = await zeus.setup.status()
if (!status.ready) await zeus.setup.approvePlugins()
await zeus.setup.approveToken('USDC')
```

**4. Place a first trade**

```ts theme={null}
const receipt = await zeus.trade.marketOpen({
  market: 'ETH/USD',
  side: 'long',
  collateral: 20,
  payToken: 'USDC',
  leverage: 5,
  slippage: 0.5
})

console.log(receipt.status, receipt.fillPrice, receipt.executionMs)
```

The call returns when the keeper has executed the request, not when your transaction is mined. If the keeper cancels it, the call throws `RequestCancelled` with the receipt attached.

> [!TIP]
>
> Try everything on the ZEUS test network first with `network: 'base-sepolia'`. The test USDC there can be minted freely, and a little Base Sepolia ETH pays for gas and keeper fees.


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