Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-finnhub

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-finnhub

React Library for finnhub-ts

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

react-finnhub

Docs and Source

building on finnhub-ts

Usage

Get your API-Key: https://finnhub.io/register

Provider

import { finnhubClient, FinnhubProvider } from 'react-finnhub'

const client = finnhubClient('YOUR-API-KEY')

<FinnhubProvider client={client}>
    <App />
</FinnhubProvider>

Hook

import React, { FunctionComponent, useState } from 'react'
import { BasicFinancials, useFinnhub } from 'react-finnhub'

type ITestProps = {}

export const App: FunctionComponent<ITestProps> = (props) => {
  const finnhub = useFinnhub()
  const [state, setState] = useState<BasicFinancials>()

  finnhub.companyBasicFinancials('AAPL', 'all').then((res) => setState(res.data))

  return <h1>{JSON.stringify(state)}</h1>
}

Keywords

FAQs

Package last updated on 16 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc