ccxt-go/exchange_errors.go

247 lines
8.5 KiB
Go
Raw Normal View History

2025-02-28 10:33:20 +08:00
package ccxt
// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
func ExchangeError(v ...interface{}) error {
return NewError("ExchangeError", v...)
}
func AuthenticationError(v ...interface{}) error {
return NewError("AuthenticationError", v...)
}
func PermissionDenied(v ...interface{}) error {
return NewError("PermissionDenied", v...)
}
func AccountNotEnabled(v ...interface{}) error {
return NewError("AccountNotEnabled", v...)
}
func AccountSuspended(v ...interface{}) error {
return NewError("AccountSuspended", v...)
}
func ArgumentsRequired(v ...interface{}) error {
return NewError("ArgumentsRequired", v...)
}
func BadRequest(v ...interface{}) error {
return NewError("BadRequest", v...)
}
func BadSymbol(v ...interface{}) error {
return NewError("BadSymbol", v...)
}
func OperationRejected(v ...interface{}) error {
return NewError("OperationRejected", v...)
}
func NoChange(v ...interface{}) error {
return NewError("NoChange", v...)
}
func MarginModeAlreadySet(v ...interface{}) error {
return NewError("MarginModeAlreadySet", v...)
}
func MarketClosed(v ...interface{}) error {
return NewError("MarketClosed", v...)
}
func ManualInteractionNeeded(v ...interface{}) error {
return NewError("ManualInteractionNeeded", v...)
}
func InsufficientFunds(v ...interface{}) error {
return NewError("InsufficientFunds", v...)
}
func InvalidAddress(v ...interface{}) error {
return NewError("InvalidAddress", v...)
}
func AddressPending(v ...interface{}) error {
return NewError("AddressPending", v...)
}
func InvalidOrder(v ...interface{}) error {
return NewError("InvalidOrder", v...)
}
func OrderNotFound(v ...interface{}) error {
return NewError("OrderNotFound", v...)
}
func OrderNotCached(v ...interface{}) error {
return NewError("OrderNotCached", v...)
}
func OrderImmediatelyFillable(v ...interface{}) error {
return NewError("OrderImmediatelyFillable", v...)
}
func OrderNotFillable(v ...interface{}) error {
return NewError("OrderNotFillable", v...)
}
func DuplicateOrderId(v ...interface{}) error {
return NewError("DuplicateOrderId", v...)
}
func ContractUnavailable(v ...interface{}) error {
return NewError("ContractUnavailable", v...)
}
func NotSupported(v ...interface{}) error {
return NewError("NotSupported", v...)
}
func InvalidProxySettings(v ...interface{}) error {
return NewError("InvalidProxySettings", v...)
}
func ExchangeClosedByUser(v ...interface{}) error {
return NewError("ExchangeClosedByUser", v...)
}
func OperationFailed(v ...interface{}) error {
return NewError("OperationFailed", v...)
}
func NetworkError(v ...interface{}) error {
return NewError("NetworkError", v...)
}
func DDoSProtection(v ...interface{}) error {
return NewError("DDoSProtection", v...)
}
func RateLimitExceeded(v ...interface{}) error {
return NewError("RateLimitExceeded", v...)
}
func ExchangeNotAvailable(v ...interface{}) error {
return NewError("ExchangeNotAvailable", v...)
}
func OnMaintenance(v ...interface{}) error {
return NewError("OnMaintenance", v...)
}
func InvalidNonce(v ...interface{}) error {
return NewError("InvalidNonce", v...)
}
func ChecksumError(v ...interface{}) error {
return NewError("ChecksumError", v...)
}
func RequestTimeout(v ...interface{}) error {
return NewError("RequestTimeout", v...)
}
func BadResponse(v ...interface{}) error {
return NewError("BadResponse", v...)
}
func NullResponse(v ...interface{}) error {
return NewError("NullResponse", v...)
}
func CancelPending(v ...interface{}) error {
return NewError("CancelPending", v...)
}
func UnsubscribeError(v ...interface{}) error {
return NewError("UnsubscribeError", v...)
}
func CreateError(err string, v ...interface{}) error {
switch err {
case "ExchangeError":
return ExchangeError(v...)
case "AuthenticationError":
return AuthenticationError(v...)
case "PermissionDenied":
return PermissionDenied(v...)
case "AccountNotEnabled":
return AccountNotEnabled(v...)
case "AccountSuspended":
return AccountSuspended(v...)
case "ArgumentsRequired":
return ArgumentsRequired(v...)
case "BadRequest":
return BadRequest(v...)
case "BadSymbol":
return BadSymbol(v...)
case "OperationRejected":
return OperationRejected(v...)
case "NoChange":
return NoChange(v...)
case "MarginModeAlreadySet":
return MarginModeAlreadySet(v...)
case "MarketClosed":
return MarketClosed(v...)
case "ManualInteractionNeeded":
return ManualInteractionNeeded(v...)
case "InsufficientFunds":
return InsufficientFunds(v...)
case "InvalidAddress":
return InvalidAddress(v...)
case "AddressPending":
return AddressPending(v...)
case "InvalidOrder":
return InvalidOrder(v...)
case "OrderNotFound":
return OrderNotFound(v...)
case "OrderNotCached":
return OrderNotCached(v...)
case "OrderImmediatelyFillable":
return OrderImmediatelyFillable(v...)
case "OrderNotFillable":
return OrderNotFillable(v...)
case "DuplicateOrderId":
return DuplicateOrderId(v...)
case "ContractUnavailable":
return ContractUnavailable(v...)
case "NotSupported":
return NotSupported(v...)
case "InvalidProxySettings":
return InvalidProxySettings(v...)
case "ExchangeClosedByUser":
return ExchangeClosedByUser(v...)
case "OperationFailed":
return OperationFailed(v...)
case "NetworkError":
return NetworkError(v...)
case "DDoSProtection":
return DDoSProtection(v...)
case "RateLimitExceeded":
return RateLimitExceeded(v...)
case "ExchangeNotAvailable":
return ExchangeNotAvailable(v...)
case "OnMaintenance":
return OnMaintenance(v...)
case "InvalidNonce":
return InvalidNonce(v...)
case "ChecksumError":
return ChecksumError(v...)
case "RequestTimeout":
return RequestTimeout(v...)
case "BadResponse":
return BadResponse(v...)
case "NullResponse":
return NullResponse(v...)
case "CancelPending":
return CancelPending(v...)
case "UnsubscribeError":
return UnsubscribeError(v...)
default:
return NewError(err, v...)
}
}
const (
ExchangeErrorErrType ErrorType = "ExchangeError"
AuthenticationErrorErrType ErrorType = "AuthenticationError"
PermissionDeniedErrType ErrorType = "PermissionDenied"
AccountNotEnabledErrType ErrorType = "AccountNotEnabled"
AccountSuspendedErrType ErrorType = "AccountSuspended"
ArgumentsRequiredErrType ErrorType = "ArgumentsRequired"
BadRequestErrType ErrorType = "BadRequest"
BadSymbolErrType ErrorType = "BadSymbol"
OperationRejectedErrType ErrorType = "OperationRejected"
NoChangeErrType ErrorType = "NoChange"
MarginModeAlreadySetErrType ErrorType = "MarginModeAlreadySet"
MarketClosedErrType ErrorType = "MarketClosed"
ManualInteractionNeededErrType ErrorType = "ManualInteractionNeeded"
InsufficientFundsErrType ErrorType = "InsufficientFunds"
InvalidAddressErrType ErrorType = "InvalidAddress"
AddressPendingErrType ErrorType = "AddressPending"
InvalidOrderErrType ErrorType = "InvalidOrder"
OrderNotFoundErrType ErrorType = "OrderNotFound"
OrderNotCachedErrType ErrorType = "OrderNotCached"
OrderImmediatelyFillableErrType ErrorType = "OrderImmediatelyFillable"
OrderNotFillableErrType ErrorType = "OrderNotFillable"
DuplicateOrderIdErrType ErrorType = "DuplicateOrderId"
ContractUnavailableErrType ErrorType = "ContractUnavailable"
NotSupportedErrType ErrorType = "NotSupported"
InvalidProxySettingsErrType ErrorType = "InvalidProxySettings"
ExchangeClosedByUserErrType ErrorType = "ExchangeClosedByUser"
OperationFailedErrType ErrorType = "OperationFailed"
NetworkErrorErrType ErrorType = "NetworkError"
DDoSProtectionErrType ErrorType = "DDoSProtection"
RateLimitExceededErrType ErrorType = "RateLimitExceeded"
ExchangeNotAvailableErrType ErrorType = "ExchangeNotAvailable"
OnMaintenanceErrType ErrorType = "OnMaintenance"
InvalidNonceErrType ErrorType = "InvalidNonce"
ChecksumErrorErrType ErrorType = "ChecksumError"
RequestTimeoutErrType ErrorType = "RequestTimeout"
BadResponseErrType ErrorType = "BadResponse"
NullResponseErrType ErrorType = "NullResponse"
CancelPendingErrType ErrorType = "CancelPending"
UnsubscribeErrorErrType ErrorType = "UnsubscribeError"
)