有红宝石宝石的问题

时间:2013-04-17 22:19:35

标签: ruby gem

因此,当尝试通过MtGox Ruby gem检索我的平衡时,会发生以下情况:

MtGox.configure do |config|
  config.key = "XXXXX"
  config.secret = "XXXXXXX"
end

puts MtGox.balance

该代码返回对象的内存位置:

#< MtGox::Balance:0xXXXXX >
#< MtGox::Balance:0xXXXXXX >

我该如何解决?

当我放MtGox.balance.to_s时:

[#< MtGox::Balance:0x00xxxxxxxx @currency="BTC", @amount=1>, #< MtGox::Balance:0xxxxxx @currency="USD", @amount=1>]

1 个答案:

答案 0 :(得分:1)

查看MtGox API Documentation

 MtGox.balance.amount

 MtGox.balance.currency