Metadata-Version: 2.4
Name: rixtrade
Version: 1.0.3
Summary: Official Python client for the RixTrade options trading API — orders, positions, market data, and a real-time execution stream.
Author: RixTrade
License-Expression: MIT
Project-URL: Homepage, https://rixtrade.com
Project-URL: Documentation, https://rixtrade.com/api/sdk/
Project-URL: API Reference, https://rixtrade.com/api/trader/v1/openapi.json
Keywords: trading,options,market-data,brokerage,api,rixtrade
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Developers
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27

# rixtrade

Official Python client for the **RixTrade** options trading API.

```python
from rixtrade import RixTrade

rix = RixTrade(token="rtk_test_...")

acct = rix.accounts.get_account(account_id)
print(acct["cash_balance"])

rix.orders.place_order(
    account_id,
    order_type="limit",
    limit_price=-1.20,
    legs=[{"side": "buy", "occ": "SPY261218C00700000", "quantity": 1}],
)
```

## What it does that a raw HTTP call does not

**Retries are bounded by the contract, not by a guess.** Every refusal carries a `retry` class.
One marked `never` is raised immediately rather than hammered; one carrying `Retry-After` is
waited for exactly that long.

**The idempotency key survives the retry.** A retry after a timeout is the same order, not a
second one — which is the single most expensive mistake an order client can make.

**Cursors are handled.** `rix.paginate(...)` walks a keyset cursor to exhaustion, so "did all my
orders land?" has a complete answer rather than the first page of one.

## Install

```bash
pip install rixtrade
```

Also served from our own index, if you would rather not depend on a third-party registry:

```bash
pip install --extra-index-url https://rixtrade.com/api/sdk/simple/ rixtrade
```

## Sandbox first

Mint a key from your account, use a `rtk_test_` credential, and point it at a sandbox account.
Sandbox and live are separate reaches: a sandbox key cannot touch a funded account, by design.

## Links

- [Documentation and SDKs](https://rixtrade.com/api/sdk/)
- [OpenAPI contract](https://rixtrade.com/api/trader/v1/openapi.json) — this client is generated from it

Generated from the published OpenAPI contract; every endpoint and response type is derived from
the same document the server validates against.
