v0.2.0
Added
- Docstrings throughout the public API, sourced from the upstream StoneX catalog: every generated
model now has a class summary and a per-field description, and every endpoint binding has a
summary. Field descriptions flow into each model's JSON schema via Pydantic's
use_attribute_docstrings, so the same prose powers the docs site, editor tooltips, and
model_json_schema(). - Full docstring coverage across the hand-written core (configuration, errors, transport, request
pipeline, session management, retry and rate-limit policies, codecs, and plugins), including
Attributes/Raisessections on the public exception types. - A
tests/test_self_documentation.pysuite that guards the documentation contract: every model,
enum, resource group, and exported symbol stays documented, and field descriptions keep reaching
the JSON schema. - 56 new resource methods covering the full v2 endpoint surface, exposed on the synchronous and
asynchronous clients. New resource groupspm,fixedmargin,tradingadvisor,
client_preference, andorder_including_closed, plus new methods onorder(simulate,
update, trade, historical/changed/by-reference queries, trades wall),market,news,
message,margin,session(validate_session), anduser_account(social actions,
multi-user lookups, followers, top holders, trader search). Each method has sync and async
tests. - 30 new DTO models for the v2 responses and requests, each with auto-generated reference pages.
Changed
- Model reference pages now render each model class directly instead of wrapping it in a module
heading, and the API overview links to the full per-model reference rather than duplicating a
handful of examples inline. - Deploy the documentation site with GitHub Actions (
upload-pages-artifact+deploy-pages,
both on Node 24) instead of the legacy branch builder, eliminating the Node.js 20 deprecation
warning from Pages builds. - Regenerated the model and endpoint layer against StoneX catalog
afa936e(128 endpoints and
267 data types, up from 72 and 240). Several models gained correct request/response
classification, resolved type references, and required-ness. Three DTOs adopted their v2 names
(GetMarketInformationResponseDTO,ApiClientCommunicationUpdateRequestDTO, and
ApiSaveWatchlistRequestDTObecame…v2), andget_order,get_open_position, and
get_active_stop_limit_ordernow take the v2client_account_idparameter.
Fixed
- Generator robustness against the larger catalog: alias the lowercase
booltype to the
catalog'sboolean, omit the unusedParamimport from parameter-free endpoint modules,
annotate unwrappable long generated lines with# noqa: E501, and restore the dropped array
marker on the News headline list fields so they deserialize as lists. - Correct the
GetActiveStopLimitOrder v2endpoint path. The upstream StoneX doc page has a typo
in its URI template (/v2{orderId}/…, missing the slash every sibling v2 order endpoint has),
which would have made the client request a non-existent path; a curated generator override now
emits the correct/order/v2/{orderId}/activeStopLimitOrder.
Full changelog: https://github.com/aaronmgn/stonepy/blob/v0.2.0/CHANGELOG.md