-
Notifications
You must be signed in to change notification settings - Fork 56
Description
The getTickSize method in src/client.ts constructs the URL as ${this.clobBase}/tick-size without the required ?token_id=${tokenID} query parameter.
Per API docs: GET /tick-size?token_id=...
This causes 400 "Invalid token id" errors when placing orders.
Fix: Change to const url = \${this.clobBase}/tick-size?token_id=${tokenID}`;`
Error logs:
[CLOB Client] request error {"status":400,"statusText":"Bad Request","data":{"error":"Invalid token id"},"config":{"transitional":{"silentJSONParsing":true,"forcedJSONParsing":true,"clarifyTimeoutError":false},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1,"maxBodyLength":-1,"env":{},"headers":{"Accept":"application/json, text/plain, /","User-Agent":"axios/0.27.2"},"method":"get","url":"https://clob.polymarket.com/tick-size","params":{}}}
Failed to place order: TypeError: Cannot read properties of undefined (reading 'toString')
at ClobClient. (/Users/.../node_modules/@polymarket/clob-client/dist/client.js:101:60)
at ...