0.2.27 • Published 1 year ago

@quantgate-systems/watchlist v0.2.27

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Note: 10,499,785 live websites use react

start

npx create-react-app my-test-watchlist

Installation

npm i @quantgate-systems/watchlist or if you are using yarn, yarn add @quantgate-systems/watchlist

Usage

In order to use watchlist, create a user on Pilot application and pass your credentials to Watchlist component

create-react-app

import {WatchlistApp} from '@quantgate-systems/watchlist';

const [symbols, setSymbols] = useState([]); //changed symbols sent as prop

//your app's symbol handler
const handler = () => {
  setSymbols(prev => {
    return [...prev, newSymbolToAdd];
  });
};

const onItemClick = instrument => {
  console.log(instrument);
};

return (
  <WatchlistApp
    credentials={{UserName: 'your user name', Password: 'your password'}}
    brokerName={'simulation-mode' || 'demo' || 'signals-only'}
    onItemClick={onItemClick}
    symbols={symbols} //string array of symbols as a callback. Ex above
    onSymbolAdded={symbol => console.log(symbol)}
    miniFilter
    styles={{containerHeight: '100%'}}
  />
);

next.js

import dynamic from 'next/dynamic';

const WatchlistApp = dynamic(() => import('@quantgate-systems/watchlist'));

//your app's symbol handler
const handler = () => {
  setSymbols(prev => {
    return [...prev, newSymbolToAdd];
  });
};

const onItemClick = instrument => {
  console.log(instrument);
};

return (
  <WatchlistApp
    credentials={{UserName: 'your user name', Password: 'your password'}}
    brokerName={'simulation-mode' || 'demo' || 'signals-only'}
    onItemClick={onItemClick}
    symbols={symbols} //string array of symbols as a callback. Ex above
    onSymbolAdded={symbol => console.log(symbol)}
    miniFilter
    styles={{containerHeight: '100%'}}
  />
);

Note:

brokerName could be one of simulation-mode, demo or signals-only and it will return a watchlist with market data and signals

if you pass miniFilters it will make the filter sizes smaller

and you can also overwrite some styles using styles property. we will add more styles to overwrite in future

0.2.27

1 year ago

0.2.26

1 year ago

0.2.25

2 years ago

0.2.24

2 years ago

0.2.23

2 years ago

0.2.22

2 years ago

0.2.21

2 years ago

0.2.20

2 years ago

0.2.19

2 years ago

0.2.18

2 years ago

0.2.17

2 years ago

0.2.16

2 years ago

0.2.15

2 years ago

0.2.14

2 years ago

0.2.13

2 years ago

0.2.12

2 years ago

0.2.11

2 years ago

0.2.10

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.9

2 years ago

0.2.8

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago