Module: KucoinRuby::Operations
- Defined in:
- lib/kucoin_ruby/operations.rb
Class Method Summary collapse
- .balance ⇒ Object
- .cancel_withdrawal(coin, txOid) ⇒ Object
- .coin_balance(coin) ⇒ Object
- .create_withdrawal(coin, amount, address) ⇒ Object
- .get_coin_address(coin) ⇒ Object
- .wallet_records(coin, type, status, limit = nil, page = nil) ⇒ Object
Class Method Details
.balance ⇒ Object
31 32 33 |
# File 'lib/kucoin_ruby/operations.rb', line 31 def self.balance KucoinRuby::Net.signed_get("/v1/account/balance") end |
.cancel_withdrawal(coin, txOid) ⇒ Object
14 15 16 17 18 |
# 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) ⇒ Object
27 28 29 |
# 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) ⇒ Object
8 9 10 11 12 |
# 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) ⇒ Object
3 4 5 6 |
# 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) ⇒ Object
20 21 22 23 24 25 |
# 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 |