Page and retry policies
A Sequence of models plus the cursor for the next page.
Attributes
Section titled “Attributes”| Attribute | Type | Description |
|---|---|---|
has_more |
bool |
True when another page exists. |
BatchOrderResult
Section titled “BatchOrderResult”One entry of place_orders: the order, or why it was not placed.
Results come back in the order the orders were sent. Exactly one of
order and errors is set.
Attributes
Section titled “Attributes”| Attribute | Type | Description |
|---|---|---|
order |
Optional[Order] |
|
errors |
Optional[List[str]] |
|
ok |
bool |
True when the order was placed. |
RetryPolicy
Section titled “RetryPolicy”How many times to try a call, and how long to wait between tries.
The default is 3 attempts, 0.5 s initial backoff doubling to a 30 s cap,
with jitter. RetryPolicy(max_attempts=1) (or stx.NO_RETRY) turns
retries off.
Attributes
Section titled “Attributes”| Attribute | Type | Description |
|---|---|---|
max_attempts |
int |
|
initial_backoff |
float |
|
max_backoff |
float |
|
jitter |
bool |
|
retryable_exceptions |
Tuple[Type[STXException], ...] |
Methods
Section titled “Methods”compute_backoff()
Section titled “compute_backoff()”compute_backoff(attempt: int, exc: STXException) -> floatSeconds to wait after attempt attempt (1-based) failed.
| Parameter | Type | Description |
|---|---|---|
attempt |
int |
|
exc |
STXException |
should_retry()
Section titled “should_retry()”should_retry(exc: STXException, attempt: int, idempotent: bool) -> boolWhether to try again after exc ended attempt number attempt.
| Parameter | Type | Description |
|---|---|---|
exc |
STXException |
|
attempt |
int |
|
idempotent |
bool |
ReconnectPolicy
Section titled “ReconnectPolicy”Backoff between reconnect attempts. max_attempts=None never gives up.
Attributes
Section titled “Attributes”| Attribute | Type | Description |
|---|---|---|
initial_backoff |
float |
|
max_backoff |
float |
|
max_attempts |
Optional[int] |
|
jitter |
bool |
Methods
Section titled “Methods”delay()
Section titled “delay()”delay(attempt: int) -> float| Parameter | Type | Description |
|---|---|---|
attempt |
int |

