Module: Bibox::Rest::Private::Assets
- Included in:
- Client
- Defined in:
- lib/bibox/rest/private/assets.rb
Instance Method Summary collapse
Instance Method Details
#assets(options: {}) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/bibox/rest/private/assets.rb', line 18 def assets(options: {}) payload = [ { cmd: "transfer/assets", body: {select: 1} } ] response = parse(post("/transfer", data: payload, options: ))&.fetch("result", [])&.first&.fetch("result", {}) ::Bibox::Models::UserAssets.new(response) if response end |
#coin_list(options: {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/bibox/rest/private/assets.rb', line 6 def coin_list(options: {}) payload = [ { cmd: "transfer/coinList", body: {} } ] response = parse(post("/transfer", data: payload, options: ))&.fetch("result", [])&.first&.fetch("result", []) ::Bibox::Models::Asset.parse(response) if response&.any? end |