fix(client): handle tokens without trades - #257
Open
kartojal wants to merge 3 commits into
Open
Conversation
kartojal
marked this pull request as ready for review
August 7, 2026 10:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Returns None for a token without trades and documents the placeholder price response.
DEV-506
Note
Medium Risk
Breaking change: callers must handle
LastTradePrice | Noneonget_last_trade_price; behavior is limited to CLOB read parsing with no auth or trading impact.Overview
get_last_trade_pricenow returnsNonewhen the CLOB responds with an emptyside(the API’s placeholder for tokens that have never traded), instead of surfacing a bogusLastTradePrice.Parsing goes through a new
_LastTradePriceResponseinclobactions that acceptsside: ""and maps it toNone. Return types and docstrings are updated on public, secure, and async clients;get_last_trade_pricesdocs note that untraded tokens are omitted and results must be matched bytoken_id, not by input order.The
market_pricesexample printsN/Awhen there is no last trade. Unit/transport tests cover the no-trade response.Reviewed by Cursor Bugbot for commit e5a0b19. Bugbot is set up for automated code reviews on this repo. Configure here.