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

Rates API endpoint, rates key with values bid/offer/both #11

Closed
HLFH opened this issue Mar 24, 2017 · 1 comment
Closed

Rates API endpoint, rates key with values bid/offer/both #11

HLFH opened this issue Mar 24, 2017 · 1 comment

Comments

@HLFH
Copy link

HLFH commented Mar 24, 2017

Hi,

I would like the option to only ask for bid rates, only ask for offer rates, or both.

https://github.com/CurrencyCloud/currencycloud-ruby/blob/master/lib/currency_cloud/rate.rb

Here, without the offer rates, it becomes:

module CurrencyCloud
  class Rate
    include CurrencyCloud::Resource

    resource :rates

    def self.find(params)
      response = client.get("find", params)

      rates = response["rates"].map do |currency_pair, (bid)|
        new(currency_pair: currency_pair, bid: bid)
      end

      Rates.new(currencies: rates, unavailable: response["unavailable"])
    end

    def self.detailed(params)
      new(client.get("detailed", params))
    end
  end
end

In fact, in my case, I only need bid rates. Do you plan to have a key on your rates/find API endpoint, called rates with type string and values bid, offer or both?

And btw, do you plan to implement GraphQL for the V3 of your API?

Thank you,

@HLFH HLFH changed the title Rate API endpoint Rates API endpoint, rates key with values bid/offer/both Mar 24, 2017
@EAddario
Copy link
Contributor

We may introduce this in a future release

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

No branches or pull requests

2 participants