redblack-python-sdk 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- redblack_python_sdk-0.1.0/.env.example +13 -0
- redblack_python_sdk-0.1.0/AGENTS.md +225 -0
- redblack_python_sdk-0.1.0/CHANGELOG.md +11 -0
- redblack_python_sdk-0.1.0/MANIFEST.in +10 -0
- redblack_python_sdk-0.1.0/PKG-INFO +151 -0
- redblack_python_sdk-0.1.0/README.md +126 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/KNOWN_ISSUES.md +144 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/README.md +92 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/guides/00-overview.md +44 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/guides/01-getting-started.md +153 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/guides/02-concepts.md +33 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/guides/03-obtaining-the-api-key-and-version.md +32 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/guides/04-managing-api-users.md +108 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/guides/05-managing-applications.md +92 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/guides/06-authentication.md +119 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/guides/07-requests.md +62 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/guides/08-responses.md +75 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/guides/09-odata-protocol.md +61 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/guides/10-rate-limiting.md +38 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/guides/11-versioning.md +38 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/guides/12-exporting-data.md +81 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/catalog.json +7183 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/openapi.json +36829 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Accounts_Export.json +480 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Accounts_GetBulkExportFile.json +314 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Accounts_GetBulkExportSessionStatus.json +455 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Accounts_QueryAccounts.json +2142 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/CashActions_Add.json +1161 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/CashActions_DeleteCashActions.json +386 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/CashActions_Get.json +711 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/CashActions_Query.json +800 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/CashActions_Update.json +606 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Equivalent_QueryEquivalents.json +683 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Equivalents_ExportJob.json +506 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Equivalents_GetExportFile.json +314 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Equivalents_GetExportJobStatus.json +438 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Households_BulkExport.json +473 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Households_GetBulkExportFile.json +314 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Households_GetBulkExportSessionStatus.json +455 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Households_QueryHouseholds.json +1378 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Restriction_QueryRestrictions.json +898 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Restrictions_ExportJob.json +468 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Restrictions_GetExportFile.json +314 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Restrictions_GetExportJobStatus.json +452 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/ReviewSetsPendingOrders_Query.json +4662 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/ReviewSets_CancelOrderAddSession.json +332 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/ReviewSets_CancelRelease.json +681 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/ReviewSets_CreateOrder.json +1876 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/ReviewSets_CreateOrderAddSession.json +1079 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/ReviewSets_GetOrderAddSession.json +502 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/ReviewSets_GetReleaseSession.json +711 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/ReviewSets_Query.json +529 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/ReviewSets_QueryOrderAddSessionResults.json +690 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/ReviewSets_QueryReleaseErrors.json +461 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/ReviewSets_QueryReleaseValidationResults.json +947 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/ReviewSets_ReleaseOrders.json +757 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Securities_Query.json +378 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Securities_QuerySweep.json +278 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/TaskSettings_ListStatuses.json +331 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/TaskSettings_ListTypes.json +306 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Tasks_Add.json +787 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Tasks_Delete.json +536 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Tasks_Get.json +764 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Tasks_ListTasks.json +932 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Tasks_Update.json +857 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/operations/Users_ListUsers.json +312 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/machine/schema-occurrences.json +7690 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/manifest.json +571 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/README.md +67 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/accounts/Accounts_Export.md +129 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/accounts/Accounts_GetBulkExportFile.md +100 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/accounts/Accounts_GetBulkExportSessionStatus.md +116 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/accounts/Accounts_QueryAccounts.md +321 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/accounts/README.md +18 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/cash-actions/CashActions_Add.md +139 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/cash-actions/CashActions_DeleteCashActions.md +116 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/cash-actions/CashActions_Get.md +139 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/cash-actions/CashActions_Query.md +159 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/cash-actions/CashActions_Update.md +148 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/cash-actions/README.md +19 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/equivalents/Equivalent_QueryEquivalents.md +150 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/equivalents/Equivalents_ExportJob.md +132 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/equivalents/Equivalents_GetExportFile.md +100 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/equivalents/Equivalents_GetExportJobStatus.md +112 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/equivalents/README.md +18 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/households/Households_BulkExport.md +127 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/households/Households_GetBulkExportFile.md +100 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/households/Households_GetBulkExportSessionStatus.md +117 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/households/Households_QueryHouseholds.md +228 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/households/README.md +18 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/restrictions/README.md +18 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/restrictions/Restriction_QueryRestrictions.md +159 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/restrictions/Restrictions_ExportJob.md +127 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/restrictions/Restrictions_GetExportFile.md +100 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/restrictions/Restrictions_GetExportJobStatus.md +116 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/review-sets/README.md +30 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/review-sets/ReviewSetsPendingOrders_Query.md +510 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/review-sets/ReviewSets_CancelOrderAddSession.md +101 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/review-sets/ReviewSets_CancelRelease.md +153 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/review-sets/ReviewSets_CreateOrder.md +236 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/review-sets/ReviewSets_CreateOrderAddSession.md +191 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/review-sets/ReviewSets_GetOrderAddSession.md +115 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/review-sets/ReviewSets_GetReleaseSession.md +126 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/review-sets/ReviewSets_Query.md +126 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/review-sets/ReviewSets_QueryOrderAddSessionResults.md +117 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/review-sets/ReviewSets_QueryReleaseErrors.md +129 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/review-sets/ReviewSets_QueryReleaseValidationResults.md +147 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/review-sets/ReviewSets_ReleaseOrders.md +178 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/securities/README.md +14 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/securities/Securities_Query.md +99 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/securities/Securities_QuerySweep.md +87 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/tasks/README.md +19 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/tasks/TaskSettings_ListStatuses.md +98 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/tasks/TaskSettings_ListTypes.md +95 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/tasks/Tasks_Add.md +177 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/tasks/Tasks_Delete.md +140 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/tasks/Tasks_Get.md +155 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/tasks/Tasks_ListTasks.md +159 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/tasks/Tasks_Update.md +195 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/users/README.md +13 -0
- redblack_python_sdk-0.1.0/api-docs/2026.2.0/cleaned/reference/users/Users_ListUsers.md +97 -0
- redblack_python_sdk-0.1.0/api-docs/tools/build_cleaned_docs.py +1973 -0
- redblack_python_sdk-0.1.0/api-docs/tools/build_openapi_docs.py +253 -0
- redblack_python_sdk-0.1.0/docs/API_COVERAGE.md +114 -0
- redblack_python_sdk-0.1.0/docs/COMPATIBILITY.md +28 -0
- redblack_python_sdk-0.1.0/docs/REDBLACK_PRIMER.md +877 -0
- redblack_python_sdk-0.1.0/docs/UAT_VALIDATION.md +53 -0
- redblack_python_sdk-0.1.0/docs/USAGE.md +401 -0
- redblack_python_sdk-0.1.0/examples/list_accounts.py +17 -0
- redblack_python_sdk-0.1.0/examples/read_task_etag.py +18 -0
- redblack_python_sdk-0.1.0/pyproject.toml +81 -0
- redblack_python_sdk-0.1.0/setup.cfg +4 -0
- redblack_python_sdk-0.1.0/src/redblack/__init__.py +105 -0
- redblack_python_sdk-0.1.0/src/redblack/_generated/__init__.py +39 -0
- redblack_python_sdk-0.1.0/src/redblack/_generated/contract.py +212 -0
- redblack_python_sdk-0.1.0/src/redblack/_generated/operation_specs.py +5115 -0
- redblack_python_sdk-0.1.0/src/redblack/_version.py +4 -0
- redblack_python_sdk-0.1.0/src/redblack/auth.py +352 -0
- redblack_python_sdk-0.1.0/src/redblack/client.py +512 -0
- redblack_python_sdk-0.1.0/src/redblack/config.py +576 -0
- redblack_python_sdk-0.1.0/src/redblack/downloads.py +410 -0
- redblack_python_sdk-0.1.0/src/redblack/errors.py +483 -0
- redblack_python_sdk-0.1.0/src/redblack/models/__init__.py +105 -0
- redblack_python_sdk-0.1.0/src/redblack/models/base.py +150 -0
- redblack_python_sdk-0.1.0/src/redblack/models/generated.py +11736 -0
- redblack_python_sdk-0.1.0/src/redblack/odata.py +75 -0
- redblack_python_sdk-0.1.0/src/redblack/pagination.py +184 -0
- redblack_python_sdk-0.1.0/src/redblack/polling.py +163 -0
- redblack_python_sdk-0.1.0/src/redblack/py.typed +1 -0
- redblack_python_sdk-0.1.0/src/redblack/raw.py +102 -0
- redblack_python_sdk-0.1.0/src/redblack/resources/__init__.py +65 -0
- redblack_python_sdk-0.1.0/src/redblack/resources/_base.py +212 -0
- redblack_python_sdk-0.1.0/src/redblack/resources/_collections.py +80 -0
- redblack_python_sdk-0.1.0/src/redblack/resources/_exports.py +215 -0
- redblack_python_sdk-0.1.0/src/redblack/resources/accounts.py +132 -0
- redblack_python_sdk-0.1.0/src/redblack/resources/cash_actions.py +260 -0
- redblack_python_sdk-0.1.0/src/redblack/resources/equivalents.py +144 -0
- redblack_python_sdk-0.1.0/src/redblack/resources/households.py +138 -0
- redblack_python_sdk-0.1.0/src/redblack/resources/orders.py +118 -0
- redblack_python_sdk-0.1.0/src/redblack/resources/restrictions.py +146 -0
- redblack_python_sdk-0.1.0/src/redblack/resources/review_sets.py +889 -0
- redblack_python_sdk-0.1.0/src/redblack/resources/securities.py +175 -0
- redblack_python_sdk-0.1.0/src/redblack/resources/tasks.py +291 -0
- redblack_python_sdk-0.1.0/src/redblack/resources/users.py +88 -0
- redblack_python_sdk-0.1.0/src/redblack/response.py +118 -0
- redblack_python_sdk-0.1.0/src/redblack/transport.py +606 -0
- redblack_python_sdk-0.1.0/src/redblack_python_sdk.egg-info/PKG-INFO +151 -0
- redblack_python_sdk-0.1.0/src/redblack_python_sdk.egg-info/SOURCES.txt +188 -0
- redblack_python_sdk-0.1.0/src/redblack_python_sdk.egg-info/dependency_links.txt +1 -0
- redblack_python_sdk-0.1.0/src/redblack_python_sdk.egg-info/requires.txt +11 -0
- redblack_python_sdk-0.1.0/src/redblack_python_sdk.egg-info/top_level.txt +1 -0
- redblack_python_sdk-0.1.0/tests/conftest.py +24 -0
- redblack_python_sdk-0.1.0/tests/contract/test_generated_contract.py +437 -0
- redblack_python_sdk-0.1.0/tests/contract/test_openapi_docs.py +98 -0
- redblack_python_sdk-0.1.0/tests/contract/test_operation_coverage.py +241 -0
- redblack_python_sdk-0.1.0/tests/integration/test_client.py +208 -0
- redblack_python_sdk-0.1.0/tests/integration/test_orders.py +198 -0
- redblack_python_sdk-0.1.0/tests/live/test_uat_smoke.py +25 -0
- redblack_python_sdk-0.1.0/tests/typecheck/resource_return_types.py +318 -0
- redblack_python_sdk-0.1.0/tests/unit/test_auth.py +217 -0
- redblack_python_sdk-0.1.0/tests/unit/test_config.py +270 -0
- redblack_python_sdk-0.1.0/tests/unit/test_downloads.py +200 -0
- redblack_python_sdk-0.1.0/tests/unit/test_odata.py +59 -0
- redblack_python_sdk-0.1.0/tests/unit/test_pagination.py +75 -0
- redblack_python_sdk-0.1.0/tests/unit/test_polling.py +173 -0
- redblack_python_sdk-0.1.0/tests/unit/test_raw.py +102 -0
- redblack_python_sdk-0.1.0/tests/unit/test_resources.py +191 -0
- redblack_python_sdk-0.1.0/tests/unit/test_transport.py +464 -0
- redblack_python_sdk-0.1.0/tools/check_operation_coverage.py +59 -0
- redblack_python_sdk-0.1.0/tools/generate_sdk_models.py +1688 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Select an environment explicitly: uat or production.
|
|
2
|
+
REDBLACK_ENVIRONMENT=uat
|
|
3
|
+
REDBLACK_API_VERSION=2026.3.0
|
|
4
|
+
REDBLACK_API_KEY=replace-with-secret
|
|
5
|
+
REDBLACK_CLIENT_ID=replace-with-secret
|
|
6
|
+
|
|
7
|
+
# Choose exactly one authentication mode.
|
|
8
|
+
REDBLACK_ACCESS_TOKEN=replace-with-access-token
|
|
9
|
+
|
|
10
|
+
# Password-grant alternative:
|
|
11
|
+
# REDBLACK_CLIENT_SECRET=replace-with-secret
|
|
12
|
+
# REDBLACK_USERNAME=replace-with-api-user
|
|
13
|
+
# REDBLACK_PASSWORD=replace-with-secret
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# Repository Guidance
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This repository builds a Python SDK for the RedBlack API, a trading,
|
|
6
|
+
portfolio-rebalancing, and order-management platform.
|
|
7
|
+
|
|
8
|
+
This file applies to the entire repository unless a more specific
|
|
9
|
+
`AGENTS.md` exists in a subdirectory.
|
|
10
|
+
|
|
11
|
+
## Current Phase
|
|
12
|
+
|
|
13
|
+
The offline SDK alpha for API release `2026.3.0` is implemented and has passed
|
|
14
|
+
the repository's mocked contract, typing, generation, and package checks. Live
|
|
15
|
+
UAT validation and public-release governance remain pending.
|
|
16
|
+
|
|
17
|
+
Typed compatibility with `2026.2.0` is intentionally not retained, as directed
|
|
18
|
+
by the repository owner. Its source and cleaned documentation remain archived.
|
|
19
|
+
|
|
20
|
+
- SDK implementation was explicitly authorized by the repository owner.
|
|
21
|
+
- Do not edit files in `api-docs/*/json_raw/`.
|
|
22
|
+
- Keep derived documentation scoped to its API release.
|
|
23
|
+
- Never silently combine facts from different API releases.
|
|
24
|
+
- Do not claim live RedBlack behavior has been verified; UAT has not been run.
|
|
25
|
+
|
|
26
|
+
## Repository Layout
|
|
27
|
+
|
|
28
|
+
- `api-docs/<release>/json_raw/` contains immutable captured source
|
|
29
|
+
documentation.
|
|
30
|
+
- `api-docs/<release>/cleaned/` contains normalized, agent-oriented
|
|
31
|
+
documentation derived from the raw sources.
|
|
32
|
+
- `api-docs/RedBlack API.yaml` is the immutable supplied OpenAPI source for
|
|
33
|
+
release `2026.3.0`, including `GET /orders`. It uses standard paths and
|
|
34
|
+
component references. Do not edit this captured source.
|
|
35
|
+
- `api-docs/2026.3.0/cleaned/` contains its normalized endpoint contract,
|
|
36
|
+
provenance and known issues. No narrative guides were supplied for this release.
|
|
37
|
+
- `api-docs/tools/build_openapi_docs.py` rebuilds these docs with PyYAML from
|
|
38
|
+
the development dependencies.
|
|
39
|
+
- `api-docs/2026.2.0/json_raw/openapi.json` is the archived endpoint source
|
|
40
|
+
for release `2026.2.0` only.
|
|
41
|
+
- `api-docs/2026.2.0/json_raw/00_*.json` through `12_*.json` are the narrative
|
|
42
|
+
sources for setup, authentication, requests, responses, OData, rate
|
|
43
|
+
limiting, versioning, and exports.
|
|
44
|
+
- `api-docs/tools/build_cleaned_docs.py` deterministically rebuilds a release's
|
|
45
|
+
cleaned documentation using only the Python standard library.
|
|
46
|
+
- `src/redblack/` contains the synchronous SDK, generated models, transport,
|
|
47
|
+
authentication, resource groups, and workflow helpers.
|
|
48
|
+
- `tools/generate_sdk_models.py` deterministically rebuilds the committed
|
|
49
|
+
model and operation layer from the cleaned contract.
|
|
50
|
+
- `tests/` contains offline contract, unit, integration, static-typing, and
|
|
51
|
+
separately marked opt-in UAT smoke tests.
|
|
52
|
+
- `docs/` contains the beginner RedBlack/rebalancing primer, SDK usage,
|
|
53
|
+
compatibility, operation-coverage, and UAT handoff documentation.
|
|
54
|
+
|
|
55
|
+
## Documentation Authority
|
|
56
|
+
|
|
57
|
+
Use the cleaned documentation as the primary working interface. Treat the raw
|
|
58
|
+
files as the authoritative source and use them to verify provenance, resolve
|
|
59
|
+
ambiguity, or audit the translation.
|
|
60
|
+
|
|
61
|
+
For endpoint-specific work, start with `cleaned/reference/` and the targeted
|
|
62
|
+
files under `cleaned/machine/operations/`. Use `cleaned/machine/openapi.json`
|
|
63
|
+
for the complete normalized contract. For authentication, operational
|
|
64
|
+
behavior, security guidance, versioning, rate limits, and workflows, start
|
|
65
|
+
with `cleaned/guides/` and review `cleaned/KNOWN_ISSUES.md`.
|
|
66
|
+
|
|
67
|
+
If sources disagree:
|
|
68
|
+
|
|
69
|
+
1. Do not silently choose or invent behavior.
|
|
70
|
+
2. Preserve the conflicting source facts.
|
|
71
|
+
3. Record the discrepancy in the cleaned documentation as an unresolved issue
|
|
72
|
+
with references to both source locations.
|
|
73
|
+
4. Do not encode uncertain behavior into future SDK code without a documented
|
|
74
|
+
decision.
|
|
75
|
+
|
|
76
|
+
## Raw Format Notes
|
|
77
|
+
|
|
78
|
+
The narrative files are ProseMirror-style document ASTs under `.body`, not
|
|
79
|
+
plain Markdown. Preserve headings, lists, tables, links, callouts, code tabs,
|
|
80
|
+
code blocks, images, and inline emphasis during translation.
|
|
81
|
+
|
|
82
|
+
The archived `2026.2.0` API reference does not use a conventional generated OpenAPI
|
|
83
|
+
layout:
|
|
84
|
+
|
|
85
|
+
- Operations are under `.tags.<tag>.verbs[]`, not `.paths`.
|
|
86
|
+
- Schemas are largely inline rather than in `.components.schemas`.
|
|
87
|
+
- Reusable model identity is often represented by `x-ref-key`.
|
|
88
|
+
- Enum member names may be stored in `x-enum-varnames`.
|
|
89
|
+
- Nullable types may be arrays such as `["string", "null"]`.
|
|
90
|
+
- Decimal values use `format: "decimal"`.
|
|
91
|
+
|
|
92
|
+
Do not assume a standard OpenAPI generator can consume this file without a
|
|
93
|
+
normalization step.
|
|
94
|
+
|
|
95
|
+
## Cleaned Documentation Requirements
|
|
96
|
+
|
|
97
|
+
Use UTF-8 Markdown with stable, predictable filenames and a top-level index.
|
|
98
|
+
The cleaned set must let an agent find, without reparsing the raw JSON:
|
|
99
|
+
|
|
100
|
+
- API version and environment URLs.
|
|
101
|
+
- Authentication flow and required credentials.
|
|
102
|
+
- Common headers, OData parameters, pagination, rate limits, errors, and
|
|
103
|
+
asynchronous job workflows.
|
|
104
|
+
- Every tag and operation.
|
|
105
|
+
- HTTP method, path, `operationId`, summary, and description.
|
|
106
|
+
- Authentication and required headers.
|
|
107
|
+
- Path, query, header, and body parameters, including required, default, and
|
|
108
|
+
example information.
|
|
109
|
+
- Request and response media types.
|
|
110
|
+
- Response status codes, headers, schemas, and examples.
|
|
111
|
+
- Model fields, types, nullability, formats, constraints, enums, and
|
|
112
|
+
`x-ref-key` identities.
|
|
113
|
+
- Source provenance and known source anomalies.
|
|
114
|
+
|
|
115
|
+
Preserve exact wire names and casing, including `Accept-Version`, `Client-ID`,
|
|
116
|
+
`X-Api-Key`, `Authorization`, `$top`, `$skip`, `$filter`, `$orderby`, and
|
|
117
|
+
`$count`.
|
|
118
|
+
|
|
119
|
+
Fix navigation links for the local cleaned-doc layout where possible. Record
|
|
120
|
+
broken, stale, or ambiguous source links rather than discarding them.
|
|
121
|
+
|
|
122
|
+
Never place real API keys, client secrets, usernames, passwords, or access
|
|
123
|
+
tokens in documentation, fixtures, examples, logs, or commits.
|
|
124
|
+
|
|
125
|
+
## Documentation Generation and Validation
|
|
126
|
+
|
|
127
|
+
Rebuild or check the current `2026.3.0` documentation with:
|
|
128
|
+
|
|
129
|
+
```sh
|
|
130
|
+
python3 api-docs/tools/build_openapi_docs.py
|
|
131
|
+
python3 api-docs/tools/build_openapi_docs.py --check
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
It must report 44 operations across 10 tags. Local references are expanded
|
|
135
|
+
with component names retained as `x-ref-key` identities; original components
|
|
136
|
+
and the YAML capture remain intact. Reference siblings and source anomalies
|
|
137
|
+
are documented in the release's `cleaned/KNOWN_ISSUES.md`. Do not copy older
|
|
138
|
+
narrative guides into this release or present them as newly verified behavior.
|
|
139
|
+
|
|
140
|
+
Rebuild the cleaned `2026.2.0` documentation with:
|
|
141
|
+
|
|
142
|
+
```sh
|
|
143
|
+
python3 api-docs/tools/build_cleaned_docs.py 2026.2.0
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
The generator validates source and normalized counts, operation subtree
|
|
147
|
+
fidelity, schema occurrence coverage, and generated relative Markdown links.
|
|
148
|
+
It must report 13 guides and 43 operations.
|
|
149
|
+
|
|
150
|
+
Additional JSON-level checks:
|
|
151
|
+
|
|
152
|
+
```sh
|
|
153
|
+
find api-docs/2026.2.0/json_raw -type f -name '*.json' \
|
|
154
|
+
-exec jq empty {} +
|
|
155
|
+
jq -e '.info.version == "2026.2.0"' \
|
|
156
|
+
api-docs/2026.2.0/json_raw/openapi.json
|
|
157
|
+
jq '[.tags[].verbs[]] | length' \
|
|
158
|
+
api-docs/2026.2.0/json_raw/openapi.json
|
|
159
|
+
jq '[.paths[] | to_entries[] |
|
|
160
|
+
select(.key == "get" or .key == "post" or .key == "patch" or
|
|
161
|
+
.key == "delete")] | length' \
|
|
162
|
+
api-docs/2026.2.0/cleaned/machine/openapi.json
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The final two commands must each report `43` for release `2026.2.0`.
|
|
166
|
+
|
|
167
|
+
Before completing a documentation translation, verify that all 13 narrative
|
|
168
|
+
documents and all 43 operations are represented. Check internal Markdown
|
|
169
|
+
links and ensure no raw source file changed.
|
|
170
|
+
|
|
171
|
+
## SDK Generation and Validation
|
|
172
|
+
|
|
173
|
+
Install the package and development tools with:
|
|
174
|
+
|
|
175
|
+
```sh
|
|
176
|
+
python3 -m pip install -e '.[dev]'
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Regenerate or check the committed wire layer with:
|
|
180
|
+
|
|
181
|
+
```sh
|
|
182
|
+
python3 tools/generate_sdk_models.py
|
|
183
|
+
python3 tools/generate_sdk_models.py --check
|
|
184
|
+
python3 tools/check_operation_coverage.py
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Do not hand-edit `src/redblack/models/generated.py` or files under
|
|
188
|
+
`src/redblack/_generated/`.
|
|
189
|
+
|
|
190
|
+
Run the normal quality gates with:
|
|
191
|
+
|
|
192
|
+
```sh
|
|
193
|
+
ruff format --check .
|
|
194
|
+
ruff check .
|
|
195
|
+
pyright
|
|
196
|
+
pytest
|
|
197
|
+
python3 -m build --no-isolation
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
The normal suite blocks accidental socket connections and uses HTTPX mock
|
|
201
|
+
transports. Tests marked `live` are a separate UAT activity and must remain
|
|
202
|
+
skipped unless explicitly enabled with approved credentials. Never use
|
|
203
|
+
production as a substitute for UAT.
|
|
204
|
+
|
|
205
|
+
## SDK Conventions
|
|
206
|
+
|
|
207
|
+
- Use a PEP 517/PEP 621 `pyproject.toml`.
|
|
208
|
+
- Keep the `src/` package layout and mirror public modules under `tests/`.
|
|
209
|
+
- Declare supported Python versions explicitly.
|
|
210
|
+
- Type all public interfaces.
|
|
211
|
+
- Preserve API wire names through explicit serialization aliases while using
|
|
212
|
+
idiomatic Python names publicly.
|
|
213
|
+
- Keep transport, authentication, models, pagination, and endpoint resources
|
|
214
|
+
separable and testable.
|
|
215
|
+
- Mock HTTP interactions in unit tests and cover success, error, pagination,
|
|
216
|
+
retry and rate-limit, and serialization behavior.
|
|
217
|
+
- Do not make live RedBlack requests in the normal test suite.
|
|
218
|
+
- Add exact install, format, lint, type-check, and test commands here only
|
|
219
|
+
after the corresponding tooling is configured.
|
|
220
|
+
|
|
221
|
+
## Change Discipline
|
|
222
|
+
|
|
223
|
+
Keep changes scoped to the requested release and task. Preserve unrelated
|
|
224
|
+
files and user work. Derived documentation should be deterministic so later
|
|
225
|
+
API releases can be normalized using the same structure and rules.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented here.
|
|
4
|
+
|
|
5
|
+
## 0.1.0 — Unreleased
|
|
6
|
+
|
|
7
|
+
- Initial typed SDK implementation for the RedBlack `2026.2.0` contract.
|
|
8
|
+
- Synchronous client, managed/static authentication, retries, pagination,
|
|
9
|
+
export workflows, review-set workflows, ETag concurrency, and all 43
|
|
10
|
+
documented operations.
|
|
11
|
+
- Offline mocked validation; live UAT validation remains pending.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
include .env.example
|
|
2
|
+
include AGENTS.md
|
|
3
|
+
include CHANGELOG.md
|
|
4
|
+
recursive-include api-docs/2026.2.0/cleaned *.json *.md
|
|
5
|
+
recursive-include api-docs/2026.2.0/json_raw *.json
|
|
6
|
+
recursive-include api-docs/tools *.py
|
|
7
|
+
recursive-include docs *.md
|
|
8
|
+
recursive-include examples *.py
|
|
9
|
+
recursive-include tests *.py
|
|
10
|
+
recursive-include tools *.py
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: redblack-python-sdk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Typed Python SDK for the RedBlack trading and portfolio rebalancing API
|
|
5
|
+
Classifier: Development Status :: 3 - Alpha
|
|
6
|
+
Classifier: Intended Audience :: Developers
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
12
|
+
Classifier: Typing :: Typed
|
|
13
|
+
Requires-Python: >=3.11
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
Requires-Dist: httpx<1,>=0.27
|
|
16
|
+
Requires-Dist: pydantic<3,>=2.6
|
|
17
|
+
Requires-Dist: python-dotenv<2,>=1.0
|
|
18
|
+
Provides-Extra: dev
|
|
19
|
+
Requires-Dist: build>=1.2; extra == "dev"
|
|
20
|
+
Requires-Dist: PyYAML<7,>=6; extra == "dev"
|
|
21
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
22
|
+
Requires-Dist: pytest-cov>=5; extra == "dev"
|
|
23
|
+
Requires-Dist: pyright>=1.1; extra == "dev"
|
|
24
|
+
Requires-Dist: ruff>=0.3; extra == "dev"
|
|
25
|
+
|
|
26
|
+
# RedBlack Python SDK
|
|
27
|
+
|
|
28
|
+
Typed Python client for the RedBlack trading, portfolio-rebalancing, and
|
|
29
|
+
order-management API.
|
|
30
|
+
|
|
31
|
+
> **Alpha:** the SDK is implemented from the offline RedBlack `2026.3.0`
|
|
32
|
+
> contract. Live UAT validation has not yet been run. See
|
|
33
|
+
> [`docs/UAT_VALIDATION.md`](docs/UAT_VALIDATION.md).
|
|
34
|
+
|
|
35
|
+
## Requirements
|
|
36
|
+
|
|
37
|
+
- Python 3.11 or newer
|
|
38
|
+
- A RedBlack environment, API key, application client ID, and either:
|
|
39
|
+
- a RedBlack API username, password, and client secret; or
|
|
40
|
+
- an externally managed access token
|
|
41
|
+
|
|
42
|
+
## Install for development
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
python3 -m pip install -e '.[dev]'
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Quick start
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from redblack import Environment, PasswordCredentials, RedBlackClient
|
|
52
|
+
|
|
53
|
+
credentials = PasswordCredentials(
|
|
54
|
+
client_secret="read-from-a-secret-store",
|
|
55
|
+
username="read-from-a-secret-store",
|
|
56
|
+
password="read-from-a-secret-store",
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
with RedBlackClient(
|
|
60
|
+
environment=Environment.UAT,
|
|
61
|
+
api_version="2026.3.0",
|
|
62
|
+
api_key="read-from-a-secret-store",
|
|
63
|
+
client_id="read-from-a-secret-store",
|
|
64
|
+
credentials=credentials,
|
|
65
|
+
) as client:
|
|
66
|
+
page = client.accounts.list(top=100, order_by="id asc")
|
|
67
|
+
for account in page.items:
|
|
68
|
+
print(account)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The normal constructor never reads environment variables or files. Applications
|
|
72
|
+
that intentionally want configuration lookup can use
|
|
73
|
+
`RedBlackClient.from_env()` or `RedBlackClient.from_dotenv()`.
|
|
74
|
+
|
|
75
|
+
## Safety defaults
|
|
76
|
+
|
|
77
|
+
- UAT or production must be selected explicitly.
|
|
78
|
+
- TLS verification is on and ambient proxy/CA variables are ignored by default.
|
|
79
|
+
- Access tokens are cached in memory and concurrent refresh is single-flight.
|
|
80
|
+
- Automatic retries apply to safe reads only.
|
|
81
|
+
- `POST`, `PATCH`, and `DELETE` are never replayed automatically.
|
|
82
|
+
- Task updates/deletes require the exact ETag returned by task retrieval.
|
|
83
|
+
- Deleting all cash actions requires a separate explicit confirmation.
|
|
84
|
+
- Export storage downloads never receive RedBlack credentials.
|
|
85
|
+
- Unknown response fields and enum values are preserved.
|
|
86
|
+
|
|
87
|
+
## API shape
|
|
88
|
+
|
|
89
|
+
Endpoints are grouped under:
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
client.accounts
|
|
93
|
+
client.households
|
|
94
|
+
client.restrictions
|
|
95
|
+
client.equivalents
|
|
96
|
+
client.cash_actions
|
|
97
|
+
client.securities
|
|
98
|
+
client.orders
|
|
99
|
+
client.review_sets
|
|
100
|
+
client.users
|
|
101
|
+
client.tasks
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Collection methods support RedBlack's OData options through Python arguments:
|
|
105
|
+
`filter`, `order_by`, `top`, `skip`, and `count`.
|
|
106
|
+
|
|
107
|
+
List Trade Blotter or Trade Reconciliation orders with the new Orders resource:
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
from redblack.models import OrderFilterType
|
|
111
|
+
|
|
112
|
+
page = client.orders.list(top=100, count=True) # Active Trade Blotter orders
|
|
113
|
+
for order in client.orders.iter_all(
|
|
114
|
+
filter_type=OrderFilterType.IN_RECONCILIATION,
|
|
115
|
+
order_by="id asc",
|
|
116
|
+
max_items=1_000,
|
|
117
|
+
):
|
|
118
|
+
print(order.id, order.quantity)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
The SDK now defaults to `Accept-Version: 2026.3.0`; older API versions are not
|
|
122
|
+
supported by typed methods. Orders in review sets remain accessible through
|
|
123
|
+
`client.review_sets.list_pending_orders()`.
|
|
124
|
+
|
|
125
|
+
Friendly request and response types such as `Account`, `Task`, `TaskUpdate`,
|
|
126
|
+
and `CashActionCreate` are exported from `redblack.models`. Dictionary inputs
|
|
127
|
+
are also validated before an HTTP request is sent.
|
|
128
|
+
|
|
129
|
+
## Development commands
|
|
130
|
+
|
|
131
|
+
```sh
|
|
132
|
+
ruff format --check .
|
|
133
|
+
ruff check .
|
|
134
|
+
pyright
|
|
135
|
+
pytest
|
|
136
|
+
python3 tools/generate_sdk_models.py --check
|
|
137
|
+
python3 api-docs/tools/build_openapi_docs.py --check
|
|
138
|
+
python3 tools/check_operation_coverage.py
|
|
139
|
+
python3 -m build --no-isolation
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The normal test suite uses mock transports and must not call RedBlack.
|
|
143
|
+
|
|
144
|
+
## Documentation
|
|
145
|
+
|
|
146
|
+
- [`docs/REDBLACK_PRIMER.md`](docs/REDBLACK_PRIMER.md) — start here if you are
|
|
147
|
+
new to RedBlack, rebalancing, or trading workflows
|
|
148
|
+
- [`docs/USAGE.md`](docs/USAGE.md)
|
|
149
|
+
- [`docs/API_COVERAGE.md`](docs/API_COVERAGE.md)
|
|
150
|
+
- [`docs/COMPATIBILITY.md`](docs/COMPATIBILITY.md)
|
|
151
|
+
- [`docs/UAT_VALIDATION.md`](docs/UAT_VALIDATION.md)
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# RedBlack Python SDK
|
|
2
|
+
|
|
3
|
+
Typed Python client for the RedBlack trading, portfolio-rebalancing, and
|
|
4
|
+
order-management API.
|
|
5
|
+
|
|
6
|
+
> **Alpha:** the SDK is implemented from the offline RedBlack `2026.3.0`
|
|
7
|
+
> contract. Live UAT validation has not yet been run. See
|
|
8
|
+
> [`docs/UAT_VALIDATION.md`](docs/UAT_VALIDATION.md).
|
|
9
|
+
|
|
10
|
+
## Requirements
|
|
11
|
+
|
|
12
|
+
- Python 3.11 or newer
|
|
13
|
+
- A RedBlack environment, API key, application client ID, and either:
|
|
14
|
+
- a RedBlack API username, password, and client secret; or
|
|
15
|
+
- an externally managed access token
|
|
16
|
+
|
|
17
|
+
## Install for development
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
python3 -m pip install -e '.[dev]'
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Quick start
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
from redblack import Environment, PasswordCredentials, RedBlackClient
|
|
27
|
+
|
|
28
|
+
credentials = PasswordCredentials(
|
|
29
|
+
client_secret="read-from-a-secret-store",
|
|
30
|
+
username="read-from-a-secret-store",
|
|
31
|
+
password="read-from-a-secret-store",
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
with RedBlackClient(
|
|
35
|
+
environment=Environment.UAT,
|
|
36
|
+
api_version="2026.3.0",
|
|
37
|
+
api_key="read-from-a-secret-store",
|
|
38
|
+
client_id="read-from-a-secret-store",
|
|
39
|
+
credentials=credentials,
|
|
40
|
+
) as client:
|
|
41
|
+
page = client.accounts.list(top=100, order_by="id asc")
|
|
42
|
+
for account in page.items:
|
|
43
|
+
print(account)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The normal constructor never reads environment variables or files. Applications
|
|
47
|
+
that intentionally want configuration lookup can use
|
|
48
|
+
`RedBlackClient.from_env()` or `RedBlackClient.from_dotenv()`.
|
|
49
|
+
|
|
50
|
+
## Safety defaults
|
|
51
|
+
|
|
52
|
+
- UAT or production must be selected explicitly.
|
|
53
|
+
- TLS verification is on and ambient proxy/CA variables are ignored by default.
|
|
54
|
+
- Access tokens are cached in memory and concurrent refresh is single-flight.
|
|
55
|
+
- Automatic retries apply to safe reads only.
|
|
56
|
+
- `POST`, `PATCH`, and `DELETE` are never replayed automatically.
|
|
57
|
+
- Task updates/deletes require the exact ETag returned by task retrieval.
|
|
58
|
+
- Deleting all cash actions requires a separate explicit confirmation.
|
|
59
|
+
- Export storage downloads never receive RedBlack credentials.
|
|
60
|
+
- Unknown response fields and enum values are preserved.
|
|
61
|
+
|
|
62
|
+
## API shape
|
|
63
|
+
|
|
64
|
+
Endpoints are grouped under:
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
client.accounts
|
|
68
|
+
client.households
|
|
69
|
+
client.restrictions
|
|
70
|
+
client.equivalents
|
|
71
|
+
client.cash_actions
|
|
72
|
+
client.securities
|
|
73
|
+
client.orders
|
|
74
|
+
client.review_sets
|
|
75
|
+
client.users
|
|
76
|
+
client.tasks
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Collection methods support RedBlack's OData options through Python arguments:
|
|
80
|
+
`filter`, `order_by`, `top`, `skip`, and `count`.
|
|
81
|
+
|
|
82
|
+
List Trade Blotter or Trade Reconciliation orders with the new Orders resource:
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
from redblack.models import OrderFilterType
|
|
86
|
+
|
|
87
|
+
page = client.orders.list(top=100, count=True) # Active Trade Blotter orders
|
|
88
|
+
for order in client.orders.iter_all(
|
|
89
|
+
filter_type=OrderFilterType.IN_RECONCILIATION,
|
|
90
|
+
order_by="id asc",
|
|
91
|
+
max_items=1_000,
|
|
92
|
+
):
|
|
93
|
+
print(order.id, order.quantity)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The SDK now defaults to `Accept-Version: 2026.3.0`; older API versions are not
|
|
97
|
+
supported by typed methods. Orders in review sets remain accessible through
|
|
98
|
+
`client.review_sets.list_pending_orders()`.
|
|
99
|
+
|
|
100
|
+
Friendly request and response types such as `Account`, `Task`, `TaskUpdate`,
|
|
101
|
+
and `CashActionCreate` are exported from `redblack.models`. Dictionary inputs
|
|
102
|
+
are also validated before an HTTP request is sent.
|
|
103
|
+
|
|
104
|
+
## Development commands
|
|
105
|
+
|
|
106
|
+
```sh
|
|
107
|
+
ruff format --check .
|
|
108
|
+
ruff check .
|
|
109
|
+
pyright
|
|
110
|
+
pytest
|
|
111
|
+
python3 tools/generate_sdk_models.py --check
|
|
112
|
+
python3 api-docs/tools/build_openapi_docs.py --check
|
|
113
|
+
python3 tools/check_operation_coverage.py
|
|
114
|
+
python3 -m build --no-isolation
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
The normal test suite uses mock transports and must not call RedBlack.
|
|
118
|
+
|
|
119
|
+
## Documentation
|
|
120
|
+
|
|
121
|
+
- [`docs/REDBLACK_PRIMER.md`](docs/REDBLACK_PRIMER.md) — start here if you are
|
|
122
|
+
new to RedBlack, rebalancing, or trading workflows
|
|
123
|
+
- [`docs/USAGE.md`](docs/USAGE.md)
|
|
124
|
+
- [`docs/API_COVERAGE.md`](docs/API_COVERAGE.md)
|
|
125
|
+
- [`docs/COMPATIBILITY.md`](docs/COMPATIBILITY.md)
|
|
126
|
+
- [`docs/UAT_VALIDATION.md`](docs/UAT_VALIDATION.md)
|