---
title: "Overview"
description: "What the Grvt API is, how it is laid out, and where to start."
order: 0
llms: trading, account, market-data, signing
---

Grvt is a crypto derivatives exchange. Its API lets you read market data, trade and move funds, with an SDK
(Python, TypeScript, Go or Rust) or with plain HTTP and WebSocket calls.

> [!WARNING]
> **Preview.** The SDKs are in preview: any 0.x release can change them. The HTTP and WebSocket API is not
> affected.

## Start here

To place your first order on testnet (the test exchange, with free funds):

1. Install the SDK from your SDK's page ([Python](sdks/python.md), [TypeScript](sdks/typescript.md),
   [Go](sdks/go.md), [Rust](sdks/rust.md)), then run the [Quickstart](guides/quickstart.md): one example reads
   market data, then one places and cancels an order.
2. Back on your SDK's page: create a client, then place, track and cancel an order.
3. [Errors and retries](guides/errors-and-retries.md): what to do when a call fails, above all when you don't
   know whether an order was placed.

Read these when you need them: [Environments](guides/environments.md) (testnet or production),
[Authentication](guides/authentication.md), [Accounts and permissions](guides/accounts.md) and
[Rate limits](guides/rate-limits.md).

**Advanced:** [WebSocket](guides/websocket.md) protocol details, [Recovery recipes](guides/recovery.md),
[Signing](guides/signing.md) by hand, and the [C++ signing core and reference](sdks/cpp.md): C++ has no client,
so your app handles networking, sessions, streams and recovery itself.

**Topics:** [Strategies](guides/strategies.md), [Stable funding perps (SFP)](guides/stable-perps.md),
[Builders](guides/builders.md), [Deposits and withdrawals](guides/deposits-and-withdrawals.md) and
[Referrals](guides/referrals.md).

Other ways in:

- Writing code with an AI agent: give it [Notes for coding agents](AGENTS.md) and [llms.txt](llms.txt).
- Looking for a call: [All calls](reference/index.md) lists every RPC and stream.
- Trading several exchanges through one library: [CCXT](https://docs.ccxt.com/#/exchanges/grvt) supports Grvt.
- Questions about your account or the Grvt web app: the [Help Center](https://help.grvt.io/en/).

## Glossary

| Term | What it is |
|---|---|
| Main account | Your account on Grvt, identified by a `0x` address (`main_account_id`). Deposits arrive here and withdrawals leave from here; it does not trade. The Grvt web app calls it the **Funding Account**, and some calls say "funding account". |
| Sub-account | A trading account under your main account, identified by a number, the sub-account ID (`sub_account_id`). Orders, positions and margin live here. The Grvt web app calls it a **Trading Account**. Move funds between the main account and its sub-accounts with [transfer](reference/rpc/transfer.md). |
| API key | Logs you in: exchanged for a session ([Authentication](guides/authentication.md)). |
| Signing key | Signs orders, transfers and withdrawals and never leaves your machine ([Two keys, two jobs](guides/authentication.md#two-keys-two-jobs)). |
| Session | The `gravity` cookie and `X-Grvt-Account-Id` header a login returns. Every call to the trading host sends them. |

## How the API is laid out

| Part | Host | What it does |
|---|---|---|
| Market data | `market-data.<domain>` | Instruments, tickers, order books, trades, candles. Public, no login. |
| Trading | `trades.<domain>` | Orders, positions, fills, accounts, transfers. Needs a session. |
| Edge | `edge.<domain>` | Login (API key or wallet signature). |

`<domain>` is `testnet.grvt.io` or `grvt.io` ([Environments](guides/environments.md)).

The market data and trading hosts speak the same two protocols:

- **HTTP**: `POST /full/v1/<route>` with a JSON body. The response body is the result object.
- **WebSocket**: JSON-RPC 2.0 on `/ws/full`. Every RPC works here too (`method: "v1/<route>"`), and streams
  are subscribed with `method: "subscribe"`.

Writes that move money or create orders carry an **EIP-712 signature** made with your signing key. The SDKs
sign for you; [Signing](guides/signing.md) explains the bytes if you sign yourself.

## Contract and signing test cases

The reference pages and the SDKs are generated from the same API contract
([contract.json](downloads/contract.json)), so they agree on names and types.
[signing.json](downloads/signing.json) holds signing test cases to check your own signing code against.
