Module: Bitfinex::RESTv1Wallet
- Included in:
- RESTv1
- Defined in:
- lib/rest/v1/wallet.rb
Instance Method Summary collapse
-
#balances(params = {}) ⇒ Array
See your balances.
-
#key_info ⇒ Hash
Check the permissions of the key being used to generate this request.
-
#margin_infos ⇒ Array
See your trading wallet information for margin trading.
-
#summary ⇒ Hash
See a symmary of your trade volume, funding profits etc.
-
#transfer(amount, currency, wallet_from, wallet_to) ⇒ Array
Allow you to move available balances between your wallets.
-
#withdraw(withdraw_type, walletselected, amount, params = {}) ⇒ Array
Allow you to request a withdrawal from one of your wallet.
Instance Method Details
#balances(params = {}) ⇒ Array
See your balances.
@example:
client.balances
12 13 14 15 |
# File 'lib/rest/v1/wallet.rb', line 12 def balances(params = {}) check_params(params, %i{type currency amount available}) authenticated_post("balances", params: params).body end |
#key_info ⇒ Hash
Check the permissions of the key being used to generate this request
@example:
client.key_info
93 94 95 |
# File 'lib/rest/v1/wallet.rb', line 93 def key_info authenticated_post("key_info").body end |
#margin_infos ⇒ Array
See your trading wallet information for margin trading.
@example:
client.margin_infos
22 23 24 |
# File 'lib/rest/v1/wallet.rb', line 22 def margin_infos authenticated_post("margin_infos").body end |
#summary ⇒ Hash
See a symmary of your trade volume, funding profits etc.
@example:
client.summary
31 32 33 |
# File 'lib/rest/v1/wallet.rb', line 31 def summary authenticated_post("summary").body end |
#transfer(amount, currency, wallet_from, wallet_to) ⇒ Array
Allow you to move available balances between your wallets.
@example:
client.transfer(10, 'btc', "exchange", "deposit")
44 45 46 47 48 49 50 51 52 |
# File 'lib/rest/v1/wallet.rb', line 44 def transfer(amount, currency, wallet_from, wallet_to) params = { amount: amount.to_s, currency: currency.upcase, walletfrom: wallet_from.downcase, walletto: wallet_to.downcase } authenticated_post("transfer", params: params).body end |
#withdraw(withdraw_type, walletselected, amount, params = {}) ⇒ Array
Allow you to request a withdrawal from one of your wallet.
For Cryptocurrencies (including tether): For wire withdrawals @example:
client.withdraw("bitcoin","deposit",1000, address: "1DKwqRhDmVyHJDL4FUYpDmQMYA3Rsxtvur")
79 80 81 82 83 84 85 86 |
# File 'lib/rest/v1/wallet.rb', line 79 def withdraw(withdraw_type, walletselected, amount, params={}) params.merge!({ withdraw_type: withdraw_type, walletselected: walletselected.downcase, amount: amount.to_s}) authenticated_post("withdraw", params: params).body end |