Class: BinanceClient::BaseResponse
- Inherits:
-
Object
- Object
- BinanceClient::BaseResponse
show all
- Defined in:
- lib/binance_client/responses/base_response.rb
Direct Known Subclasses
AccountResponse, AccountSnapshotResponse, AllOrdersResponse, BaseCreateOrderResponse, BookTickerResponse, CoinsInfoResponse, CreateSubAccountResponse, ExchangeInfoResponse, OrderBookDepthResponse, PingResponse, SubAccountAssetsResponse, SubAccountBnbBurnStatusResponse, SubAccountCreateApiKeysResponse, SubAccountDepositAddressResponse, SubAccountDepositHistoryResponse, SubAccountSetSpotBnbBurnResponse, SubAccountTransferHistoryResponse, SubAccountTransferResponse, SubAccountsResponse, SystemStatusResponse, WithdrawResponse
Instance Method Summary
collapse
Instance Method Details
#body_code ⇒ Object
20
21
22
23
24
|
# File 'lib/binance_client/responses/base_response.rb', line 20
def body_code
val = body["code"]
return nil if val.nil?
val.to_i
end
|
#default_message ⇒ Object
16
17
18
|
# File 'lib/binance_client/responses/base_response.rb', line 16
def default_message
body["message"].presence || body["msg"]
end
|
#used_weights ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/binance_client/responses/base_response.rb', line 8
def used_weights
@used_weights ||= .each_with_object({}) do |(key, value), hash|
next if not key.include?("USED")
next if not key.include?("WEIGHT")
hash[key] = value
end
end
|