Module: Bitbot::Trader::ApiMethods

Included in:
Provider
Defined in:
lib/bitbot/trader/api_methods.rb

Overview

API methods that can be used with every provider

Instance Method Summary collapse

Instance Method Details

#accountAccount

Fetches user’s account info

Examples:

provider. #=> <Account>

Returns:



28
29
30
# File 'lib/bitbot/trader/api_methods.rb', line 28

def 
  self.class::AccountInfoRequest.new(client).call
end

#open_ordersArray<OpenOrder>

Fetches user’s current open orders

Examples:

provider.open_orders #=> [<OpenOrder>, <OpenOrder>]

Returns:



15
16
17
# File 'lib/bitbot/trader/api_methods.rb', line 15

def open_orders
  self.class::OpenOrdersRequest.new(client).call
end