Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added IEX::Resources::OHLC#get and IEX::Resources::OHLC#market #5

Merged
merged 1 commit into from
Jun 17, 2018

Conversation

jromanovs
Copy link
Collaborator

Add ability to gather stock OHLC prices as well for all market. Hope you will find those changes helpful.

jromanovs added a commit to jromanovs/iex-ruby-client that referenced this pull request Jun 12, 2018
Copy link
Owner

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Just cleanup CHANGELOG pls.

CHANGELOG.md Outdated

* Your contribution here.

### 0.3.3 (2018/06/12)

* [#5](https://github.com/dblock/iex-ruby-client/pull/5): Reticulated splines - [@jromanovs](https://github.com/jromanovs).
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol, that should probably not say Reticulated splines ;)

CHANGELOG.md Outdated
@@ -1,7 +1,13 @@
### 0.3.3 (Next)
### 0.3.4 (Next)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave the version alone, 0.3.3 has not been released and so your changes should just live under next.

CHANGELOG.md Outdated

* [#5](https://github.com/dblock/iex-ruby-client/pull/5): Reticulated splines - [@jromanovs](https://github.com/jromanovs).
* Added `IEX::Resources::OHLC#get` - [@jromanovs](https://github.com/jromanovs).
* Added `IEX::Resources::OHLC#market` - [@jromanovs](https://github.com/jromanovs).
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the PR number here like above.

README.md Outdated
@@ -43,6 +43,33 @@ quote.change_percent_s # '+0.42%'

See [#quote](https://iextrading.com/developer/docs/#quote) for detailed documentation or [quote.rb](lib/iex/resources/quote.rb) for returned fields.

### Get a OHLC price

Fetches a single stock OHLC price. Open and Close prices contain timestamp.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe explain what OHLC is?

response = IEX::Api::OHLC.market
response.each do |key, value|
response[key] = OHLC::Base.new(value)
end
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should probably create another hash instead of modifying the existing one, I am going to guess it's faster and cleaner, so:

response = Hash[IEX::Api::OHLC.market.map do |k, v|
   [k, OHLC::Base.new(v)]
end]

module IEX
module Resources
module OHLC
class PriceTimed < Resource
Copy link
Owner

@dblock dblock Jun 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like TimedPrice sounds better, unless it's a term from IEX.

@jromanovs
Copy link
Collaborator Author

Sorry, if it is a newbie questions. I was commit all requested changes. Does it required any more actions from my side? Or just wait when you have a chance to apply changes? Does it need to invest from myself some more time to extend functionality? I am curious, because found that market prices provided by IEX Group API is far from best or may be I miss something. Have a good day :)

@dblock dblock merged commit b98d4f3 into dblock:master Jun 17, 2018
@dblock
Copy link
Owner

dblock commented Jun 17, 2018

Sorry just seeing this, github doesn't notify on updates. Changes merged.

@dblock
Copy link
Owner

dblock commented Jun 17, 2018

@jromanovs Interested in helping out with this library? Maybe make the next release? If yes sign up on rubygems.org and lmk which email address you used.

@jromanovs jromanovs deleted the stock-market-ohlc branch June 21, 2018 05:14
@dblock
Copy link
Owner

dblock commented Jul 5, 2018

@jromanovs see question above on helping with releases? ^

@jromanovs
Copy link
Collaborator Author

Sorry, was busy with other projects. I was registered @ ruby gems.org as with email jromanovs@gmail.com. Hope that can be helpful on next week. I was already started another feature for bulk requests. I have a plans to make some commits on next week and then be happy to help with next release. How about such plan?

@dblock
Copy link
Owner

dblock commented Jul 6, 2018

Sounds great! Thanks. Added you to Rubygems and invited you to the project, https://github.com/dblock/iex-ruby-client/invitations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants