module Bibox::Rest::Private::Transfers
Public Instance Methods
deposit_address(symbol = "BTC", options: {})
click to toggle source
# File lib/bibox/rest/private/transfers.rb, line 6 def deposit_address(symbol = "BTC", options: {}) payload = [ { cmd: "transfer/transferIn", body: {coin_symbol: symbol} } ] response = parse(post("/transfer", data: payload, options: options))&.fetch("result", [])&.first&.fetch("result", {}) end
deposits(page: 1, size: 10, filter_type: :all, search: nil, options: {})
click to toggle source
# File lib/bibox/rest/private/transfers.rb, line 17 def deposits(page: 1, size: 10, filter_type: :all, search: nil, options: {}) transfers(command: "transfer/transferInList", page: page, size: size, filter_type: filter_type, search: search, options: options) end
transfers(command:, page: 1, size: 10, filter_type: :all, search: nil, options: {})
click to toggle source
# File lib/bibox/rest/private/transfers.rb, line 25 def transfers(command:, page: 1, size: 10, filter_type: :all, search: nil, options: {}) params = { page: page, size: size, filter_type: ::Bibox::Models::Transfer::STATUSES[filter_type], search: search, } params.delete_if { |key, value| value.nil? } payload = [ { cmd: command, body: params } ] response = parse(post("/transfer", data: payload, options: options))&.fetch("result", [])&.first&.fetch("result", {})&.fetch("items", []) ::Bibox::Models::Transfer.parse(response) if response end
withdrawals(page: 1, size: 10, filter_type: :all, search: nil, options: {})
click to toggle source
# File lib/bibox/rest/private/transfers.rb, line 21 def withdrawals(page: 1, size: 10, filter_type: :all, search: nil, options: {}) transfers(command: "transfer/transferOutList", page: page, size: size, filter_type: filter_type, search: search, options: options) end