Skip to content

fix: normalize trading data user_param - #9

Open
doskoi wants to merge 1 commit into
atompilot:mainfrom
doskoi:fix/query-data-user-param
Open

fix: normalize trading data user_param#9
doskoi wants to merge 1 commit into
atompilot:mainfrom
doskoi:fix/query-data-user-param

Conversation

@doskoi

@doskoi doskoi commented Jul 7, 2026

Copy link
Copy Markdown

Summary

  • change export_data/query_data request models to default user_param to an object
  • normalize omitted, None, or empty-string user_param to {} before calling xtquant
  • add tests covering model defaults and manager forwarding

Why

xtquant export_data/query_data expects user_param to be a mapping. The previous default empty string can fail during BSON encoding with: encoder expected a mapping type but got: ''.

Tests

  • uv run --with pytest --with pydantic python -m pytest tests/test_trading_data_user_param.py -q

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant