> For the complete documentation index, see [llms.txt](https://sol-perps-bot.gitbook.io/sol-perps-bot-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sol-perps-bot.gitbook.io/sol-perps-bot-docs/api-trading/quickstart.md).

# API Quickstart

## 1. Create credentials

Visit [API Key management](https://fluvion.io/portfolio/api-key) and follow [API Keys](/sol-perps-bot-docs/api-trading/api-keys.md). Start with a dedicated `read` key. Save account ID, public API key and secret securely. Mainnet website credentials will not authenticate on testnet.

## 2. Make a public request

No credentials or account registration are needed:

```bash
curl --fail 'https://api.orderly.org/v1/public/info/PERP_ETH_USDC'
```

Check `success` and the market's current minimum notional, quantity tick and price tick. This tests public connectivity, not private authentication.

## 3. Test private authentication without trading

Use the read-only Node.js example in [Authentication](/sol-perps-bot-docs/api-trading/authentication.md). Supply credentials through your secret manager, or a private local file outside any published site/project directory. A local file should contain only your own values:

```dotenv
FLUVION_NETWORK=mainnet
FLUVION_ACCOUNT_ID=YOUR_ACCOUNT_ID
FLUVION_API_KEY=ed25519:YOUR_PUBLIC_KEY
FLUVION_API_SECRET=ed25519:YOUR_API_SECRET
```

For Node.js 20.6+ with built-in environment file support:

```bash
chmod 600 /absolute/private/path/fluvion.env
node --env-file=/absolute/private/path/fluvion.env read-account.mjs
```

The path is a placeholder: create the file privately with an editor, do not paste secret values into shell commands. Never place it inside `public/`, commit it, upload it to a docs host or share its contents with an agent. Delete the temporary credential file when no longer needed.

The example reports success and the count of nonzero positions. Confirm results against Portfolio. A successful read does not prove that trading scope or sufficient margin is available.

## 4. Prepare trading separately

Before enabling `read,trading`, review [Orders & Execution](/sol-perps-bot-docs/api-trading/trading.md). Fetch account state and live market constraints, preview the exact order, then authorize execution. Do not run a sample order automatically as part of setup.

## 5. Revoke test credentials

Revoke a temporary key when the test is complete. Manage any open positions or pending orders separately; they remain after revocation.
