module KucoinRuby::Operations

Public Class Methods

balance() click to toggle source
# File lib/kucoin_ruby/operations.rb, line 31
def self.balance
  KucoinRuby::Net.signed_get("/v1/account/balance")
end
cancel_withdrawal(coin, txOid) click to toggle source
# File lib/kucoin_ruby/operations.rb, line 14
def self.cancel_withdrawal(coin, txOid)
  endpoint = "/v1/account/#{coin}/withdraw/apply"
  payload = {coin: coin, txOid: txOid}
  KucoinRuby::Net.signed_post(endpoint, payload)
end
coin_balance(coin) click to toggle source
# File lib/kucoin_ruby/operations.rb, line 27
def self.coin_balance(coin)
  KucoinRuby::Net.signed_get("/v1/account/#{coin}/balance")
end
create_withdrawal(coin, amount, address) click to toggle source
# File lib/kucoin_ruby/operations.rb, line 8
def self.create_withdrawal(coin, amount, address)
  endpoint = "/v1/account/#{coin}/withdraw/apply"
  payload = {coin: coin, amount: amount, address: address}
  KucoinRuby::Net.signed_post(endpoint, payload)
end
get_coin_address(coin) click to toggle source
# File lib/kucoin_ruby/operations.rb, line 3
def self.get_coin_address(coin)
  endpoint = "/v1/account/#{coin}/wallet/address"
  KucoinRuby::Net.signed_get(endpoint)
end
wallet_records(coin, type, status, limit=nil, page=nil) click to toggle source
# File lib/kucoin_ruby/operations.rb, line 20
def self.wallet_records(coin, type, status, limit=nil, page=nil)
  #TODO
  endpoint = "/v1/account/#{coin}/wallet/records"
  query_string = {limit: limit, page: page, status: status, type: type}
  KucoinRuby::Net.signed_get(endpoint, query_string)
end