module Bitfinex::RESTv2Personal

Public Instance Methods

alert(price, symbol = "tBTCUSD", type = "price") click to toggle source

Set a new alert

@param price @param symbol @param type

@example:

client.alert(3000, "tBTCUSD")
# File lib/rest/v2/personal.rb, line 27
def alert(price, symbol = "tBTCUSD", type = "price")
  params = {
    type: type,
    price: price,
    symbol: symbol
  }
  authenticated_post("auth/w/alert/set", params: params).body
end
alerts(type = 'price') click to toggle source

Get the list of alerts

@example:

client.alerts
# File lib/rest/v2/personal.rb, line 15
def alerts(type = 'price')
  authenticated_post("auth/r/alerts", params: {type: type}).body
end
available_balance(rate, dir, type, symbol) click to toggle source

@example:

client.available_balance(800, 1, 'EXCHANGE', 'tBTCUSD')
# File lib/rest/v2/personal.rb, line 59
def available_balance(rate, dir, type, symbol)
  params = {
    symbol: symbol,
    dir: dir,
    type: type,
    rate: rate
  }
  authenticated_post("auth/calc/order/avail", params: params).body
end
delete_alert(price, symbol = "tBTCUSD") click to toggle source

Delete an existing alert

@param price @param symbol

@example:

client.delete_alert(3000, "tBTCUSD")
# File lib/rest/v2/personal.rb, line 43
def delete_alert(price, symbol = "tBTCUSD")
  authenticated_post("auth/w/alert/price:#{symbol}:#{price}/del").body
end
performance() click to toggle source

Get account historical daily performance

@example:

client.performance
# File lib/rest/v2/personal.rb, line 7
def performance
  authenticated_post("auth/r/stats/perf::1D/hist")
end