Skip to content

Add redirect_slashes=False for Mintlify docs compatibility#145

Open
fengtality wants to merge 2 commits intofeature/connector-level-retryfrom
feature/docs-compatibility
Open

Add redirect_slashes=False for Mintlify docs compatibility#145
fengtality wants to merge 2 commits intofeature/connector-level-retryfrom
feature/docs-compatibility

Conversation

@fengtality
Copy link
Copy Markdown
Contributor

@fengtality fengtality commented Apr 8, 2026

Summary

  • Adds redirect_slashes=False to FastAPI configuration to prevent automatic redirects from /endpoint to /endpoint/
  • Required for Mintlify documentation to properly interact with the API
  • fix(portfolio): refresh=true now fetches fresh balances from exchanges (previously only returned cached data)

Test plan

  • Verify API endpoints work without trailing slashes
  • Confirm Mintlify docs can make API calls successfully
  • Test portfolio state with refresh=true returns fresh exchange balances

🤖 Generated with Claude Code

@fengtality fengtality force-pushed the feature/connector-level-retry branch from d7d656b to 87ab393 Compare April 8, 2026 17:43
@fengtality fengtality force-pushed the feature/docs-compatibility branch from 7a144d5 to 7d0b524 Compare April 8, 2026 17:44
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@fengtality fengtality force-pushed the feature/docs-compatibility branch from c840bfe to 55d6c87 Compare April 15, 2026 22:39
@fengtality fengtality changed the title Feature/docs compatibility Add redirect_slashes=False for Mintlify docs compatibility Apr 15, 2026
@fengtality fengtality requested a review from cardosofede April 15, 2026 22:43
@fengtality
Copy link
Copy Markdown
Contributor Author

This is needed for API reference in https://condor.hummingbot.org/api-reference

Previously, portfolio state refresh=true did not actually fetch fresh
balances from exchanges - it only read cached connector data.

Changes:
- _get_connector_tokens_info now calls connector._update_balances()
- Added skip_balance_refresh param to avoid double fetch in background loop
- Errors during balance refresh log warning and use stale data gracefully
- Added tests for refresh behavior

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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