mcpField
O
orderly-sdk-install-dependency

orderly-sdk-install-dependency

github.com/orderlynetworkDevelopment249 installsUpdated 4d ago
Repository

About orderly-sdk-install-dependency

An installation guide for React developers integrating the modular Orderly SDK. It maps packages to DEX, wallet, and custom UI use cases, with dependency and Vite setup guidance.

Key features

  1. 01Catalog of modular Orderly packages
  2. 02Trading and portfolio page components
  3. 03EVM, Solana, and Privy wallet connectors
  4. 04UI subpackages and low-level packages
  5. 05Installation paths by integration use case
  6. 06Version and Vite setup guidance

Use cases

  1. 01Installing the SDK for a new DEX
  2. 02Adding Orderly to an existing React project
  3. 03Selecting hooks and UI packages for custom interfaces
  4. 04Setting up standard wallets or Privy login

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/orderlynetwork/skills --skill orderly-sdk-install-dependency

After installing, type/orderly-sdk-install-dependencyin Claude Code to confirm it loaded.

Details

From the project README

Orderly Network: SDK Install Dependency

Use this skill to add Orderly SDK packages to your project. The SDK is modular—install only what you need. Versions below reflect the current 3.1.x line.

When to Use

  • Starting a new DEX project
  • Adding Orderly SDK to an existing project
  • Installing specific packages for custom integrations
  • Setting up wallet connectors

Prerequisites

  • Node.js 20+ installed (enforced in package.json engines)
  • npm, yarn, or pnpm package manager
  • React 18+ project (for UI packages)

Quick Start (Full DEX)

IMPORTANT: A functional DEX requires BOTH the Orderly packages AND the wallet connector dependencies. @orderly.network/wallet-connector needs @web3-onboard/* packages for EVM wallets and @solana/wallet-adapter-* packages for Solana wallets. <WalletConnectorProvider> takes configured evmInitial / solanaInitial props — they are not optional in a real DEX (see orderly-sdk-wallet-connection).

Note: @orderly.network/hooks is a transitive dependency of @orderly.network/react-app — you do not need to install it separately unless you are on the hooks-only integration path.

# Orderly SDK packages (all pinned to the same 3.1.x release)
npm install @orderly.network/react-app \
            @orderly.network/trading \
            @orderly.network/portfolio \
            @orderly.network/markets \
            @orderly.network/wallet-connector \
            @orderly.network/i18n

# REQUIRED: EVM wallet support (MetaMask, WalletConnect, Binance, etc.)
npm install @web3-onboard/injected-wallets @web3-onboard/walletconnect \
            @binance/w3w-blocknative-connector wagmi

# REQUIRED: Solana wallet support (Phantom, Solflare, mobile, etc.)
npm install @solana/wallet-adapter-base @solana/wallet-adapter-wallets \
            @solana-mobile/wallet-adapter-mobile

Package Reference

Core Packages
PackageDescriptionKey Exports
@orderly.network/react-appMain app provider, config contextOrderlyAppProvider, useAppContext, useAppConfig
@orderly.network/hooksReact hooks for trading, account, orders, positionsuseAccount, useOrderEntry, usePositionStream, useOrderStream, useDeposit, useWithdraw, useLeverage, useMarkets
@orderly.network/typesTypeScript type definitions and constantsAPI, OrderType, OrderSide, OrderStatus, NetworkId, ChainConfig
@orderly.network/uiBase UI components (buttons, inputs, dialogs, tables)Button, Input, Dialog, Table, Tabs, Select, Tooltip, Modal, Spinner, toast, useScreen, Flex, cn
@orderly.network/i18nInternationalization (i18n) supportLocaleProvider, useTranslation, i18n, defaultLanguages
@orderly.network/utilsUtility functions (formatting, math, dates)formatNumber, Decimal, dayjs
npm install @orderly.network/react-app @orderly.network/hooks @orderly.network/types @orderly.network/ui @orderly.network/i18n

Feature Widgets (High-Level Pages)

Complete, pre-built page components with full functionality. Exports below are the real names imported by the reference template — note Dashboard.DashboardPage, GeneralLeaderboardWidget, and PointSystemPage specifically.

PackageDescriptionKey Exports (verified)
@orderly.network/tradingFull trading page (chart, orderbook, order entry, positions)TradingPage, OrderBook, LastTrades, AssetView, RiskRate, SplitLayout
@orderly.network/portfolioPortfolio dashboard (positions, orders, assets, history)OverviewModule, PositionsModule, OrdersModule, AssetsModule, HistoryModule, FeeTierModule, APIManagerModule
@orderly.network/marketsMarkets listing page with prices and statsMarketsHomePage, MarketsProvider, MarketsList, SymbolInfoBar, FundingOverview
@orderly.network/vaultsVault/Earn products pageVaultsPage
@orderly.network/affiliateReferral/affiliate programDashboard (use Dashboard.DashboardPage), ReferralProvider
@orderly.network/trading-leaderboardTrading competition leaderboardGeneralLeaderboardWidget
@orderly.network/trading-pointsPoints/merits program pagePointSystemPage
npm install @orderly.network/trading @orderly.network/portfolio @orderly.network/markets @orderly.network/trading-leaderboard @orderly.network/trading-points @orderly.network/affiliate @orderly.network/vaults

There is no @orderly.network/trading-rewards package. The points/rewards page is @orderly.network/trading-points exporting PointSystemPage. Likewise @orderly.network/affiliate does not export AffiliatePage — use Dashboard.DashboardPage inside <ReferralProvider>.

Wallet Connectors

Choose one wallet connection strategy.

PackageDescriptionKey Exports
@orderly.network/wallet-connectorStandard connector (Web3-Onboard + Solana adapters)WalletConnectorProvider
@orderly.network/wallet-connector-privyPrivy connector (social login, embedded wallets)WalletConnectorPrivyProvider

Option A: Standard Wallet Connector (Recommended)

Supports EVM (MetaMask, WalletConnect, Binance, etc.) and Solana (Phantom, Solflare, Ledger, mobile).

The connector requires the underlying wallet packages — you build evmInitial (injected + WalletConnect connectors) and solanaInitial (network + wallet list) and pass both as props. See orderly-sdk-wallet-connection for the full walletConfig.ts.

npm install @orderly.network/wallet-connector

# EVM wallets
npm install @web3-onboard/injected-wallets @web3-onboard/walletconnect \
            @binance/w3w-blocknative-connector wagmi

# Solana wallets
npm install @solana/wallet-adapter-base @solana/wallet-adapter-wallets \
            @solana-mobile/wallet-adapter-mobile

Option B: Privy Connector

For social login (Google, X, email, passkey) and embedded wallets.

The Privy package depends on @privy-io/cross-app-connect (NOT the older @privy-io/react-auth).

npm install @orderly.network/wallet-connector-privy @privy-io/cross-app-connect

UI Sub-Packages (Granular Components)

Individual UI modules for custom integrations. These are dependencies of @orderly.network/trading and @orderly.network/portfolio, but can be installed separately. In the reference template, these are consumed via @orderly.network/ui and @orderly.network/ui-scaffold re-exports rather than imported directly.

PackageDescriptionKey Exports
@orderly.network/ui-scaffoldApp layout scaffold, navigation, account menuScaffold, MainNavWidget, BottomNavWidget, AccountMenuWidget, ChainMenuWidget, SideNavbarWidget
@orderly.network/ui-order-entryOrder entry form componentOrderEntry
@orderly.network/ui-positionsPositions table componentPositionsView
@orderly.network/ui-ordersOrders table componentOrdersView
@orderly.network/ui-transferDeposit/withdraw/transfer dialogsDepositWidget, WithdrawWidget
@orderly.network/ui-leverageLeverage selector componentLeverageWidget
@orderly.network/ui-tpslTake profit / stop loss formTPSLWidget
@orderly.network/ui-sharePnL sharing card generatorSharePnL
@orderly.network/ui-chain-selectorChain/network selector dropdownChainSelector
@orderly.network/ui-connectorWallet connect button & modalConnectWalletButton
@orderly.network/ui-tradingviewTradingView chart wrapperTradingViewChart
@orderly.network/ui-notificationNotification centerNotificationWidget
npm install @orderly.network/ui-scaffold @orderly.network/ui

Low-Level Packages

For advanced customization or non-React environments.

PackageDescriptionKey Exports
@orderly.network/coreLow-level API client, signing, key managementAccount, ConfigStore, WalletAdapter, signMessage
@orderly.network/perpPerpetual trading calculations (margin, liquidation)calcMargin, calcLiqPrice, calcPnL, calcIMR, calcMMR
@orderly.network/netNetwork/WebSocket layerWebSocketClient, EventEmitter
@orderly.network/default-evm-adapterDefault EVM wallet adapterEVMAdapter
@orderly.network/default-solana-adapterDefault Solana wallet adapterSolanaAdapter
npm install @orderly.network/core @orderly.network/perp

Installation by Use Case

Minimal Setup (Hooks Only)

For building fully custom UI with hooks.

npm install @orderly.network/react-app \
            @orderly.network/hooks \
            @orderly.network/types \
            @orderly.network/wallet-connector
Full DEX with All Features

Mirrors the reference template's dependencies:

npm install @orderly.network/react-app \
            @orderly.network/trading \
            @orderly.network/portfolio \
            @orderly.network/markets \
            @orderly.network/vaults \
            @orderly.network/affiliate \
            @orderly.network/trading-leaderboard \
            @orderly.network/trading-points \
            @orderly.network/wallet-connector \
            @orderly.network/wallet-connector-privy \
            @orderly.network/i18n \
            @orderly.network/types \
            @orderly.network/ui \
            @orderly.network/ui-scaffold

The reference template also pulls in woofi-swap-widget-kit (for the swap page), wagmi, react-helmet-async (SEO), react-router-dom (v7, routing), firebase, zod, ip-range-check, and @plausible-analytics/tracker. Add these only if your build uses those features.

Privy (Social Login) Setup
npm install @orderly.network/react-app \
            @orderly.network/trading \
            @orderly.network/wallet-connector-privy \
            @privy-io/cross-app-connect

Peer Dependencies

All packages require:

{
  "peerDependencies": {
    "react": ">=18",
    "react-dom": ">=18"
  }
}

Tailwind CSS Setup

The UI packages require Tailwind CSS. There is no Orderly preset — point the content glob at app/ (the source root) and the @orderly.network packages.

npm install -D tailwindcss postcss autoprefixer

tailwind.config.ts:

import type { Config } from 'tailwindcss';

export default {
  content: ['./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}'],
  theme: { extend: {} },
  plugins: [],
} satisfies Config;

CSS entry file:

Only @orderly.network/ui ships a CSS file. trading, portfolio, markets, etc. reuse these base styles — do not look for per-package CSS.

/* app/styles/index.css */
@import '@orderly.network/ui/dist/styles.css';

@tailwind base;
@tailwind components;
@tailwind utilities;

Vite Plugins (Required)

The wallet connector / Solana packages use Node.js built-ins (Buffer, crypto, stream) and some ship CommonJS. Polyfill only buffer, crypto, stream — do not add util or globals (they break the build). Interop CommonJS deps with vite-plugin-cjs-interop. Path aliases come from tsconfig.json via vite-tsconfig-paths.

npm install -D vite-plugin-node-polyfills vite-plugin-cjs-interop vite-tsconfig-paths

vite.config.ts:

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tsconfigPaths from 'vite-tsconfig-paths';
import { cjsInterop } from 'vite-plugin-cjs-interop';
import { nodePolyfills } from 'vite-plugin-node-polyfills';

export default defineConfig({
  plugins: [
    react(),
    tsconfigPaths(),
    cjsInterop({ dependencies: ['bs58', '@coral-xyz/anchor', 'lodash'] }),
    nodePolyfills({ include: ['buffer', 'crypto', 'stream'] }), // NO util, NO globals
  ],
});

Version Compatibility

All @orderly.network/* packages must share the same version. The exception is @orderly.network/trading-points, which follows its own version line. Current reference versions:

{
  "dependencies": {
    "@orderly.network/react-app": "3.1.6",
    "@orderly.network/trading": "3.1.6",
    "@orderly.network/portfolio": "3.1.6",
    "@orderly.network/hooks": "3.1.6",
    "@orderly.network/ui": "3.1.6",
    "@orderly.network/trading-points": "2.0.2"
  }
}

Package Manager Commands

npm:

npm install <package-name>

yarn:

yarn add <package-name>

pnpm:

pnpm add <package-name>

Related Skills

  • orderly-sdk-dex-architecture - Project structure and provider setup
  • orderly-sdk-wallet-connection - Wallet integration details
  • orderly-sdk-page-components - Using pre-built page components
  • orderly-sdk-trading-workflows - End-to-end trading implementation
  • orderly-sdk-theming - Customizing the UI appearance

Comments

Markdown supported