Actions

Start Nectar SDK

Through Nectar SDK, all data, such as market pairs, price data, creating buy/sell order, order history, and so on, could be retrieved and/or created.

First of all, a Nectar instance should be initialized:

import { Nectar } from "@wasd3rplay/nectar-sdk";

const nectar = new Nectar(
    // 1. privateKey
    // 2. nectarUrl
    // 3. nectarAPIKey
);

When creating a Nectar instance, Numerous parameters can be provided, or alternatively, environment variables can be used in place of constructor parameters.

Parameters

  1. privateKey (optional)

    • The private key of user wallet

  2. nectarUrl (optional)

    • The Nectar API server URL

  3. nectarAPIKey (optional)

    • Issued API key via Nectar service

Environment Variables

  • NODE_USER_WALLET_SECRET

    • The private key of user wallet

    • If this exists, theprivateKey parameter of the constructor will be ignored.

  • NODE_NECTAR_URL

    • The Nectar API server URL

    • If this exists, the nectarUrl parameter of the constructor will be ignored.

  • NODE_NECTAR_API_KEY

    • Issued API key via Nectar service

    • If this exists, the nectarAPIKey parameter of the constructor will be ignored.

Last updated