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

@polygon.io/models

Package Overview
Dependencies
Maintainers
7
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polygon.io/models - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

dist/resources/ResourceClient/index.js

@@ -1,1 +0,1 @@

"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),_objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")),_slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")),_excluded=["ticker","multiplier","timespan","from","to"],_excluded2=["ticker"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){(0,_defineProperty2["default"])(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}var _default=function(a){var b=a.get,c=a.withParams,d=function(a){return Object.entries(a).reduce(function(a,b,c){var d=(0,_slicedToArray2["default"])(b,2),e=d[0],f=d[1];return"".concat(a).concat(0===c?"?":"&").concat(e,"=").concat(f)},"")};return{getAggregates:function getAggregates(a){return c(a,function(a){var c=a.ticker,e=a.multiplier,f=a.timespan,g=a.from,h=a.to,i=(0,_objectWithoutProperties2["default"])(a,_excluded);return b("/v2/aggs/ticker/".concat(c,"/range/").concat(e,"/").concat(f,"/").concat(g,"/").concat(h).concat(d(_objectSpread({},i))))})},getStockExchanges:function getStockExchanges(){return b("/v1/meta/exchanges")},getGainerLosers:function getGainerLosers(a){return c(a,function(a){var c=a.type,d=a.direction;return b("/v2/snapshot/locale/".concat("stocks"===c?"us":"global","/markets/").concat(c,"/").concat(d))})},getLastPrice:function getLastPrice(a){return c(a,function(a){var c=a.ticker,d=a.market,e=a.from,f=a.to;switch(d){case"stocks":return b("/v2/last/trade/".concat(c));case"fx":return b("/v1/last_quote/currencies/".concat(e,"/").concat(f));case"crypto":return b("/v1/last/crypto/".concat(e,"/").concat(f));default:throw new Error("no type parameter found for Last Currency Price");}})},getSnapshotTicker:function getSnapshotTicker(a){return c(a,function(a){var c=a.type;return b("/v2/snapshot/locale/".concat("stocks"===c?"us":"global","/markets/").concat(c,"/tickers"))})},getTickerList:function getTickerList(a){return c(a,function(a){var c=(0,_extends2["default"])({},a);return b("/v3/reference/tickers".concat(d(_objectSpread({},c))))})},getTickerTypes:function getTickerTypes(){return b("/v2/reference/types")},getTickerDetails:function getTickerDetails(a){return c(a,function(a){var c=a.ticker,e=(0,_objectWithoutProperties2["default"])(a,_excluded2);return b("/v3/reference/tickers/".concat(c).concat(d(_objectSpread({},e))))})},getNews:function getNews(a){return c(a,function(a){var c=(0,_extends2["default"])({},a);return b("/v2/reference/news".concat(d(_objectSpread({},c))))})},getMarketStatus:function getMarketStatus(){return b("/v1/marketstatus/now")}}};exports["default"]=_default;
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends")),_defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty")),_objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")),_slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")),_excluded=["ticker","multiplier","timespan","from","to"],_excluded2=["ticker"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){(0,_defineProperty2["default"])(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}var _default=function(a){var b=a.get,c=a.withParams,d=function(a){return Object.entries(a).reduce(function(a,b,c){var d=(0,_slicedToArray2["default"])(b,2),e=d[0],f=d[1];return"".concat(a).concat(0===c?"?":"&").concat(e,"=").concat(f)},"")};return{getAggregates:function getAggregates(a){return c(a,function(a){var c=a.ticker,e=a.multiplier,f=a.timespan,g=a.from,h=a.to,i=(0,_objectWithoutProperties2["default"])(a,_excluded);return b("/v2/aggs/ticker/".concat(c,"/range/").concat(e,"/").concat(f,"/").concat(g,"/").concat(h).concat(d(_objectSpread({},i))))})},getStockExchanges:function getStockExchanges(){return b("/v1/meta/exchanges")},getGainerLosers:function getGainerLosers(a){return c(a,function(a){var c=a.type,d=a.direction;return b("/v2/snapshot/locale/".concat("stocks"===c?"us":"global","/markets/").concat(c,"/").concat(d))})},getLastPrice:function getLastPrice(a){return c(a,function(a){var c=a.ticker,d=a.market,e=a.from,f=a.to;switch(d){case"stocks":case"otc":return b("/v2/last/trade/".concat(c));case"fx":return b("/v1/last_quote/currencies/".concat(e,"/").concat(f));case"crypto":return b("/v1/last/crypto/".concat(e,"/").concat(f));default:throw new Error("no type parameter found for Last Currency Price");}})},getSnapshotTicker:function getSnapshotTicker(a){return c(a,function(a){var c=a.type;return b("/v2/snapshot/locale/".concat("stocks"===c?"us":"global","/markets/").concat(c,"/tickers"))})},getTickerList:function getTickerList(a){return c(a,function(a){var c=(0,_extends2["default"])({},a);return b("/v3/reference/tickers".concat(d(_objectSpread({},c))))})},getTickerTypes:function getTickerTypes(){return b("/v2/reference/types")},getTickerDetails:function getTickerDetails(a){return c(a,function(a){var c=a.ticker,e=(0,_objectWithoutProperties2["default"])(a,_excluded2);return b("/v3/reference/tickers/".concat(c).concat(d(_objectSpread({},e))))})},getNews:function getNews(a){return c(a,function(a){var c=(0,_extends2["default"])({},a);return b("/v2/reference/news".concat(d(_objectSpread({},c))))})},getMarketStatus:function getMarketStatus(){return b("/v1/marketstatus/now")}}};exports["default"]=_default;
{
"name": "@polygon.io/models",
"version": "1.0.0",
"version": "1.0.1",
"description": "A set function and providers for interacting with Polygon.io's financial market data.",

@@ -36,3 +36,3 @@ "files": [

},
"gitHead": "649f5f0c8d9fa98dbb5929439b5cc25f9c36e99a"
"gitHead": "f08764c289060c5396cdceadd2af163026ce27a3"
}
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