Introduction
npm install @wezzcoetzee/grvtpnpm add @wezzcoetzee/grvtyarn add @wezzcoetzee/grvtbun add @wezzcoetzee/grvtdeno add jsr:@wezzcoetzee/grvtFeatures
Quick Examples
import { GrvtEnv, GrvtRawClient } from "@wezzcoetzee/grvt";
const client = new GrvtRawClient({
env: GrvtEnv.TESTNET,
});
// Fetch all active instruments
const instruments = await client.getAllInstruments({ is_active: true });
console.log(instruments.result);
// Fetch ticker for BTC perpetual
const ticker = await client.getTicker({ instrument: "BTC_USDT_Perp" });
console.log(ticker.result.last_price);import { GrvtClient, GrvtEnv } from "@wezzcoetzee/grvt";
const client = new GrvtClient({
env: GrvtEnv.TESTNET,
apiKey: "your-api-key",
tradingAccountId: "123456789",
privateKey: "0x...",
});
// Load markets (required for order signing)
await client.loadMarkets();
// Place a limit buy order
const order = await client.createOrder(
"BTC_USDT_Perp",
"limit",
"buy",
0.01, // amount
50000, // price
);
console.log(order);Client Types
Client
Description
Use Case
Next Steps
Last updated