@quantgate-systems/sentiment

0.2.16 • Public • Published

SentimentGraph

Installation

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

Usage

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

Note

When using create-react-app please ensure you are using the latest version of react and react-dom , i.e. ^18.1.0

create-react-app

import {SentimentSpectrumApp} from '@quantgate-systems/sentiment';

const [currentSymbol, setCurrentSymbol] = useState('MSFT');

//sample handler for click change symbol
const handleSymbolChange = useCallback(() => {
  setCurrentSymbol('AAPL');
}, []);

return (
  <SentimentSpectrumApp
    credentials={{
      UserName: 'your user name',
      Password: 'your password',
    }}
    brokerName={
      'simulation-mode' ||
      'demo-mode' ||
      'signals-only' ||
      'paper-forex' ||
      'alt5' ||
      'bitfinex' ||
      'binance' ||
      'bittrex' ||
      'bitstamp' ||
      'gemini' ||
      'kraken' ||
      'liquid'
    }
    symbol={currentSymbol}
    width={500}
  />
);

next.js

import dynamic from 'next/dynamic';

const SentimentSpectrumApp = dynamic(() => import('@quantgate-systems/sentiment'));

const [currentSymbol, setCurrentSymbol] = useState('MSFT');

//sample handler for click change symbol
const handleSymbolChange = useCallback(() => {
  setCurrentSymbol('AAPL');
}, []);

return (
  <SentimentSpectrumApp
    credentials={{
      UserName: 'your user name',
      Password: 'your password',
    }}
    brokerName={
      'simulation-mode' ||
      'demo-mode' ||
      'signals-only' ||
      'paper-forex' ||
      'alt5' ||
      'bitfinex' ||
      'binance' ||
      'bittrex' ||
      'bitstamp' ||
      'gemini' ||
      'kraken' ||
      'liquid'
    }
    symbol={currentSymbol}
    width={500}
  />
);

Note:

brokerName could be one of the following and it will return a Sentiment Graph:

  • Traditional Brokerages
    • demo-mode
    • simulation-mode
    • signals-only
    • paper-forex
  • Digital Exchanges
    • bitfinex
    • binance
    • bittrex
    • bitstamp
    • gemini
    • kraken
    • liquid

Readme

Keywords

none

Package Sidebar

Install

npm i @quantgate-systems/sentiment

Weekly Downloads

1

Version

0.2.16

License

ISC

Unpacked Size

20 MB

Total Files

29

Last publish

Collaborators

  • savitra_qg
  • quantqate