mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 15:11:03 +00:00
engine/exchanges: Add GetCurrencyTradeURL wrapper func/gRPC endpoint (#1521)
* beginning the concept * expands testing and implementations * test standardisation, expansion * more * finish remainder, add rpc func * lint * grammar? I barely know her! * wow i forgot something wow wow wow wow * rm SendPayload * enFixio! * improve binance long-dated support * update test design, update wrapper funcs * adds kraken futures, adds bybit support * fixes SIMPLE bugs * s is for sucks * fixed option url x2 * fixed silly test
This commit is contained in:
@@ -38,6 +38,8 @@ var (
|
||||
ErrRequestSystemIsNil = errors.New("request system is nil")
|
||||
// ErrAuthRequestFailed is a wrapping error to denote that it's an auth request that failed
|
||||
ErrAuthRequestFailed = errors.New("authenticated request failed")
|
||||
// ErrBadStatus is a wrapping error to denote that the HTTP status code was unsuccessful
|
||||
ErrBadStatus = errors.New("unsuccessful HTTP status code")
|
||||
|
||||
errRequestFunctionIsNil = errors.New("request function is nil")
|
||||
errRequestItemNil = errors.New("request item is nil")
|
||||
@@ -260,8 +262,9 @@ func (r *Requester) doRequest(ctx context.Context, endpoint EndpointLimit, newRe
|
||||
|
||||
if resp.StatusCode < http.StatusOK ||
|
||||
resp.StatusCode > http.StatusNoContent {
|
||||
return fmt.Errorf("%s unsuccessful HTTP status code: %d raw response: %s",
|
||||
return fmt.Errorf("%s %w: %d raw response: %s",
|
||||
r.name,
|
||||
ErrBadStatus,
|
||||
resp.StatusCode,
|
||||
string(contents))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user