@fugle/marketdata
Advanced tools
| import { RestClientRequest } from '../../client'; | ||
| export interface RestStockTechnicalBbParams { | ||
| symbol: string; | ||
| from?: string; | ||
| to?: string; | ||
| timeframe?: 'D' | 'W' | 'M' | '1' | '3' | '5' | '10' | '15' | '30' | '60'; | ||
| period: number; | ||
| } | ||
| export interface RestStockTechnicalBbResponse { | ||
| symbol: string; | ||
| type: string; | ||
| exchange: string; | ||
| market: string; | ||
| timeframe: string; | ||
| data: Array<{ | ||
| date: string; | ||
| upper: number; | ||
| middle: number; | ||
| lower: number; | ||
| }>; | ||
| } | ||
| export declare const bb: (request: RestClientRequest, params: RestStockTechnicalBbParams) => Promise<RestStockTechnicalBbResponse>; |
| "use strict"; | ||
| var __rest = (this && this.__rest) || function (s, e) { | ||
| var t = {}; | ||
| for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
| t[p] = s[p]; | ||
| if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
| for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
| if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
| t[p[i]] = s[p[i]]; | ||
| } | ||
| return t; | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.bb = void 0; | ||
| const bb = (request, params) => { | ||
| const { symbol } = params, options = __rest(params, ["symbol"]); | ||
| return request(`technical/bb/${symbol}`, options); | ||
| }; | ||
| exports.bb = bb; |
| import { RestClientRequest } from '../../client'; | ||
| export interface RestStockTechnicalKdjParams { | ||
| symbol: string; | ||
| from?: string; | ||
| to?: string; | ||
| timeframe?: 'D' | 'W' | 'M' | '1' | '3' | '5' | '10' | '15' | '30' | '60'; | ||
| rPeriod: number; | ||
| kPeriod: number; | ||
| dPeriod: number; | ||
| } | ||
| export interface RestStockTechnicalKdjResponse { | ||
| symbol: string; | ||
| type: string; | ||
| exchange: string; | ||
| market: string; | ||
| timeframe: string; | ||
| data: Array<{ | ||
| date: string; | ||
| k: number; | ||
| d: number; | ||
| j: number; | ||
| }>; | ||
| } | ||
| export declare const kdj: (request: RestClientRequest, params: RestStockTechnicalKdjParams) => Promise<RestStockTechnicalKdjResponse>; |
| "use strict"; | ||
| var __rest = (this && this.__rest) || function (s, e) { | ||
| var t = {}; | ||
| for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
| t[p] = s[p]; | ||
| if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
| for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
| if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
| t[p[i]] = s[p[i]]; | ||
| } | ||
| return t; | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.kdj = void 0; | ||
| const kdj = (request, params) => { | ||
| const { symbol } = params, options = __rest(params, ["symbol"]); | ||
| return request(`technical/kdj/${symbol}`, options); | ||
| }; | ||
| exports.kdj = kdj; |
| import { RestClientRequest } from '../../client'; | ||
| export interface RestStockTechnicalMacdParams { | ||
| symbol: string; | ||
| from?: string; | ||
| to?: string; | ||
| timeframe?: 'D' | 'W' | 'M' | '1' | '3' | '5' | '10' | '15' | '30' | '60'; | ||
| fast: number; | ||
| slow: number; | ||
| signal: number; | ||
| } | ||
| export interface RestStockTechnicalMacdResponse { | ||
| symbol: string; | ||
| type: string; | ||
| exchange: string; | ||
| market: string; | ||
| timeframe: string; | ||
| data: Array<{ | ||
| date: string; | ||
| macdLine: number; | ||
| signalLine: number; | ||
| }>; | ||
| } | ||
| export declare const macd: (request: RestClientRequest, params: RestStockTechnicalMacdParams) => Promise<RestStockTechnicalMacdResponse>; |
| "use strict"; | ||
| var __rest = (this && this.__rest) || function (s, e) { | ||
| var t = {}; | ||
| for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
| t[p] = s[p]; | ||
| if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
| for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
| if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
| t[p[i]] = s[p[i]]; | ||
| } | ||
| return t; | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.macd = void 0; | ||
| const macd = (request, params) => { | ||
| const { symbol } = params, options = __rest(params, ["symbol"]); | ||
| return request(`technical/macd/${symbol}`, options); | ||
| }; | ||
| exports.macd = macd; |
| import { RestClientRequest } from '../../client'; | ||
| export interface RestStockTechnicalRsiParams { | ||
| symbol: string; | ||
| from?: string; | ||
| to?: string; | ||
| timeframe?: 'D' | 'W' | 'M' | '1' | '3' | '5' | '10' | '15' | '30' | '60'; | ||
| period: number; | ||
| } | ||
| export interface RestStockTechnicalRsiResponse { | ||
| symbol: string; | ||
| type: string; | ||
| exchange: string; | ||
| market: string; | ||
| timeframe: string; | ||
| data: Array<{ | ||
| date: string; | ||
| rsi: number; | ||
| }>; | ||
| } | ||
| export declare const rsi: (request: RestClientRequest, params: RestStockTechnicalRsiParams) => Promise<RestStockTechnicalRsiResponse>; |
| "use strict"; | ||
| var __rest = (this && this.__rest) || function (s, e) { | ||
| var t = {}; | ||
| for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
| t[p] = s[p]; | ||
| if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
| for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
| if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
| t[p[i]] = s[p[i]]; | ||
| } | ||
| return t; | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.rsi = void 0; | ||
| const rsi = (request, params) => { | ||
| const { symbol } = params, options = __rest(params, ["symbol"]); | ||
| return request(`technical/rsi/${symbol}`, options); | ||
| }; | ||
| exports.rsi = rsi; |
| import { RestClientRequest } from '../../client'; | ||
| export interface RestStockTechnicalSmaParams { | ||
| symbol: string; | ||
| from?: string; | ||
| to?: string; | ||
| timeframe?: 'D' | 'W' | 'M' | '1' | '3' | '5' | '10' | '15' | '30' | '60'; | ||
| period: number; | ||
| } | ||
| export interface RestStockTechnicalSmaResponse { | ||
| symbol: string; | ||
| type: string; | ||
| exchange: string; | ||
| market: string; | ||
| timeframe: string; | ||
| data: Array<{ | ||
| date: string; | ||
| sma: number; | ||
| }>; | ||
| } | ||
| export declare const sma: (request: RestClientRequest, params: RestStockTechnicalSmaParams) => Promise<RestStockTechnicalSmaResponse>; |
| "use strict"; | ||
| var __rest = (this && this.__rest) || function (s, e) { | ||
| var t = {}; | ||
| for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
| t[p] = s[p]; | ||
| if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
| for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
| if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
| t[p[i]] = s[p[i]]; | ||
| } | ||
| return t; | ||
| }; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.sma = void 0; | ||
| const sma = (request, params) => { | ||
| const { symbol } = params, options = __rest(params, ["symbol"]); | ||
| return request(`technical/sma/${symbol}`, options); | ||
| }; | ||
| exports.sma = sma; |
@@ -13,2 +13,7 @@ import { RestClient } from '../client'; | ||
| import { RestStockSnapshotActivesParams } from './snapshot/actives'; | ||
| import { RestStockTechnicalSmaParams } from './technical/sma'; | ||
| import { RestStockTechnicalRsiParams } from './technical/rsi'; | ||
| import { RestStockTechnicalKdjParams } from './technical/kdj'; | ||
| import { RestStockTechnicalMacdParams } from './technical/macd'; | ||
| import { RestStockTechnicalBbParams } from './technical/bb'; | ||
| export declare class RestStockClient extends RestClient { | ||
@@ -32,2 +37,9 @@ get intraday(): { | ||
| }; | ||
| get technical(): { | ||
| sma: (params: RestStockTechnicalSmaParams) => Promise<import("./technical/sma").RestStockTechnicalSmaResponse>; | ||
| rsi: (params: RestStockTechnicalRsiParams) => Promise<import("./technical/rsi").RestStockTechnicalRsiResponse>; | ||
| kdj: (params: RestStockTechnicalKdjParams) => Promise<import("./technical/kdj").RestStockTechnicalKdjResponse>; | ||
| macd: (params: RestStockTechnicalMacdParams) => Promise<import("./technical/macd").RestStockTechnicalMacdResponse>; | ||
| bb: (params: RestStockTechnicalBbParams) => Promise<import("./technical/bb").RestStockTechnicalBbResponse>; | ||
| }; | ||
| } |
@@ -16,2 +16,7 @@ "use strict"; | ||
| const actives_1 = require("./snapshot/actives"); | ||
| const sma_1 = require("./technical/sma"); | ||
| const rsi_1 = require("./technical/rsi"); | ||
| const kdj_1 = require("./technical/kdj"); | ||
| const macd_1 = require("./technical/macd"); | ||
| const bb_1 = require("./technical/bb"); | ||
| class RestStockClient extends client_1.RestClient { | ||
@@ -44,3 +49,13 @@ get intraday() { | ||
| } | ||
| get technical() { | ||
| const request = this.request; | ||
| return { | ||
| sma: (params) => (0, sma_1.sma)(request, params), | ||
| rsi: (params) => (0, rsi_1.rsi)(request, params), | ||
| kdj: (params) => (0, kdj_1.kdj)(request, params), | ||
| macd: (params) => (0, macd_1.macd)(request, params), | ||
| bb: (params) => (0, bb_1.bb)(request, params), | ||
| }; | ||
| } | ||
| } | ||
| exports.RestStockClient = RestStockClient; |
@@ -6,3 +6,5 @@ import { RestClientRequest } from '../../client'; | ||
| to?: string; | ||
| timeframe?: 'D' | 'W' | 'M' | '1' | '3' | '5' | '10' | '15' | '30' | '60'; | ||
| fields?: string; | ||
| sort?: 'asc' | 'desc'; | ||
| } | ||
@@ -14,2 +16,3 @@ export interface RestStockHistoricalCandlesResponse { | ||
| market: string; | ||
| timeframe: string; | ||
| data: Array<{ | ||
@@ -16,0 +19,0 @@ date: string; |
+1
-1
| { | ||
| "name": "@fugle/marketdata", | ||
| "version": "1.2.0", | ||
| "version": "1.3.0", | ||
| "description": "Fugle MarketData API client library for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
66449
15.27%79
14.49%1658
16.43%