FAQ

General

What environments are available?

Environment
Use Case

GrvtEnv.TESTNET

Development and testing

GrvtEnv.PROD

Live trading

GrvtEnv.STG

Internal staging

GrvtEnv.DEV

Internal development

Use TESTNET for all development and testing. Switch to PROD only for production deployments with real funds.

Which client should I use?

Client
Best For

GrvtClient

Trading bots, CCXT familiarity, automatic signing

GrvtRawClient

Custom implementations, direct API access

HttpTransport

Maximum control, minimal bundle size

What's the difference between GrvtClient and GrvtRawClient?

GrvtRawClient provides direct access to the API with typed methods. You handle signing manually.

GrvtClient wraps GrvtRawClient with:

  • Automatic market loading

  • Order validation

  • Built-in order signing

  • CCXT-compatible method names


Authentication

How do I get an API key?

Generate an API key from your GRVT account dashboard. Keep it secure and never commit it to version control.

What's the difference between API key and private key?

Credential
Purpose

API Key

Authenticates API requests (read data, submit orders)

Private Key

Signs orders cryptographically (EIP-712)

Both are required for trading. Only the API key is needed for reading data.

Why do I need to sign orders?

GRVT uses EIP-712 typed data signing for order integrity. This ensures:

  • Orders can't be tampered with

  • Only the account owner can place orders

  • Orders are tied to a specific chain ID


Orders

Why do I get "Markets not loaded"?

Call loadMarkets() before placing orders:

Why do I get "Invalid order type"?

Order types must be exactly "limit" or "market":

How do I place a market order?

How do I cancel an order?


WebSocket

How do I subscribe to real-time data?

Why did my subscription stop working?

Check the failureSignal:

How do I reconnect automatically?

The transport has resubscribe: true by default, but you need to handle reconnection yourself:


Errors

What does "Insufficient margin" mean?

Your account doesn't have enough collateral for the order. Check:

  • Account balance

  • Existing positions

  • Order size

What does "Symbol not found" mean?

The symbol isn't in your loaded markets. Either:

  • The symbol is misspelled

  • The instrument is inactive

  • Markets weren't loaded

How do I handle rate limits?

The SDK doesn't handle rate limits automatically. Implement backoff:


TypeScript

Why are types missing?

Make sure you're importing from the correct path:

How do I type WebSocket data?


Platform-Specific

Does it work in browsers?

Yes, with a bundler (Vite, webpack, esbuild). WebSocket and fetch are native browser APIs.

Does it work in Node.js?

Yes, Node.js 18+ has native fetch and WebSocket support.

Does it work in Deno?

Yes, Deno is the primary development target. Use JSR imports:

Does it work in Bun?

Yes, Bun 1.0+ is fully supported.

Last updated