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

# API Quickstart

## 1. Create credentials

Visit [API Key management](https://fluvion.io/portfolio/api-key) and follow [API Keys](/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](/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](/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.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.fluvion.io/api-trading/quickstart.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
