Skip to Content
Getting StartedKey Components

Key Components

Understand the core classes and types used in the Nord SDK.

Core Classes

Nord

The Nord class is the main entry point for public API interactions.

  • Purpose: Fetch market data, orderbooks, and global state without user authentication.
  • Usage: Initialize once and pass to other components.

NordUser

The NordUser class represents an authenticated user.

  • Purpose: Manage account state, place orders, and handle funds.
  • Usage: Created via NordUser.fromPrivateKey or NordUser.fromWallet (for browser wallets).

Important Types & Enums

Market IDs

Markets are identified by numeric IDs, not strings.

  • 0: BTC-PERP
  • 1: ETH-PERP
  • 2: SOL-PERP (Check the /info endpoint for the full list of dynamic IDs)

Side

Specifies the direction of an order.

enum Side { Bid = 'Bid', // Buy Ask = 'Ask' // Sell }

FillMode

Defines how an order should be executed.

enum FillMode { Limit = 0, // Standard limit order PostOnly = 1, // Maker-only order ImmediateOrCancel = 2, // Fill what you can immediately, cancel the rest FillOrKill = 3 // Fill the entire size immediately or cancel (Market Order) }

TriggerKind

Used for conditional orders.

enum TriggerKind { StopLoss = 0, TakeProfit = 1 }

Infrastructure

Solana Connection

The SDK relies on @solana/web3.js for blockchain interactions.

  • Purpose: Broadcasting transactions and listening for on-chain confirmations.
  • Requirement: Must be a valid RPC connection (e.g., Helius, Alchemy, or generic Solana RPC).
Last updated on