class Binance::Responses::ServerResponse
- Binance::Responses::ServerResponse
- Reference
- Object
Overview
The ServerResponse class is the base class returned for all endpoint calls
- If the endpoint call was successfully executed and parsed, then the success property will be true. Otherwise it will be false and error property will contain the error message.
- If the endpoint itself is returning an error, the error_code will also be populated.
- If an exception occurred (for example timeout error), then it's message is captured to the error property and the exception itself is captured to the exception property. In all cases, the raw response from the endpoint is captured to the response property.
Included Modules
- JSON::Serializable
Direct Known Subclasses
- Binance::Responses::AccountResponse
- Binance::Responses::AggTradesResponse
- Binance::Responses::AvgPriceResponse
- Binance::Responses::BookTickerResponse
- Binance::Responses::DepthResponse
- Binance::Responses::ExchangeInfoResponse
- Binance::Responses::KlinesResponse
- Binance::Responses::MyTradesResponse
- Binance::Responses::OrderResponse
- Binance::Responses::PingResponse
- Binance::Responses::PriceResponse
- Binance::Responses::TimeResponse
- Binance::Responses::TradesResponse
- Binance::Responses::TwentyFourHourResponse
- Binance::Responses::UserDataStreamResponse
Defined in:
binance/responses/server_response.crConstructors
Class Method Summary
Instance Method Summary
-
#body
The unparsed body of the HTTP response
- #consume_body(response)
-
#error_code : Int32?
The error code returned by the API endpoint (if any).
-
#error_code=(error_code : Int32?)
The error code returned by the API endpoint (if any).
-
#error_message : String?
The error message from either the API endpoint or Exception captured (if any).
-
#error_message=(error_message : String?)
The error message from either the API endpoint or Exception captured (if any).
-
#exception : Exception?
The exception captured (if any).
-
#exception=(exception : Exception?)
The exception captured (if any).
-
#response : HTTP::Client::Response?
The full HTTP Response object captured (if any).
-
#response=(response : HTTP::Client::Response?)
The full HTTP Response object captured (if any).
-
#success : Bool
TRUE if API endpoint successfully processed, FALSE otherwise
-
#success=(success : Bool)
TRUE if API endpoint successfully processed, FALSE otherwise
- #used_weight
Constructor Detail
Class Method Detail
Instance Method Detail
The error message from either the API endpoint or Exception captured (if any).
The error message from either the API endpoint or Exception captured (if any).
The full HTTP Response object captured (if any).