Module: OandaAPI

Defined in:
lib/oanda_api/errors.rb,
lib/oanda_api/version.rb,
lib/oanda_api/utils/utils.rb,
lib/oanda_api/configuration.rb,
lib/oanda_api/resource_base.rb,
lib/oanda_api/client/client.rb,
lib/oanda_api/resource/trade.rb,
lib/oanda_api/resource/order.rb,
lib/oanda_api/resource/price.rb,
lib/oanda_api/resource/candle.rb,
lib/oanda_api/streaming/client.rb,
lib/oanda_api/resource/account.rb,
lib/oanda_api/resource/position.rb,
lib/oanda_api/streaming/request.rb,
lib/oanda_api/resource/heartbeat.rb,
lib/oanda_api/resource/instrument.rb,
lib/oanda_api/resource_collection.rb,
lib/oanda_api/client/token_client.rb,
lib/oanda_api/resource/transaction.rb,
lib/oanda_api/client/namespace_proxy.rb,
lib/oanda_api/client/username_client.rb,
lib/oanda_api/client/resource_descriptor.rb,
lib/oanda_api/resource/transaction_history.rb

Defined Under Namespace

Modules: Client, Resource, Streaming, Utils Classes: Configuration, RequestError, ResourceBase, ResourceCollection, StreamingDisconnect

Constant Summary collapse

VERSION =
"0.9.0"
DATETIME_FORMATS =
[:rfc3339, :unix]
DOMAINS =

List of valid subdomains clients can access.

[:live, :practice, :sandbox]

Class Method Summary collapse

Class Method Details

.configurationConfiguration


164
165
166
# File 'lib/oanda_api/configuration.rb', line 164

def self.configuration
  @configuration ||= Configuration.new
end

.configure {|Configuration| ... } ⇒ void

This method returns an undefined value.

Use to configure application-wide settings.

Examples:

Example Usage

OandaAPI.configure |config|
  config.use_compression = true
  config.use_request_throttling = true
end

Yields:


158
159
160
# File 'lib/oanda_api/configuration.rb', line 158

def self.configure
  yield configuration
end