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

polygonio-ruby

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

polygonio-ruby

  • 0.3.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Polygonio (Ruby)

Table of Contents

  • Background
  • Installation
  • Usage

Background

This is a client library for Polygon.io. Please see Polygon.io

Installation

Add this line to your application's Gemfile:

gem 'polygonio'

And then execute:

$ bundle install

Usage

Create an instance of the client:

All methods follow the documentation found [here]:https://polygon.io/docs pretty closely:

client = Polygonio::Rest::Client.new(api_key)

# See tests for a full reference of all of methods
client.reference.tickers.list

client.stocks.list_exchanges

client.forex.historic_ticks

client.crypto.list # list exchanges

Polygonio::Websocket::Client.new("crypto", api_key).subscribe("XQ.BTC-USD") do |event|
  pp "Incoming message"
  pp event
end

Using delayed websockets. If your account only supports delayed feeds you will need to use the delayed websocket endpoint

Polygonio::Websocket::Client.new("stocks", api_key, delayed: true).subscribe("AM.*,A.*,T.*") do |event|
  pp "Incoming message"
  pp event
end

FAQs

Package last updated on 11 Apr 2023

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