Module: Bitfinex::RESTv2Wallet
- Included in:
- RESTv2
- Defined in:
- lib/rest/v2/wallet.rb
Instance Method Summary collapse
-
#create_deposit_address(wallet, method) ⇒ Array
Regenerate the deposit address for the given currency.
-
#deposit_address(wallet, method) ⇒ Array
Get the deposit address for the given currency.
-
#transfer(from, to, currency_from, currency_to, amount) ⇒ Array
Transfer between bitfinex wallets.
-
#wallets ⇒ Object
Get account wallets.
-
#withdraw(wallet, method, amount, address) ⇒ Array
Withdraw from the given bitfinex wallet to the given cryptocurrency address.
Instance Method Details
#create_deposit_address(wallet, method) ⇒ Array
Regenerate the deposit address for the given currency. All previous addresses are still active and can receive funds.
49 50 51 52 |
# File 'lib/rest/v2/wallet.rb', line 49 def create_deposit_address (wallet, method) payload = { :wallet => wallet, :method => method, :op_renew => 1 } authenticated_post("auth/w/deposit/address", params: payload).body end |
#deposit_address(wallet, method) ⇒ Array
Get the deposit address for the given currency
35 36 37 38 |
# File 'lib/rest/v2/wallet.rb', line 35 def deposit_address (wallet, method) payload = { :wallet => wallet, :method => method, :op_renew => 0 } authenticated_post("auth/w/deposit/address", params: payload).body end |
#transfer(from, to, currency_from, currency_to, amount) ⇒ Array
Transfer between bitfinex wallets
22 23 24 25 |
# File 'lib/rest/v2/wallet.rb', line 22 def transfer (from, to, currency_from, currency_to, amount) payload = { :from => from, :to => to, :currency => currency, :currency_to => currency_to, :amount => amount } authenticated_post("auth/w/transfer", params: payload).body end |
#wallets ⇒ Object
Get account wallets
@example:
client.wallets
7 8 9 |
# File 'lib/rest/v2/wallet.rb', line 7 def wallets authenticated_post("auth/r/wallets").body end |
#withdraw(wallet, method, amount, address) ⇒ Array
Withdraw from the given bitfinex wallet to the given cryptocurrency address
64 65 66 67 |
# File 'lib/rest/v2/wallet.rb', line 64 def withdraw (wallet, method, amount, address) payload = { :wallet => wallet, :method => method, :amount => amount, :address => address } authenticated_post("auth/w/withdraw", params: { :id => id }).body end |