Skip to content
This repository has been archived by the owner on May 20, 2022. It is now read-only.

Ticker method and market data methods are not correctly responding #1

Closed
JsonSam opened this issue Dec 5, 2014 · 6 comments
Closed

Comments

@JsonSam
Copy link

JsonSam commented Dec 5, 2014

I tried the public methods(Ticker, order book and market data methods) from my console. But I got correct response for only order book method. Other two methods does not respond properly.

2.1.3 :001 > Itbit::XBTUSDMarketData.ticker
TypeError: no implicit conversion of nil into String
from /home/user/.rvm/gems/ruby-2.1.3@service/gems/itbit-0.0.3/lib/itbit/api.rb:29:in digest' from /home/user/.rvm/gems/ruby-2.1.3@service/gems/itbit-0.0.3/lib/itbit/api.rb:29:insign_message'
from /home/user/.rvm/gems/ruby-2.1.3@service/gems/itbit-0.0.3/lib/itbit/api.rb:14:in `request'

2.1.3 :003 > Itbit::XBTUSDMarketData.transactions
NoMethodError: undefined method transactions' for Itbit::XBTUSDMarketData:Class from (irb):3 from /home/user/.rvm/gems/ruby-2.1.3@service/gems/railties-4.1.8/lib/rails/commands/console.rb:90:instart'
from /home/user/.rvm/gems/ruby-2.1.3@service/gems/railties-4.1.8/lib/rails/commands/console.rb:9:in `start'

But the order book method is working

2.1.3 :002 > Itbit::XBTUSDMarketData.orders
=> {:bids=>[[#BigDecimal:58f0bd8,'0.36782E3',18(18), #BigDecimal:58f0b88,'0.27176E1',18(18)], [#BigDecimal:58f0ac0,'0.3674525E3',18(18), #BigDecimal:58f0a48,'0.15E1',18(18)], [#BigDecimal:58f09a8,'0.36405E3',18(18), #BigDecimal:58f0908,'0.25E2',9(18)], [#BigDecimal:58f07c8,'0.363897E3',18(18), #BigDecimal:58f0750,'0.1E-1',9(18)], [#BigDecimal:58f0688,'0.36301E3',18(18), #BigDecimal:58f0638,'0.5E2',9(18)], [#BigDecimal:58f05c0,'0.35735E3',18(18), #

@nubis
Copy link
Contributor

nubis commented Dec 5, 2014

Just pushed version 0.0.4 fixing these issues. Do notice there is no transactions method, it was a problem with the documentation. The actual method is called 'trades'.

@pinklin
Copy link

pinklin commented Mar 11, 2015

undefined method `to_d' for nil:NilClass
Itbit::XBTUSDMarketData.ticker
The above error occurs for the ticker method. I use 0.0.4 version.

@nubis
Copy link
Contributor

nubis commented Mar 11, 2015

Hi pinklin, thanks for reporting this, we'll check it out as soon as
possible. It is possible that itbit rolled out some changes to their 'old'
api endpoints rendering them unavailable. The market data classes rely on
those endpoints as no new endpoints were available at the time.

cheers

On Wed, Mar 11, 2015 at 7:31 AM, pinklin notifications@github.com wrote:

undefined method `to_d' for nil:NilClass
Itbit::XBTUSDMarketData.ticker
The above error occurs for the ticker method. I use 0.0.4 version.


Reply to this email directly or view it on GitHub
#1 (comment).

@nubis
Copy link
Contributor

nubis commented Mar 12, 2015

Hi pinklin,

Could you confirm the issue persists? I could not reproduce it, it may have
been a temporary outage on itbit's side.

On Wed, Mar 11, 2015 at 8:34 PM, nubis bruno yo@nubis.im wrote:

Hi pinklin, thanks for reporting this, we'll check it out as soon as
possible. It is possible that itbit rolled out some changes to their 'old'
api endpoints rendering them unavailable. The market data classes rely on
those endpoints as no new endpoints were available at the time.

cheers

On Wed, Mar 11, 2015 at 7:31 AM, pinklin notifications@github.com wrote:

undefined method `to_d' for nil:NilClass
Itbit::XBTUSDMarketData.ticker
The above error occurs for the ticker method. I use 0.0.4 version.


Reply to this email directly or view it on GitHub
#1 (comment).

@pinklin
Copy link

pinklin commented Mar 13, 2015

Checked it again, the same error occurs for the method.

@nubis
Copy link
Contributor

nubis commented Mar 13, 2015

Still can't reproduce,
Perhaps you can try version 0.0.5 or clone the repo and try from source.

You could add a debugger or just log the raw response retrieved in
lib/itbit/api.rb line 20, before it gets parsed as JSON

If the error persists please provide a full traceback.

hope that helps.

On Fri, Mar 13, 2015 at 1:19 AM, pinklin notifications@github.com wrote:

Checked it again, the same error occurs for the method.


Reply to this email directly or view it on GitHub
#1 (comment).

@nubis nubis closed this as completed Apr 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants