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

wikifolio

v0.4.2

Published

Wikifolio (unofficial) API

Downloads

13

Readme

divider

⭐ Features

  • Session management
  • Search wikifolios
  • Fetch wikifolio details / analysis / price
  • Fetch portfolio positions
  • Fetch wikifolio trades
  • Fetch watchlist entries
  • Watch / unwatch wikifolios
  • Fetch users & their wikifolios
  • Trading: place & modify buy & sell orders

divider

🌞 Contributors wanted

divider

🛫 Install

# using npm
npm i wikifolio

# using yarn
yarn add wikifolio

divider

📝 Examples

The examples assume the following setup:

import Api from 'wikifolio'

const api = new Api({
  email: '[email protected]',
  password: 'plaintext-password'
})

☝️ Use encrypted environment variables or command line prompts, never store your passwords in plain text.

divider

1. Fetch details of a wikifolio

const wikifolio = api.wikifolio('wfobserver')
console.log( await wikifolio.details() )

divider

2. Fetch wikifolio price

const wikifolio = api.wikifolio('wfobserver')
console.log( await wikifolio.price() )

divider

3. Fetch wikifolio trades

const wikifolio = api.wikifolio('wfobserver')
console.log( await wikifolio.trades({pageSize: 100, page: 1}) )

divider

4. Fetch wikifolio index history (chart)

const wikifolio = api.wikifolio('wfobserver')
console.log( await wikifolio.history() )

divider

5. Fetch portfolio items of a wikifolio

const wikifolio = api.wikifolio('wfobserver')
console.log( await wikifolio.portfolio() )

divider

6. Search wikifolios

const wikifolios = await api.search({query: 'Supervisor'})
console.log( wikifolios )

divider

7. Unwatch all wikifolios on the watchlist

const watchlist = await api.watchlist()
for(const wikifolio of watchlist){
    await wikifolio.watchlist(false)
}

divider

8. Get trader info

const user = api.user('riennevaplus')
console.log( await user.details() )

divider

9. Get wikifolios of a trader

const user = api.user('riennevaplus')
console.log( await user.wikifolios() )

divider

10. Place a limit order

There's a similar sell() method.

const wikifolio = api.wikifolio('wfobserver')
const order = await wikifolio.buy({
    amount: 1,
    limitPrice: 220,
    orderType: "limit",
    underlyingIsin: "DE000LS9NMQ9",
    expiresAt: "2020-07-29T00:00:00.000Z"
})

Note: When orderType is set to quote the first returned quote will be accepted.

divider

11. Update an order

const wikifolio = api.wikifolio('wfobserver')
const order = wikifolio.order('8b4da005-6750-4b4c-9dff-0364d3e07be0')
console.log( await order.submit({limitPrice: 100}) )

divider

12. List & remove wikifolio orders

const wikifolio = api.wikifolio('wfobserver')
const orders = await wikifolio.orders({pageSize: 25, page: 0})

for(const order of orders){
    console.log( await order.remove() )
}

divider

👷 Todos

  • Improve documentation
  • Implement wikifolio sustainability

divider

🌻 Contributors