Skip to content
CTRL K
    Packages

    Packages

    What you install

    Install and import @nutrimatic/sdk only. That package gives you createNutrimaticSdk(), helpers, errors, and types. Modules such as easy, routing, and balances appear on the returned sdk object — you do not install them separately.

    See SDK — Import. Short version:

    1. Install @nutrimatic/sdk only.
    2. Always import createNutrimaticSdk to configure the client. Modules (easy, telemetry, routing, …) live on the returned object — e.g. sdk.easy.read.getChart(...).
    3. Import helpers, NutrimaticError, or types from the same package only when you need them. If you only call sdk.*, you may never import anything else.
    // Typical start
    import { createNutrimaticSdk } from '@nutrimatic/sdk'
    
    // Later, only if a guide needs it
    import { mergeCandleSeries, lastClosedCandleTime } from '@nutrimatic/sdk'
    When you need…Import from @nutrimatic/sdkDocs
    Client setupcreateNutrimaticSdkEvery app
    ErrorsNutrimaticErrorErrors
    Chart refresh helpersmergeCandleSeries, lastClosedCandleTime, …Chart windows
    Feed refresh helpersmergeFeedSeries, lastFeedCursor, compareFeedCursors, …Activity feeds
    TypeScript shapesWalletAdapter, Quote, CandleSeries, NutrimaticError, …Types

    Module map

    Read path

    easy.read  →  telemetry / catalog
    catalog    →  ledgers, instruments, venues, deployments
    telemetry  →  OHLCV, pool views, instrument stats, venue event feeds
    venues     →  live AMM state, spot rates

    Read operations · Chart windows · Activity feeds

    Write path

    routing.quote  →  easy.swap  →  execution handle / settlement.track
    liquidity.add | liquidity.remove  →  execution handle
    balances.approve | staking.* | farming.*  →  execution handle
    positions.*  →  read-only portfolio rows

    Writes need a WalletAdapter for signing. Init (mode, wallet): Configuration — Modes.

    Write operations · Swaps · Liquidity · Balances · Positions · Staking · Farming · Settlement

    Shared

    kernel     →  types, errors, merge helpers (via @nutrimatic/sdk)
    transport  →  config validation

    Nutrimatic does not ship a wallet. You bring your own and implement WalletAdapter.

    Runtime failures return typed errors — see Errors. Method naming: Naming conventions.

    Internal package map (optional)

    Only if you want to know what @nutrimatic/sdk composes under the hood. Do not install or import these packages in your app.

    PackageRole inside the SDK
    @nutrimatic/sdkPublic entry — what you install
    @nutrimatic/kernelShared types, errors, candle/feed merge helpers (re-exported by the SDK)
    @nutrimatic/transportConfig validation at start
    @nutrimatic/catalogLedgers, instruments, venues, deployments
    @nutrimatic/telemetryCharts, pool/token views, venue feeds
    @nutrimatic/venuesLive AMM state and spot rates
    @nutrimatic/easyConvenience reads and easy.swap
    @nutrimatic/routingrouting.quote
    @nutrimatic/settlementsettlement.track
    @nutrimatic/liquidityAdd / remove liquidity
    @nutrimatic/balancesBalances, allowances, approve
    @nutrimatic/positionsPortfolio position reads
    @nutrimatic/stakingProduct-token stake / unstake / claim
    @nutrimatic/farmingFarm deposit / withdraw / harvest