Class: Coinbase::Exchange::NetHTTPClient

Inherits:
APIClient
  • Object
show all
Defined in:
lib/coinbase/exchange/adapters/net_http.rb

Overview

Net-HTTP adapter

Direct Known Subclasses

Client

Instance Method Summary collapse

Methods inherited from APIClient

#account, #account_history, #account_holds, #accounts, #ask, #bid, #cancel, #currencies, #daily_stats, #deposit, #fills, #last_trade, #order, #orderbook, #orders, #price_history, #products, #server_epoch, #trade_history, #withdraw

Constructor Details

#initialize(api_key = '', api_secret = '', api_pass = '', options = {}) ⇒ NetHTTPClient

Returns a new instance of NetHTTPClient.



5
6
7
8
9
10
11
# File 'lib/coinbase/exchange/adapters/net_http.rb', line 5

def initialize(api_key = '', api_secret = '', api_pass = '', options = {})
  super(api_key, api_secret, api_pass, options)
  @conn = Net::HTTP.new(@api_uri.host, @api_uri.port)
  @conn.use_ssl = true if @api_uri.scheme == 'https'
  @conn.cert_store = self.class.whitelisted_certificates
  @conn.ssl_version = :TLSv1
end