Problem
BuilderTradeResponse.builder is typed as Address (20-byte Ethereum address), but the /builder/trades API returns a UUID string (builder API key ID).
Deserialization fails with:
invalid string length at line 1 column 199
Actual API response
{
"builder": "019b618b-4a91-7dd9-a4c9-aadfbcbd5b95",
"maker": "0x4Ede3a1320FFD8087C0302b360721696f0037865",
...
}
builder is a UUID, maker is an Ethereum address.
Verified
Reproduced locally by deserializing actual API JSON into BuilderTradeResponse — fails at column 199 which is exactly the builder field.
The TypeScript SDK (@polymarket/clob-client) correctly types this as string.
Affected code
src/clob/types/response.rs:657:
pub builder: Address, // should be String or ApiKey (Uuid)
Suggested fix
pub builder: ApiKey, // ApiKey = Uuid — matches `owner` field
Problem
BuilderTradeResponse.builderis typed asAddress(20-byte Ethereum address), but the/builder/tradesAPI returns a UUID string (builder API key ID).Deserialization fails with:
Actual API response
{ "builder": "019b618b-4a91-7dd9-a4c9-aadfbcbd5b95", "maker": "0x4Ede3a1320FFD8087C0302b360721696f0037865", ... }builderis a UUID,makeris an Ethereum address.Verified
Reproduced locally by deserializing actual API JSON into
BuilderTradeResponse— fails at column 199 which is exactly thebuilderfield.The TypeScript SDK (
@polymarket/clob-client) correctly types this asstring.Affected code
src/clob/types/response.rs:657:Suggested fix