1

因此,当尝试通过 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>]
4

1 回答 1

1

查看MtGox API 文档

尝试

 MtGox.balance.amount

 MtGox.balance.currency
于 2013-04-17T22:22:30.260 回答