JSPM

@chmouel/bourso-api-js

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q46183F
  • License MIT

A simple, modern, and lightweight unofficial Boursorama API client for Node.js.

Package Exports

  • @chmouel/bourso-api-js
  • @chmouel/bourso-api-js/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@chmouel/bourso-api-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Bourso API JS

A simple, modern, and lightweight unofficial Boursorama API client for Node.js.

This library is a TypeScript rewrite of the public, unauthenticated parts of the bourso-api Rust library.

Installation

npm install @chmouel/bourso-api-js

Usage

import { BoursoClient } from '@chmouel/bourso-api-js';

const client = new BoursoClient();

async function getQuote() {
  try {
    const quote = await client.getQuote('1rTCW8'); // Example symbol for 'AMUNDI ETF MSCI WORLD UCITS ETF'
    console.log(quote);
  } catch (error) {
    console.error(error);
  }
}

getQuote();

API

getQuote(symbol: string): Promise<InstrumentQuoteResponse>

Retrieves the quote for a given symbol.

  • symbol (string): The symbol of the instrument (e.g., '1rTCW8').
  • Returns: A Promise that resolves to an InstrumentQuoteResponse object.

search(query: string): Promise<SearchResponse>

Searches for stocks.

  • query (string): The search query.
  • Returns: A Promise that resolves to a SearchResponse object.

License

This project is licensed under the MIT License.