module Bitfinex::Wallet
Public Instance Methods
available_currency(currency)
click to toggle source
Ratelimit: 30 req/min docs.bitfinex.com/reference#rest-auth-calc-order-avail
# File lib/bitfinex/api/wallet.rb, line 63 def available_currency(currency) res = request("auth/calc/order/avail", { symbol: currency, dir: 1, type: "FUNDING", }).body res = JSON.parse(res) return res[0].abs end
interest_history(currency, start_time, end_time)
click to toggle source
收入列表 Ratelimit: 15 req/min docs.bitfinex.com/v1/reference#rest-auth-balance-history
# File lib/bitfinex/api/wallet.rb, line 76 def interest_history(currency, start_time, end_time) res = v1_request("history", { currency: currency, # wallet: "deposit", # since: "1570272762.0", # until: "1572951124.0", # limit: 500, }) res = JSON.parse(res) return res end
ledgers(currency)
click to toggle source
45 req/min docs.bitfinex.com/reference#rest-auth-ledgers
# File lib/bitfinex/api/wallet.rb, line 44 def ledgers(currency) res = request("auth/r/ledgers/#{currency}/hist", { limit: 2500, # category: 28, }).body return JSON.parse(res) end
movements()
click to toggle source
Ratelimit: 45 req/min docs.bitfinex.com/reference#rest-auth-movements
# File lib/bitfinex/api/wallet.rb, line 30 def movements res = request("auth/r/movements/hist").body return JSON.parse(res) end
permissions()
click to toggle source
Ratelimit: 90 req/min docs.bitfinex.com/reference#key-permissions
# File lib/bitfinex/api/wallet.rb, line 12 def permissions res = request("auth/r/permissions").body return JSON.parse(res) end
user_info()
click to toggle source
Ratelimit: 90 req/min docs.bitfinex.com/reference#rest-auth-info-user
# File lib/bitfinex/api/wallet.rb, line 5 def user_info res = request("auth/r/info/user").body return JSON.parse(res) end
wallets()
click to toggle source
Ratelimit: 45 req/min docs.bitfinex.com/reference#rest-auth-wallets
# File lib/bitfinex/api/wallet.rb, line 37 def wallets res = request("auth/r/wallets").body return JSON.parse(res) end
wallets_history(currency)
click to toggle source
Ratelimit: 45 req/min docs.bitfinex.com/reference#rest-auth-wallets-hist
# File lib/bitfinex/api/wallet.rb, line 54 def wallets_history(currency) request("auth/r/wallets/hist", { currency: currency, end: (Time.now.to_f * 1000).floor, }).body end
withdraw(wallet, method, amount, address)
click to toggle source
docs.bitfinex.com/reference#rest-auth-withdraw
# File lib/bitfinex/api/wallet.rb, line 18 def withdraw(wallet, method, amount, address) res = request("auth/w/withdraw", { wallet: wallet,#'exchange', method: method,#'tetheruse', amount: amount,#'10', address: address#'0x2bf788d017C4DF927787DF2EB1310266d9db6893', }).body return JSON.parse(res) end