Every exception extends STXException.
| Exception | Extends | When |
|---|---|---|
STXException |
Exception |
Base for every error the SDK raises. |
STXConfigException |
STXException |
The client is misconfigured: unknown region, missing key, bad PEM. |
STXAPIException |
STXException |
The API answered with an error status. Base for the classes below. |
STXValidationException |
STXAPIException |
400: a parameter or body field was rejected, e.g. price is required. |
STXAuthenticationException |
STXAPIException |
401: the signature, key id or timestamp was not accepted. |
STXForbiddenException |
STXAPIException |
403: the key is read-only, or the account may not do this. |
STXNotFoundException |
STXAPIException |
404: the resource does not exist, or belongs to another account. |
STXRejectedException |
STXAPIException |
422: the exchange refused the request, e.g. insufficient funds or a closed market. |
STXRateLimitException |
STXAPIException |
429: too many requests. retry_after is seconds, when sent. |
STXServerException |
STXAPIException |
5xx: the server failed. Retried by the default policy. |
STXTransportException |
STXException |
The request never got an answer: connection, DNS, TLS or timeout. |
STXChannelException |
STXException |
A channel join or channel message was refused by the server. |
STXException
Section titled “STXException”Base for every error the SDK raises.
STXConfigException
Section titled “STXConfigException”The client is misconfigured: unknown region, missing key, bad PEM.
STXAPIException
Section titled “STXAPIException”The API answered with an error status. Base for the classes below.
STXValidationException
Section titled “STXValidationException”400: a parameter or body field was rejected, e.g. price is required.
STXAuthenticationException
Section titled “STXAuthenticationException”401: the signature, key id or timestamp was not accepted.
A machine clock more than 30 seconds off also lands here.
STXForbiddenException
Section titled “STXForbiddenException”403: the key is read-only, or the account may not do this.
STXNotFoundException
Section titled “STXNotFoundException”404: the resource does not exist, or belongs to another account.
STXRejectedException
Section titled “STXRejectedException”422: the exchange refused the request, e.g. insufficient funds or a closed market.
STXRateLimitException
Section titled “STXRateLimitException”429: too many requests. retry_after is seconds, when sent.
STXServerException
Section titled “STXServerException”5xx: the server failed. Retried by the default policy.
STXTransportException
Section titled “STXTransportException”The request never got an answer: connection, DNS, TLS or timeout.
STXChannelException
Section titled “STXChannelException”A channel join or channel message was refused by the server.
reply holds the server’s response object, for example
{"reason": "unauthorized"}.

