dblock / iex-ruby-client

IEX Finance API Ruby Client
MIT License
119 stars 60 forks source link

Migrate to new iex cloud apis #42

Closed bingxie closed 5 years ago

bingxie commented 5 years ago

Because

On June 1, 2019, IEX API will sunset all non-IEX data. IEX Cloud, a non-Exchange platform, will continue to provide access to third-party data sources. see here: https://iextrading.com/developer/

I made those change to migrate to the new IEX cloud APIs. Which includes:

  1. Use the new IEX cloud URL and token
  2. Change the crypto quote API
  3. Update several resources: dividends, earnings, key_stats
  4. Update all of the fixtures
  5. Update README
bingxie commented 5 years ago

Hello @dblock Thanks for you review. According to you feedback I have some questions:

  1. They will sunset the old api on June 1, 2019, so do I need to mention this on README?
  2. Where should I put those UPGRADING description?
  3. Should we bump the version to 1.0.0? IEX cloud sent me message they will have new version(version 1) next week.
  4. I looked the document again, they only mentioned to put the token as parameter.
dblock commented 5 years ago
  1. They will sunset the old api on June 1, 2019, so do I need to mention this on README?

Personally I had no idea they would, so maybe say something to that effect. NBD

  1. Where should I put those UPGRADING description?

https://github.com/dblock/iex-ruby-client/blob/master/UPGRADING.md

  1. Should we bump the version to 1.0.0? IEX cloud sent me message they will have new version(version 1) next week.

Yes, sounds good, you can do this as part of the PR.

  1. I looked the document again, they only mentioned to put the token as parameter.

Maybe we shouldn't call it "secret token", just "IEX_API_TOKEN"? Where did you get the secret part from?

dblock commented 5 years ago

I've finally found the time to read https://iexcloud.io/docs/api/#authentication ;)

It looks like the token that you're trying to supply here is a publishable token. So I would call this IEX_API_PUBLISHABLE_TOKEN. But secret tokens can also be used here if you're doing server-to-server communication. I think in ENV we should expect ENV['IEX_API_TOKEN'] to make these requests.

The API has some workflows that require a secret token, and we can defer implementing support for new APIs that take that for later. Once this is merged let's open ourselves some issues, including sandbox support and such.

investment-radar commented 5 years ago

@dblock I updated the token ENV name, and update to version 1 URI. Currently I am still working on the UPGRADING.md.

dblock commented 5 years ago

Looks good so far! Thanks for hanging in there.

dblock commented 5 years ago

Let's finish this @bingxie ? Need help?

bingxie commented 5 years ago

@dblock Updated the UPGRADING.md, can you have another look? Thanks.

dblock commented 5 years ago

Merged it, thank you.

Would you like help co-maintain the gem? If you do, shoot me an email to dblock at dblock dot org with your rubygems account. Maybe you can make the next release?

dblock commented 5 years ago

@bingxie Also please take a look at https://github.com/dblock/iex-ruby-client/pull/46, I am making the client configurable to enable #44, remove the need for an environment variable, etc.