Class: Kucoin::Api::Endpoints::User::Accounts

Inherits:
Kucoin::Api::Endpoints::User show all
Defined in:
lib/kucoin/api/endpoints/user/accounts.rb

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#assert_param_is_one_of, #assert_required_param, #auth, #initialize, #open, #path, #url

Constructor Details

This class inherits a constructor from Kucoin::Api::Endpoints::Base

Instance Method Details

#create(currency, type) ⇒ Object



7
8
9
10
11
# File 'lib/kucoin/api/endpoints/user/accounts.rb', line 7

def create currency, type
  options = { currency: currency, type: type }
  assert_param_is_one_of options, :type, 
  auth.ku_request :post, :index, **options
end

#holds(account_id) ⇒ Object



33
34
35
# File 'lib/kucoin/api/endpoints/user/accounts.rb', line 33

def holds 
  auth.ku_request :get, :holds, account_id: 
end

#index(options = {}) ⇒ Object Also known as: all, list



13
14
15
# File 'lib/kucoin/api/endpoints/user/accounts.rb', line 13

def index options={}
  auth.ku_request :get, :index, **options
end

#inner_transfer(client_oid, pay_account_id, rec_account_id, amount) ⇒ Object



19
20
21
# File 'lib/kucoin/api/endpoints/user/accounts.rb', line 19

def inner_transfer client_oid, , , amount
  auth.ku_request :post, :inner_transfer, clientOid: client_oid, payAccountId: , recAccountId: , amount: amount
end

#ledgers(account_id, options = {}) ⇒ Object



29
30
31
# File 'lib/kucoin/api/endpoints/user/accounts.rb', line 29

def ledgers , options={}
  auth.ku_request :get, :ledgers, account_id: , **options
end

#show(account_id) ⇒ Object Also known as: get, detail



23
24
25
# File 'lib/kucoin/api/endpoints/user/accounts.rb', line 23

def show 
  auth.ku_request :get, :show, account_id: 
end