module Kucoin::Rest::Private::Balances
Public Instance Methods
balance(options: {})
click to toggle source
# File lib/kucoin/rest/private/balances.rb, line 25 def balance(options: {}) options.merge!(authenticate: true) response = get("/account/balance", options: options)&.fetch("data", {}) ::Kucoin::Models::Balance.parse(response) if response end
coin_balance(coin, options: {})
click to toggle source
# File lib/kucoin/rest/private/balances.rb, line 18 def coin_balance(coin, options: {}) options.merge!(authenticate: true) response = get("/account/#{coin}/balance", options: options)&.fetch("data", {}) ::Kucoin::Models::Balance.new(response) if response end
wallet_records(coin, type: :deposit, status: :finished, limit: nil, page: nil, options: {})
click to toggle source
# File lib/kucoin/rest/private/balances.rb, line 6 def wallet_records(coin, type: :deposit, status: :finished, limit: nil, page: nil, options: {}) options.merge!(authenticate: true) type = type.to_s.upcase status = status.to_s.upcase params = {type: type, status: status, limit: limit, page: page} params.delete_if { |key, value| value.nil? } get("/account/#{coin}/wallet/records", params: params, options: options)&.fetch("data", {}) end