Class: Bitsor::Client
- Inherits:
-
Object
- Object
- Bitsor::Client
- Includes:
- Authorizable, AccountStatus, AvailableBooks, Balance, BitcoinWithdrawal, DebitCardWithdrawal, EtherWithdrawal, Fees, Funding, FundingDestination, KycDocuments, Ledger, MxBankCodes, OpenOrders, OrderBook, OrderTrades, Orders, PhoneNumber, PhoneNumberWithdrawal, PhoneVerification, SpeiWithdrawal, Ticker, Trades, UserTrades, Withdrawals, Configurable, Connection
- Defined in:
- lib/bitsor/client.rb,
lib/bitsor/client/fees.rb,
lib/bitsor/client/ledger.rb,
lib/bitsor/client/orders.rb,
lib/bitsor/client/ticker.rb,
lib/bitsor/client/trades.rb,
lib/bitsor/client/balance.rb,
lib/bitsor/client/funding.rb,
lib/bitsor/client/order_book.rb,
lib/bitsor/client/open_orders.rb,
lib/bitsor/client/user_trades.rb,
lib/bitsor/client/withdrawals.rb,
lib/bitsor/client/order_trades.rb,
lib/bitsor/client/phone_number.rb,
lib/bitsor/client/kyc_documents.rb,
lib/bitsor/client/mx_bank_codes.rb,
lib/bitsor/client/account_status.rb,
lib/bitsor/client/available_books.rb,
lib/bitsor/client/spei_withdrawal.rb,
lib/bitsor/client/ether_withdrawal.rb,
lib/bitsor/client/bitcoin_withdrawal.rb,
lib/bitsor/client/phone_verification.rb,
lib/bitsor/client/funding_destination.rb,
lib/bitsor/client/debit_card_withdrawal.rb,
lib/bitsor/client/phone_number_withdrawal.rb
Defined Under Namespace
Modules: AccountStatus, AvailableBooks, Balance, BitcoinWithdrawal, DebitCardWithdrawal, EtherWithdrawal, Fees, Funding, FundingDestination, KycDocuments, Ledger, MxBankCodes, OpenOrders, OrderBook, OrderTrades, Orders, PhoneNumber, PhoneNumberWithdrawal, PhoneVerification, SpeiWithdrawal, Ticker, Trades, UserTrades, Withdrawals
Instance Attribute Summary collapse
-
#api_key ⇒ Object
writeonly
Sets the attribute api_key.
-
#api_secret ⇒ Object
writeonly
Sets the attribute api_secret.
-
#client_id ⇒ Object
writeonly
Sets the attribute client_id.
Attributes included from Configurable
#api_key, #api_secret, #client_id
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #inspect ⇒ Object
- #normalize_response ⇒ Object
Methods included from Withdrawals
Methods included from UserTrades
Methods included from Trades
Methods included from Ticker
Methods included from SpeiWithdrawal
Methods included from PhoneVerification
Methods included from PhoneNumberWithdrawal
Methods included from PhoneNumber
Methods included from Orders
#cancel_order, #lookup_order, #place_order
Methods included from OrderTrades
Methods included from OrderBook
Methods included from OpenOrders
Methods included from MxBankCodes
Methods included from Ledger
#ledger, #ledger_fees, #ledger_fundings, #ledger_trades, #ledger_withdrawals
Methods included from KycDocuments
Methods included from FundingDestination
Methods included from Funding
Methods included from Fees
Methods included from EtherWithdrawal
Methods included from DebitCardWithdrawal
Methods included from BitcoinWithdrawal
Methods included from Balance
Methods included from AvailableBooks
Methods included from AccountStatus
Methods included from Authorizable
Methods included from Connection
#delete, #get, #last_response, #patch, #post, #put
Methods included from Configurable
#api_endpoint, #configure, keys, #reset!
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
71 72 73 74 75 |
# File 'lib/bitsor/client.rb', line 71 def initialize( = {}) Bitsor::Configurable.keys.each do |key| instance_variable_set(:"@#{key}", [key] || Bitsor.instance_variable_get(:"@#{key}")) end end |
Instance Attribute Details
#api_key=(value) ⇒ Object (writeonly)
Sets the attribute api_key
68 69 70 |
# File 'lib/bitsor/client.rb', line 68 def api_key=(value) @api_key = value end |
#api_secret=(value) ⇒ Object (writeonly)
Sets the attribute api_secret
69 70 71 |
# File 'lib/bitsor/client.rb', line 69 def api_secret=(value) @api_secret = value end |
#client_id=(value) ⇒ Object (writeonly)
Sets the attribute client_id
67 68 69 |
# File 'lib/bitsor/client.rb', line 67 def client_id=(value) @client_id = value end |
Instance Method Details
#inspect ⇒ Object
77 78 79 |
# File 'lib/bitsor/client.rb', line 77 def inspect "Bitsor::Client(client_id: ****#{@client_id[4..-1]} api_key: ******#{@api_key[6..-1]}, object_id: #{format('0x00%x', (object_id << 1))})" end |
#normalize_response ⇒ Object
81 82 83 |
# File 'lib/bitsor/client.rb', line 81 def normalize_response @normalizer ||= Normalizer.new end |