Problem
src/trading.js constructs structured errors using repeated Object.assign(new Error(...), { code, status, details }) calls. There are ~20 of these across the file. src/api.js already has a NansenError class designed for exactly this purpose.
This is inconsistent and verbose. New contributors are likely to copy the Object.assign pattern rather than discover NansenError.
Fix
Replace all Object.assign(new Error(...), {...}) patterns in src/trading.js with new NansenError(message, code, details) (or equivalent constructor signature from api.js).
Verify the class exposes .code, .message, and .details so existing tests (rejects.toMatchObject({ code: '...' })) continue to pass without changes.
Found during
Simplify pass on PR #167.