npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kalilinuxuser5/aliceblue

v1.0.3

Published

An JS SDK for Alice Blue API

Downloads

29

Readme

aliceBlue

A JS SDK for Alice Blue API

  • Create a .env file which include API_KEY and USERID in it , which are further required for Alice Blue API Access, To Get the api key login to alice blue dashboard Click Here

    1. follow this step's after getting the api key and userid your .env file should look like this 👇

1694797817983

  1. import your api key and user id in the root file also don't forget to import our Alice Class you can do that by

    npm i @kalilinuxuser5/aliceblue
    
    
    
    ```javascript
    const Alice = require("@kalilinuxuser5/aliceblue/src/aliceBase")
    require('dotenv').config()
    let apiKey = process.env.API_KEY
    let userId = process.env.USERID

    or you can use it directly

const Alice = require("@kalilinuxuser5/aliceblue/src/aliceBase")
require("dotenv").config()

const main = async () => {
  
    let alice = new Alice(process.env.USERID, process.env.API_KEY)
    await alice.apiEncryptionKey()
    await alice.getSessionId()
    let positionBook = await alice.positionBook()
    console.log(positionBook)
}

main()

alice.apiEncryptionKey()

The Above Method is used to get encryption key from alice server

alice.getSessionId ()

This Above Method is required for getting Session token from alice server which are further required for all authorized endpoint



const Alice = require("@kalilinuxuser5/aliceblue/src/aliceBase")
require("dotenv").config()
const log = console.log

const main = async () => {

     let alice = new Alice(process.env.USERID, process.env.API_KEY)
    console.log(alice)
    let encryptionKey = await alice.apiEncryptionKey()
    log("enc key", encryptionKey)
    let sessionId = await alice.getSessionId()
    log("session id", sessionId)
    let orderBook = await alice.positionBook()
    log("order Book", orderBook)
    let holding = await alice.holdings()
    log("Holding", holding)
    let funds = await alice.getFunds()
    log("Funds", funds)
    let profile = await alice.getProfile()
    log("Funds", profile)
    let wsSession = await alice.getWSSession()
    log("Ws Session", wsSession)
    let wSocket = await alice.WebSocket()
    let searchScript = await alice.searchScrip("tcs")
    log("Search Script",searchScript)
    let watchList = await alice.watchList()
    log("watch list",watchList)
    let placeOrder = await alice.placeOrder()
    log("place order", placeOrder)
    let square_off = await alice.squareOff()
    log("square off", square_off)   
    let tradeBook = await alice.tradeBook()
    log("trade book", tradeBook)
    let modifyOrder = await alice.modifyOrder(transtype = "B", nestOrderNumber = 230915000171647)
    log("modify order", modifyOrder)
    let cancelOrder = await alice.cancelOrder(nestOrderNumber = 230915000171647)
    log("modify order", cancelOrder)
    let orderHistory = await alice.orderHistory(nestOrderNumber = 230915000171647)
    log("modify order", orderHistory)

}

main()

what's next after this 🤔

don't worry , we are working on it for adding more better support and better features in near future , Stay Tuned For More Updates 😎⭐

Fell Free To Contact me 🤙 👇

Website

LinkedIn

Medium

Instagram