module Gemini::V2::PersonalClient

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/gemini/v2/personal.rb, line 36
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/gemini/v2/personal.rb, line 24
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/gemini/v2/personal.rb, line 69
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/gemini/v2/personal.rb, line 52
def delete_alert(price, symbol = "tBTCUSD")
  authenticated_post("auth/w/alert/price:#{symbol}:#{price}/del").body
end
listen_account(&block) click to toggle source

Listen to authenticated channel

Documentation:

https://docs.gemini.com/v2/reference#account-info

example:

client.listen_account do |account|
  puts account
end
# File lib/gemini/v2/personal.rb, line 88
def listen_account(&block)
  raise BlockMissingError unless block_given?
  ws_auth(&block)
end
performance() click to toggle source

Get account historical daily performance

@example:

client.performance
# File lib/gemini/v2/personal.rb, line 16
def performance
  authenticated_post("auth/r/stats/perf:1D/hist")
end
wallets() click to toggle source

Get account wallets

@example:

client.wallets
# File lib/gemini/v2/personal.rb, line 8
def wallets
  authenticated_post("auth/r/wallets").body
end