module OandaApiV20::Accounts
Public Instance Methods
account(id)
click to toggle source
GET /v3/accounts/:account_id
# File lib/oanda_api_v20/accounts.rb, line 5 def account(id) Client.send(http_verb, "#{base_uri}/accounts/#{id}", headers: headers) end
accounts()
click to toggle source
GET /v3/accounts
# File lib/oanda_api_v20/accounts.rb, line 10 def accounts Client.send(http_verb, "#{base_uri}/accounts", headers: headers) end
changes(options = {})
click to toggle source
GET /v3/accounts/:account_id/changes
# File lib/oanda_api_v20/accounts.rb, line 27 def changes(options = {}) options = { 'sinceTransactionID' => nil } unless options['sinceTransactionID'] Client.send(http_verb, "#{base_uri}/accounts/#{account_id}/changes", headers: headers, query: options) end
configuration(options = {})
click to toggle source
PATCH /v3/accounts/:account_id/configuration
# File lib/oanda_api_v20/accounts.rb, line 33 def configuration(options = {}) Client.send(http_verb, "#{base_uri}/accounts/#{account_id}/configuration", headers: headers, body: options.to_json) end
instruments(instruments = nil)
click to toggle source
GET /v3/accounts/:account_id/instruments
# File lib/oanda_api_v20/accounts.rb, line 20 def instruments(instruments = nil) arguments = { headers: headers } arguments.merge!(query: { instruments: instruments }) if instruments Client.send(http_verb, "#{base_uri}/accounts/#{account_id}/instruments", arguments) end
summary()
click to toggle source
GET /v3/accounts/:account_id/summary
# File lib/oanda_api_v20/accounts.rb, line 15 def summary Client.send(http_verb, "#{base_uri}/accounts/#{account_id}/summary", headers: headers) end