### Setup Source: https://github.com/invezgo/invezgo-js-sdk/blob/main/docs/EXAMPLES.md Initialize the Invezgo SDK client with your API key. ```APIDOC ## Setup ### Description Initialize the Invezgo client with your API key to start making requests. ### Method N/A (Initialization) ### Endpoint N/A (Initialization) ### Parameters #### Request Body - **apiKey** (string) - Required - Your Invezgo API key. ### Request Example ```javascript import Invezgo from '@invezgo/sdk'; const client = new Invezgo({ apiKey: process.env.INVEZGO_API_KEY!, }); ``` ### Response N/A (Initialization) ``` -------------------------------- ### Manage Memberships (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Provides functionality to list, add, update, get scopes, get transactions, and delete membership tiers for content creators. Supports various membership management operations. ```typescript // List memberships const memberships = await client.membership.list(); // Create membership tier await client.membership.add({ name: 'Premium', price: 99000, benefit: ['Daily alerts', 'Exclusive analysis', 'Community access'] }); // Update membership await client.membership.update('membership-id', { name: 'Premium Plus', price: 149000, benefit: ['All Premium benefits', 'Weekly webinars', 'Priority support'] }); // Get membership scopes const scopes = await client.membership.getScope(); // Get transactions const transactions = await client.membership.getTransactions(); // Delete membership await client.membership.delete('membership-id'); ``` -------------------------------- ### Get Portfolio Summary Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves an aggregated summary of the user's portfolio, including key performance metrics and statistics. ```typescript const summary = await client.portfolios.getSummary(); // Returns portfolio summary statistics ``` -------------------------------- ### Get Price Table Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves price distribution table showing volume at each price level. ```APIDOC ## GET /analysis/price-table/{code} ### Description Retrieves price distribution table showing volume at each price level. ### Method GET ### Endpoint /analysis/price-table/{code} ### Parameters #### Path Parameters - **code** (string) - Required - The stock ticker symbol (e.g., 'BBCA'). #### Query Parameters - **date** (string) - Required - The date for the price table data in 'YYYY-MM-DD' format. ### Request Example ```json { "date": "2026-03-10" } ``` ### Response #### Success Response (200) - **PriceTableData[]** - An array of price distribution data. - **price** (number) - The price level. - **buy_volume** (number) - The volume traded at this price on the buy side. - **sell_volume** (number) - The volume traded at this price on the sell side. - **buy_freq** (number) - The frequency of buy orders at this price. - **sell_freq** (number) - The frequency of sell orders at this price. #### Response Example ```json [ { "price": 9100, "buy_volume": 500000, "sell_volume": 300000, "buy_freq": 150, "sell_freq": 80 }, { "price": 9075, "buy_volume": 800000, "sell_volume": 600000, "buy_freq": 200, "sell_freq": 150 }, ... ] ``` ``` -------------------------------- ### Get User Recommendations (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves personalized stock recommendations for the authenticated user based on their preferences. Returns an array of recommended stocks. ```typescript const recommendations = await client.recommendation.getUserRecommendations(); // Returns array of recommended stocks based on user preferences ``` -------------------------------- ### Get Portfolio List Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves a list of the user's current portfolio holdings. The result is an array containing details of each portfolio entry. ```typescript const portfolios = await client.portfolios.list(); // Returns array of portfolio entries ``` -------------------------------- ### Get All Community Posts (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves all community posts from the Invezgo feed. Returns an array of all available posts. ```typescript const posts = await client.posts.getAll(); ``` -------------------------------- ### Get Price Diary Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves historical daily price data for creating price seasonality analysis. ```APIDOC ## GET /analysis/price-diary/{code} ### Description Retrieves historical daily price data for creating price seasonality analysis. ### Method GET ### Endpoint /analysis/price-diary/{code} ### Parameters #### Path Parameters - **code** (string) - Required - The stock ticker symbol (e.g., 'BBCA'). ### Request Example ```json {} ``` ### Response #### Success Response (200) - **PriceDiaryData[]** - An array of historical daily price data. - **date** (string) - The date of the data. - **price** (number) - The closing price for the day. - **value** (string) - The trading value for the day. - **volume** (string) - The trading volume for the day. - **change** (number) - The percentage change from the previous day's close. #### Response Example ```json [ { "date": "2026-03-10", "price": 9050, "value": "135000000000", "volume": "15000000", "change": 0.83 }, ... ] ``` ``` -------------------------------- ### Get KSEI Shareholder Data Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves KSEI (Indonesian Central Securities Depository) shareholder data showing institutional breakdown. ```APIDOC ## GET /analysis/shareholder-ksei/{code} ### Description Retrieves KSEI (Indonesian Central Securities Depository) shareholder data showing institutional breakdown. ### Method GET ### Endpoint /analysis/shareholder-ksei/{code} ### Parameters #### Path Parameters - **code** (string) - Required - The stock ticker symbol (e.g., 'BBCA'). #### Query Parameters - **months** (integer) - Optional - The number of past months to retrieve data for (max 12). ### Request Example ```json { "months": 12 } ``` ### Response #### Success Response (200) - **ShareholderKSEI[]** - An array of KSEI shareholder data. - **code** (string) - Stock ticker symbol. - **date** (string) - Month and year of the data (e.g., '2026-03'). - **price** (string) - Closing price for the period. - **local_is** (string) - Local Investor - Buy value. - **local_cp** (string) - Local Investor - Sell value. - **foreign_is** (string) - Foreign Investor - Buy value. - **foreign_cp** (string) - Foreign Investor - Sell value. - ... (other relevant KSEI data fields) #### Response Example ```json [ { "code": "BBCA", "date": "2026-03", "price": "9050", "local_is": "15.5", "local_cp": "8.2", "foreign_is": "25.3", ... }, ... ] ``` ``` -------------------------------- ### Get Time Table Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves time-based OHLCV data bucketed by specified time intervals. ```APIDOC ## GET /analysis/time-table/{code} ### Description Retrieves time-based OHLCV data bucketed by specified time intervals. ### Method GET ### Endpoint /analysis/time-table/{code} ### Parameters #### Path Parameters - **code** (string) - Required - The stock ticker symbol (e.g., 'BBCA'). #### Query Parameters - **date** (string) - Required - The date for the time table data in 'YYYY-MM-DD' format. - **range** (integer) - Required - The time interval in minutes for each bucket (e.g., 15). ### Request Example ```json { "date": "2026-03-10", "range": 15 } ``` ### Response #### Success Response (200) - **TimeTableData[]** - An array of time-based OHLCV data. - **time** (string) - The time of the bucket (e.g., '09:00'). - **open** (number) - Opening price for the interval. - **high** (number) - Highest price for the interval. - **low** (number) - Lowest price for the interval. - **close** (number) - Closing price for the interval. - **value** (number) - Total trading value for the interval. - **buy** (number) - Buy value for the interval. - **sell** (number) - Sell value for the interval. #### Response Example ```json [ { "time": "09:00", "open": 9000, "high": 9025, "low": 8975, "close": 9000, "value": 5000000000, "buy": 3000000000, "sell": 2000000000 }, ... ] ``` ``` -------------------------------- ### Get Shareholder Composition Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves the current shareholder composition breakdown for a company. ```APIDOC ## GET /analysis/shareholder/{code} ### Description Retrieves the current shareholder composition breakdown for a company. ### Method GET ### Endpoint /analysis/shareholder/{code} ### Parameters #### Path Parameters - **code** (string) - Required - The stock ticker symbol (e.g., 'BBCA'). ### Request Example ```json {} ``` ### Response #### Success Response (200) - **ShareholderComposition[]** - An array of shareholder data. - **name** (string) - Name of the shareholder. - **percentage** (number) - Percentage of shares held. - **badge** (string) - A badge indicating the type of shareholder (e.g., 'majority', 'public'). #### Response Example ```json [ { "name": "PT Dwimuria Investama Andalan", "percentage": 54.94, "badge": "majority" }, { "name": "Public", "percentage": 45.06, "badge": "public" }, ... ] ``` ``` -------------------------------- ### Get Shareholder Composition Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Fetches the current shareholder breakdown for a company, including percentage ownership and classification badges. ```typescript const shareholders = await client.analysis.getShareholder('BBCA'); shareholders.forEach(sh => { console.log(`${sh.name}: ${sh.percentage}% (${sh.badge})`); }); ``` -------------------------------- ### Get KSEI Shareholder Data Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves institutional shareholder breakdown data from KSEI records, supporting up to 12 months of history. ```typescript const kseiData = await client.analysis.getShareholderKSEI('BBCA', 12); ``` -------------------------------- ### Get Inventory Chart Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves broker inventory chart showing accumulated positions over time for a stock. ```APIDOC ## GET /analysis/inventory-chart/{code} ### Description Retrieves broker inventory chart showing accumulated positions over time for a stock. ### Method GET ### Endpoint /analysis/inventory-chart/{code} ### Parameters #### Path Parameters - **code** (string) - Required - The stock ticker symbol (e.g., 'BBCA'). #### Query Parameters - **from** (string) - Required - Start date in 'YYYY-MM-DD' format. - **to** (string) - Required - End date in 'YYYY-MM-DD' format. - **scope** (string) - Required - The scope of the data ('vol' for volume, 'val' for value, 'freq' for frequency). - **investor** (string) - Required - Type of investor (e.g., 'all', 'local', 'foreign'). - **limit** (integer) - Optional - The maximum number of data points to return. - **market** (string) - Optional - The market code (e.g., 'RG'). - **filter** (array of strings) - Optional - Filter by specific broker codes (e.g., ['CC', 'YP']). ### Request Example ```json { "from": "2026-01-01", "to": "2026-03-10", "scope": "val", "investor": "all", "limit": 10, "market": "RG", "filter": ["CC", "YP"] } ``` ### Response #### Success Response (200) - **price** (array) - Historical price data. - **code** (string) - Stock ticker symbol. - **date** (string) - Date of the price data. - **open** (number) - Opening price. - **high** (number) - Highest price. - **low** (number) - Lowest price. - **close** (number) - Closing price. - **volume** (number) - Trading volume. - **broker** (array) - Broker inventory data. - **broker** (string) - Broker code. - **data** (array) - Accumulated positions over time for the broker. - **date** (string) - Date of the data point. - **value** (number) - The accumulated value or volume. #### Response Example ```json { "price": [ { "code": "BBCA", "date": "2026-01-01", "open": 9000, "high": 9050, "low": 8950, "close": 9020, "volume": 10000000 }, ... ], "broker": [ { "broker": "CC", "data": [{ "date": "2026-01-02", "value": 500000000 }, ...] }, ... ] } ``` ``` -------------------------------- ### Get User Watchlist (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves the public watchlist of a specified user. Returns the list of stocks the user is watching. ```typescript const watchlist = await client.profile.getUserWatchlist('username'); ``` -------------------------------- ### Get User Profile Details (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves detailed profile information for a specific user by their username. Returns user profile details. ```typescript const profile = await client.profile.getUserDetails('username'); // Returns user profile details ``` -------------------------------- ### Get Trades Summary and Chart (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves an aggregated summary of trading performance and data for generating a performance chart. Returns summary statistics and chart data. ```typescript const summary = await client.trades.getSummary(); const chart = await client.trades.getSummaryChart(); ``` -------------------------------- ### Get Shareholder Relation Graph Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves shareholder relationship graph data for visualizing ownership networks. ```APIDOC ## GET /analysis/shareholder-relation ### Description Retrieves shareholder relationship graph data for visualizing ownership networks. ### Method GET ### Endpoint /analysis/shareholder-relation ### Parameters #### Query Parameters - **code** (string) - Required - The stock ticker symbol (e.g., 'BBCA'). - **depth** (integer) - Optional - The maximum depth of the ownership chain to explore. - **max_nodes** (integer) - Optional - The maximum number of nodes to include in the graph. - **neighbors** (integer) - Optional - The number of direct neighbors to include for each node. - **min_percentage** (number) - Optional - The minimum percentage of ownership to consider. ### Request Example ```json { "code": "BBCA", "depth": 2, "max_nodes": 50, "neighbors": 5, "min_percentage": 5 } ``` ### Response #### Success Response (200) - **ShareholderRelationResponse** - An object containing nodes and edges of the shareholder graph. - **nodes** (array) - An array of nodes in the graph. - **id** (string) - Unique identifier for the node. - **type** (string) - Type of the node (e.g., 'company', 'individual'). - **label** (string) - Display name for the node. - **root** (boolean) - Indicates if this is the root node. - **depth** (integer) - Depth of the node from the root. - **percentage** (number) - Ownership percentage. - **edges** (array) - An array of edges connecting the nodes. - **id** (string) - Unique identifier for the edge. - **source** (string) - ID of the source node. - **target** (string) - ID of the target node. - **name** (string) - Name of the relationship (e.g., company name). - **percentage** (number) - Ownership percentage represented by the edge. #### Response Example ```json { "nodes": [ { "id": "BBCA", "type": "company", "label": "BBCA", "root": true, "depth": 0, "percentage": 100 }, ... ], "edges": [ { "id": "edge1", "source": "BBCA", "target": "PT Dwimuria", "name": "PT Dwimuria", "percentage": 54.94 }, ... ] } ``` ``` -------------------------------- ### Get Price Diary Data Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves historical daily price data, useful for seasonality analysis and long-term trend tracking. ```typescript const priceDiary = await client.analysis.getPriceDiary('BBCA'); ``` -------------------------------- ### Get Price Table Data Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves a volume distribution table for a specific date, showing buy/sell volume and frequency at various price levels. ```typescript const priceTable = await client.analysis.getPriceTable('BBCA', '2026-03-10'); const highestVolume = priceTable.sort((a, b) => (b.buy_volume + b.sell_volume) - (a.buy_volume + a.sell_volume))[0]; console.log(`Most active price: ${highestVolume.price}`); ``` -------------------------------- ### Get Broker and Sector Stalker Analytics Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Provides deep-dive tracking for broker-stock pairs or sector-wide performance. Includes calendar heatmaps and concentration metrics for flow analysis. ```typescript const stalker = await client.analysis.getBrokerStalker('CC', 'BBCA', { from: '2026-01-01', to: '2026-03-10', investor: 'all', market: 'RG', scope: 'value' }); const stalkerList = await client.analysis.getBrokerStalkerList('CC', { from: '2026-01-01', to: '2026-03-10', investor: 'all', scope: 'value', market: 'RG' }); const sectorStalker = await client.analysis.getStalkerSector({ from: '2026-03-01', to: '2026-03-10', base: 'COMPOSITE', limit: 10 }); ``` -------------------------------- ### Get User Memberships (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves the membership subscriptions associated with a user. Returns details about the user's active subscriptions. ```typescript const memberships = await client.profile.getMemberships('username'); ``` -------------------------------- ### Get Time Table Data Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves OHLCV data bucketed by specific time intervals for a given stock and date. ```typescript const timeTable = await client.analysis.getTimeTable('BBCA', { date: '2026-03-10', range: 15 }); ``` -------------------------------- ### Get Shareholder Relation Graph Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves network data representing shareholder relationships, including nodes and edges for ownership visualization. ```typescript const relation = await client.analysis.getShareholderRelation({ code: 'BBCA', depth: 2, max_nodes: 50, neighbors: 5, min_percentage: 5 }); console.log(`Nodes: ${relation.nodes.length}, Edges: ${relation.edges.length}`); ``` -------------------------------- ### Get Momentum Chart Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves momentum chart data showing buy vs sell pressure throughout the trading day. ```APIDOC ## GET /analysis/momentum-chart/{code} ### Description Retrieves momentum chart data showing buy vs sell pressure throughout the trading day. ### Method GET ### Endpoint /analysis/momentum-chart/{code} ### Parameters #### Path Parameters - **code** (string) - Required - The stock ticker symbol (e.g., 'BBCA'). #### Query Parameters - **date** (string) - Required - The date for the momentum data in 'YYYY-MM-DD' format. - **range** (integer) - Required - The time range in minutes for each data bucket (e.g., 30). - **scope** (string) - Required - The scope of the data ('val' for value, 'vol' for volume). ### Request Example ```json { "date": "2026-03-10", "range": 30, "scope": "val" } ``` ### Response #### Success Response (200) - **MomentumChartData[]** - An array of momentum data points for the trading day. - **time** (string) - The time of the data bucket (e.g., '09:00'). - **buy_lot** (number) - The volume or value of buy orders. - **sell_lot** (number) - The volume or value of sell orders. - **buy_percentage** (number) - The percentage of buy orders. - **sell_percentage** (number) - The percentage of sell orders. #### Response Example ```json [ { "time": "09:00", "buy_lot": 5000, "sell_lot": 3000, "buy_percentage": 0.625, "sell_percentage": 0.375 }, { "time": "09:30", "buy_lot": 4000, "sell_lot": 4500, "buy_percentage": 0.47, "sell_percentage": 0.53 }, ... ] ``` ``` -------------------------------- ### Get Order Book (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves the current order book for a stock, including bid and offer queues. This function requires the stock code and market type. ```typescript const orderBook = await client.analysis.getOrderBook('BBCA', 'RG'); // Returns: OrderBookResponse // { // code: "BBCA", // bid: [{ bid1price: 9050, bid1lot: 500, bid1freq: 25 }, ...], // offer: [{ offer1price: 9075, offer1lot: 300, offer1freq: 18 }, ...] // } console.log(`Best Bid: ${orderBook.bid[0].bid1price} (${orderBook.bid[0].bid1lot} lots)`); console.log(`Best Offer: ${orderBook.offer[0].offer1price} (${orderBook.offer[0].offer1lot} lots)`); ``` -------------------------------- ### Get User Posts and Category Posts (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves posts made by a specific user, with support for pagination. Also retrieves posts within a specific category for a user. ```typescript const posts = await client.profile.getUserPosts('username', '1', '10'); const categoryPosts = await client.profile.getCategoryPosts('username', 'analysis', '1', '10'); ``` -------------------------------- ### Get Top Retail Flow (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves top stocks based on retail investor accumulation and distribution, useful for analyzing retail behavior. It accepts a date string and returns retail accumulation and distribution data. ```typescript const topRetail = await client.analysis.getTopRitel('2026-03-10'); // Alias: client.analysis.getTopRetail('2026-03-10') // Returns: TopRetailResponse // { // accum: [{ code: "GOTO", name: "...", price: 85, change: 5.0, graph: [...] }], // dist: [{ code: "BBCA", name: "...", price: 9050, change: 1.5, graph: [...] }] // } console.log('Retail accumulating:', topRetail.accum.map(s => s.code)); ``` -------------------------------- ### Get Momentum Chart Data Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Fetches intraday buy vs sell pressure data. Inputs include the target date, time bucket range, and measurement scope. ```typescript const momentum = await client.analysis.getMomentumChart('BBCA', { date: '2026-03-10', range: 30, scope: 'val' }); momentum.forEach(m => { console.log(`${m.time}: Buy ${(m.buy_percentage * 100).toFixed(1)}% | Sell ${(m.sell_percentage * 100).toFixed(1)}%`); }); ``` -------------------------------- ### Get Stock and Index Charts Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves historical OHLCV data for specific stocks or market indices within a defined date range. Returns an array of data points containing price and volume information. ```typescript const chart = await client.analysis.getChart('BBCA', { from: '2026-01-01', to: '2026-03-10' }); const indexChart = await client.analysis.getIndexChart('COMPOSITE', { from: '2026-01-01', to: '2026-03-10' }); ``` -------------------------------- ### Get Journal Summary Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves an aggregated summary of all journal transactions. This summary typically includes portfolio statistics and performance metrics derived from the journal entries. ```typescript const summary = await client.journals.getSummary(); // Returns portfolio statistics from journal entries ``` -------------------------------- ### Get Posts by Category (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves community posts filtered by a specific category. Returns an array of posts belonging to the specified category. ```typescript const analysisPosts = await client.posts.getByCategory('analysis'); ``` -------------------------------- ### Get User Social Connections (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves the followers and following lists for a given user. Returns arrays of users for each list. ```typescript const followers = await client.profile.getFollowers('username'); const following = await client.profile.getFollowing('username'); ``` -------------------------------- ### Get Broker Transaction Summaries Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves aggregated transaction data for either a specific stock or a specific broker. Allows filtering by investor type (foreign/domestic) and market segment. ```typescript const brokerSummary = await client.analysis.getBrokerSummaryStock('BBCA', { from: '2026-03-01', to: '2026-03-10', investor: 'all', market: 'RG' }); const brokerActivity = await client.analysis.getBrokerSummaryBroker('CC', { from: '2026-03-01', to: '2026-03-10', investor: 'f', market: 'RG' }); ``` -------------------------------- ### Get Post Details, Comments, and Voters (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves the full content of a single post, its comments, and the users who voted on it. Returns detailed information for a post. ```typescript const post = await client.posts.getPostById('post-id'); const comments = await client.posts.getComments('post-id'); const voters = await client.posts.getVoters('post-id'); ``` -------------------------------- ### Get Intraday Index Data (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves real-time intraday data for a specified index, including market breadth (advancers/decliners) and market capitalization. Requires index code and market type. ```typescript const indexData = await client.analysis.getIntradayIndex('COMPOSITE', 'RG'); // Returns: IntradayIndexData // { // code: "COMPOSITE", // open: 7200, high: 7250, low: 7180, close: 7230, // volume: 12000000000, freq: 850000, value: 8500000000000, // prev: 7190, // positive: 285, negative: 180, neutral: 120, suspend: 5, // market_cap: 11500000000000000, market_value: 8500000000000 // } console.log(`Market: ${indexData.positive} up, ${indexData.negative} down`); ``` -------------------------------- ### Get User Engagement on Posts (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves posts that the authenticated user has liked or favorited. Returns arrays of liked and favorited posts. ```typescript const likedPosts = await client.posts.getLiked(); const favoritePosts = await client.posts.getFavorites(); ``` -------------------------------- ### Get Intraday Stock Data (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves real-time intraday summary data for a specific stock, including OHLCV, bid/offer, and IEP. Requires stock code and market type ('RG', 'NG', 'TN'). ```typescript const intraday = await client.analysis.getIntradayData('BBCA', 'RG'); // Market types: 'RG' (Regular), 'NG' (Negotiated), 'TN' (Crossing) // Returns: IntradayStockData // { // code: "BBCA", // open: 9000, high: 9100, low: 8975, close: 9050, // avg: 9025, volume: 15000000, freq: 8500, value: 135450000000, // prev: 8975, // bid_price: 9050, bid_lot: 500, bid_freq: 25, // offer_price: 9075, offer_lot: 300, offer_freq: 18, // iep: 9050, iev: 1000000 // } console.log(`${intraday.code}: ${intraday.close} (${((intraday.close - intraday.prev) / intraday.prev * 100).toFixed(2)}%)`); ``` -------------------------------- ### Get Stock-Related Posts (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves posts related to a specific stock, including posts filtered by category for that stock. Returns arrays of relevant posts. ```typescript const bbcaPosts = await client.posts.getStockPosts('BBCA'); const bbcaAnalysis = await client.posts.getStockCategoryPosts('BBCA', 'analysis'); ``` -------------------------------- ### Get Sector Rotation Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves sector rotation chart data showing relative strength and momentum for RRG (Relative Rotation Graph) visualization. ```APIDOC ## GET /analysis/sector-rotation ### Description Retrieves sector rotation chart data showing relative strength and momentum for RRG (Relative Rotation Graph) visualization. ### Method GET ### Endpoint /analysis/sector-rotation ### Parameters #### Query Parameters - **from** (string) - Required - Start date in 'YYYY-MM-DD' format. - **to** (string) - Required - End date in 'YYYY-MM-DD' format. - **base** (string) - Required - The base index or composite for comparison (e.g., 'COMPOSITE'). - **length** (integer) - Required - The number of periods to consider for calculation. - **tail** (integer) - Required - The number of periods to display in the tail of the rotation graph. - **limit** (integer) - Optional - The maximum number of sectors to return. ### Request Example ```json { "from": "2026-01-01", "to": "2026-03-10", "base": "COMPOSITE", "length": 10, "tail": 5, "limit": 11 } ``` ### Response #### Success Response (200) - **benchmark** (string) - The benchmark used for rotation. - **lastDate** (string) - The last date for which data is available. - **data** (array) - An array of sector rotation data. - **code** (string) - Sector code. - **name** (string) - Sector name. - **quadrant** (string) - The current quadrant (e.g., 'leading', 'lagging'). - **trail** (array) - Historical data points for the sector's rotation path. - **date** (string) - Date of the data point. - **x** (number) - X-axis value (relative strength). - **y** (number) - Y-axis value (momentum). #### Response Example ```json { "benchmark": "COMPOSITE", "lastDate": "2026-03-10", "data": [ { "code": "IDXFINANCE", "name": "Finance", "quadrant": "leading", "trail": [{ "date": "2026-03-09", "x": 102.5, "y": 101.2 }, ...] }, ... ] } ``` ``` -------------------------------- ### Get Top Gainers and Losers (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves the top gaining and losing stocks for a specific trading date, including price change percentage and mini chart data. This function requires a valid client instance and a date string as input. ```typescript const topChange = await client.analysis.getTopChange('2026-03-10'); // Returns: TopChangeResponse // { // gain: [{ code: "BRIS", name: "...", price: 2500, change: 24.5, graph: [...] }], // loss: [{ code: "MNCN", name: "...", price: 500, change: -15.2, graph: [...] }] // } console.log('Top Gainers:'); topChange.gain.slice(0, 5).forEach(stock => { console.log(`${stock.code}: +${stock.change}%`); }); ``` -------------------------------- ### Get Intraday Chart Data (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves intraday OHLCV chart data points for a stock, enabling visualization of price movements throughout the trading day. Requires stock code and market type. ```typescript const chartData = await client.analysis.getIntradayChart('BBCA', 'RG'); // Returns: IntradayChartData[] // [ // { date: "2026-03-10T09:00:00", open: 9000, high: 9025, low: 8975, close: 9000, volume: 500000, freq: 250, value: 4500000000 }, // { date: "2026-03-10T09:01:00", open: 9000, high: 9050, low: 9000, close: 9025, ... }, // ... // ] console.log(`Intraday data points: ${chartData.length}`); ``` -------------------------------- ### Get Sector Rotation Data Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves sector rotation chart data for RRG visualization. It requires date ranges and benchmark parameters to calculate relative strength and momentum. ```typescript const rotation = await client.analysis.getSectorRotation({ from: '2026-01-01', to: '2026-03-10', base: 'COMPOSITE', length: 10, tail: 5, limit: 11 }); rotation.data.forEach(sector => { console.log(`${sector.name}: ${sector.quadrant}`); }); ``` -------------------------------- ### Get Inventory Chart Data Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves broker inventory accumulation data for a specific stock over a defined period. Supports filtering by specific brokers and data scopes like volume or value. ```typescript const inventory = await client.analysis.getInventoryChartStock('BBCA', { from: '2026-01-01', to: '2026-03-10', scope: 'val', investor: 'all', limit: 10, market: 'RG', filter: ['CC', 'YP'] }); ``` -------------------------------- ### Get Technical Indicator Charts Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Fetches stock chart data augmented with technical analysis indicators such as bandarmology (bdm), RSI, or MACD. Requires the stock code and the specific indicator type. ```typescript const bdmChart = await client.analysis.getIndicatorChart('BBCA', 'bdm', { from: '2026-01-01', to: '2026-03-10' }); const rsiChart = await client.analysis.getIndicatorChart('BBCA', 'rsi', { from: '2026-01-01', to: '2026-03-10' }); ``` -------------------------------- ### Get Top Accumulation (Bandarmology) (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves top stocks exhibiting smart money (bandar) accumulation and distribution patterns. This function requires a date string and returns an object with 'accum' and 'dist' arrays. ```typescript const topAccum = await client.analysis.getTopAccumulation('2026-03-10'); // Returns: TopAccumulationResponse // { // accum: [{ code: "BMRI", name: "...", price: 6500, change: 3.1, graph: [...] }], // dist: [{ code: "ASII", name: "...", price: 5200, change: -2.0, graph: [...] }] // } console.log('Smart Money Accumulation:', topAccum.accum.slice(0, 5)); ``` -------------------------------- ### Get Top Foreign Flow (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves top stocks with foreign investor accumulation and distribution data for bandarmology analysis. It takes a date string as input and returns an object containing accumulation and distribution lists. ```typescript const topForeign = await client.analysis.getTopForeign('2026-03-10'); // Returns: TopForeignResponse // { // accum: [{ code: "BBCA", name: "...", price: 9050, change: 2.5, graph: [...] }], // dist: [{ code: "TLKM", name: "...", price: 3500, change: -1.2, graph: [...] }] // } console.log('Foreign Accumulation:', topForeign.accum.map(s => s.code).join(', ')); console.log('Foreign Distribution:', topForeign.dist.map(s => s.code).join(', ')); ``` -------------------------------- ### Initialize Invezgo Client Source: https://github.com/invezgo/invezgo-js-sdk/blob/main/docs/EXAMPLES.md Demonstrates how to import the Invezgo SDK and initialize the client using an API key from environment variables. This instance serves as the entry point for all subsequent SDK operations. ```typescript import Invezgo from '@invezgo/sdk'; const client = new Invezgo({ apiKey: process.env.INVEZGO_API_KEY!, }); ``` -------------------------------- ### Initialize Invezgo Client Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Configures the Invezgo client with an API key and optional network settings. It supports dynamic API key management and provides methods to verify authentication status. ```typescript import Invezgo, { InvezgoError } from '@invezgo/sdk'; // Initialize client with API key const client = new Invezgo({ apiKey: process.env.INVEZGO_API_KEY!, baseURL: 'https://api.invezgo.com', // optional, this is the default timeout: 30000 // optional, default 30 seconds }); // Dynamic API key management client.setApiKey('new-api-key'); console.log(client.hasApiKey()); // true ``` -------------------------------- ### Retrieve Recommendations Source: https://github.com/invezgo/invezgo-js-sdk/blob/main/docs/EXAMPLES.md Fetches personalized stock recommendations generated for the authenticated user. ```typescript const recommendations = await client.recommendation.getUserRecommendations(); ``` -------------------------------- ### Screener API Source: https://github.com/invezgo/invezgo-js-sdk/blob/main/docs/EXAMPLES.md Create and run stock screeners based on custom formulas and categories. Save screeners for future use. ```APIDOC ## Screener API ### Description Build and execute custom stock screeners using defined formulas and categories. You can save your screeners for easy access and reuse. ### Method POST ### Endpoint - `/screener/save` - `/screener/screen` ### Parameters #### Screener Save ##### Request Body - **name** (string) - Required - The name of the screener. - **formula** (string) - Required - The formula defining the screening criteria. - **category** (array) - Required - Categories to apply the screener to (e.g., ['COMPOSITE']). #### Screener Screen ##### Request Body - **formula** (string) - Required - The formula for screening. - **category** (array) - Required - Categories to screen within (e.g., ['COMPOSITE', 'IDXENERGY']). ### Request Example (Save Screener) ```javascript await client.screener.save({ name: 'Above EMA20', formula: 'close > ema(20)', category: ['COMPOSITE'], }); ``` ### Request Example (Run Screener) ```javascript const results = await client.screener.screen({ formula: 'close > ema(20) and volume > sma(volume, 20)', category: ['COMPOSITE', 'IDXENERGY'], }); ``` ### Response #### Success Response (200) - Screen - **results** (array) - A list of stocks matching the screening criteria. ``` -------------------------------- ### Run Stock Screener Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Executes a stock screener based on a provided formula and a list of categories. It returns an array of stocks that match the screening criteria. ```typescript const results = await client.screener.screen({ formula: 'close > ema(20) and volume > sma(volume, 20) and rsi < 70', category: ['COMPOSITE', 'IDXFINANCE', 'IDXENERGY'] }); // Returns: array of matching stocks console.log(`Found ${results.length} matching stocks`); ``` -------------------------------- ### Recommendation API Source: https://github.com/invezgo/invezgo-js-sdk/blob/main/docs/EXAMPLES.md Retrieve user-specific stock recommendations. ```APIDOC ## Recommendation API ### Description Fetch personalized stock recommendations generated for the user. ### Method GET ### Endpoint - `/recommendation/getUserRecommendations` ### Parameters #### getUserRecommendations ##### Request Body None ### Request Example ```javascript const recommendations = await client.recommendation.getUserRecommendations(); ``` ### Response #### Success Response (200) - **recommendations** (array) - A list of recommended stocks or financial instruments. ``` -------------------------------- ### Search Stocks with Pagination (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Searches for stocks using a query and a cursor token for pagination. Returns paginated stock search results. ```typescript const stocks = await client.search.searchStock('bank', 'cursor-token'); // Returns paginated stock search results ``` -------------------------------- ### Manage Market Alerts Source: https://github.com/invezgo/invezgo-js-sdk/blob/main/docs/EXAMPLES.md Shows how to create, list, and test technical analysis alerts. Alerts are defined by formulas and categories, allowing for automated monitoring of market conditions. ```typescript await client.alerts.add({ name: 'Momentum breakout', formula: 'close > ema(20) and rsi > 60', category: ['COMPOSITE'], every: 'END_OF_DAY', send: 'IN_OUT', }); const alerts = await client.alerts.list(); await client.alerts.test({ formula: 'close > ema(20)', category: ['IDXFINANCE'], }); ``` -------------------------------- ### Fetch Company Information Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves detailed corporate data for a specific stock code, including business sector, IPO details, board members, and subsidiary information. ```typescript const info = await client.analysis.getInformation('BBCA'); console.log(`${info.name} listed on ${info.listing_date}`); ``` -------------------------------- ### Search Users with Pagination (TypeScript) Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Searches for users within the Invezgo community using a query and a cursor token for pagination. Returns paginated user search results. ```typescript const users = await client.search.searchUser('john', 'cursor-token'); // Returns paginated user search results ``` -------------------------------- ### Manage Watchlists Source: https://github.com/invezgo/invezgo-js-sdk/blob/main/docs/EXAMPLES.md Provides methods to add stocks to watchlists and manage watchlist groups. Supports creating, updating, and deleting groups to organize tracked assets. ```typescript await client.watchlists.add({ group: 'swing', code: 'BBRI', price: 4500, scope: ['private'], }); await client.watchlists.addGroup({ name: 'Dividend' }); await client.watchlists.updateGroup('group-id', { name: 'Value Plays' }); await client.watchlists.deleteGroup('group-id'); ``` -------------------------------- ### Save Screener Preset Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Saves a stock screener configuration as a preset for future use. It requires a name, description, formula, category, and scope for the preset. ```typescript await client.screener.save({ name: 'Momentum Breakout', description: 'Stocks breaking above EMA with volume confirmation', formula: 'close > ema(20) and volume > sma(volume, 20)', category: ['COMPOSITE'], scope: ['private'] }); ``` -------------------------------- ### Watchlists API Source: https://github.com/invezgo/invezgo-js-sdk/blob/main/docs/EXAMPLES.md Manage your watchlists, including adding stocks, creating, updating, and deleting watchlist groups. ```APIDOC ## Watchlists API ### Description Manage your personalized watchlists. Add specific stocks to watchlists, create new groups for organizing stocks, and update or delete these groups. ### Method POST, PUT, DELETE ### Endpoint - `/watchlists/add` - `/watchlists/addGroup` - `/watchlists/updateGroup` - `/watchlists/deleteGroup` ### Parameters #### Watchlists Add ##### Request Body - **group** (string) - Required - The name of the watchlist group. - **code** (string) - Required - The stock code to add. - **price** (number) - Required - The price associated with the stock in the watchlist. - **scope** (array) - Required - Scope of the watchlist (e.g., ['private']). #### Watchlists Add Group ##### Request Body - **name** (string) - Required - The name of the new watchlist group. #### Watchlists Update Group ##### Path Parameters - **groupId** (string) - Required - The ID of the group to update. ##### Request Body - **name** (string) - Required - The new name for the watchlist group. #### Watchlists Delete Group ##### Path Parameters - **groupId** (string) - Required - The ID of the group to delete. ### Request Example (Add Stock to Watchlist) ```javascript await client.watchlists.add({ group: 'swing', code: 'BBRI', price: 4500, scope: ['private'], }); ``` ### Request Example (Add Watchlist Group) ```javascript await client.watchlists.addGroup({ name: 'Dividend' }); ``` ### Request Example (Update Watchlist Group) ```javascript await client.watchlists.updateGroup('group-id', { name: 'Value Plays' }); ``` ### Request Example (Delete Watchlist Group) ```javascript await client.watchlists.deleteGroup('group-id'); ``` ### Response #### Success Response (200) Typically returns a success status or confirmation message. Specific response bodies may vary. ``` -------------------------------- ### Fetch Financial Statements and Key Statistics Source: https://context7.com/invezgo/invezgo-js-sdk/llms.txt Retrieves structured financial statements and fundamental key ratios for a given ticker. Supports various statement types (BS, IS, CF) and periods (FY, Q). ```typescript const financials = await client.analysis.getFinancialStatement('BBCA', { statement: 'IS', type: 'FY', limit: 5 }); const keyStats = await client.analysis.getKeyStat('BBCA', { type: 'FY', limit: 5 }); ```