We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unclear error when trying to post an order
[CLOB Client] request error {"status":400,"statusText":"Bad Request","data":{"error":"invalid amounts, the buy orders maker amount supports a max accuracy of 5 decimals, taker amount a max of 2 decimals"},"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":"/","Content-Type":"application/json","POLY_ADDRESS":"0x1e1344248c31aB7dA4B88A5d63D7BbFBd9bfE375","POLY_SIGNATURE":"_7XjiOnbjE8x8KXxz51YM86TkCg5Fg_zHVU0MxgWi9w=","POLY_TIMESTAMP":"1729051546","POLY_API_KEY":"6092c2ff-578e-0c2a-9ae5-2b0a7ecc7fb3","POLY_PASSPHRASE":"d6c0c17e9945dd120e70d3c116690fc213ca8033b619e178b6b872b0e5734417","User-Agent":"@polymarket/clob-client","Connection":"keep-alive","Content-Length":618},"method":"post","url":"https://clob.polymarket.com/order","data":"{\"order\":{\"salt\":164845550304,\"maker\":\"0x1e1344248c31aB7dA4B88A5d63D7BbFBd9bfE375\",\"signer\":\"0x1e1344248c31aB7dA4B88A5d63D7BbFBd9bfE375\",\"taker\":\"0x0000000000000000000000000000000000000000\",\"tokenId\":\"53553664417907856984221108080710056607067142953702581302407402201747968079910\",\"makerAmount\":\"4000000\",\"takerAmount\":\"6666660\",\"side\":\"BUY\",\"expiration\":\"0\",\"nonce\":\"0\",\"feeRateBps\":\"0\",\"signatureType\":0,\"signature\":\"0xd88e0279672e282ac9578ed664e6bc7dc76f6467f6b61498c524a482655df1594fcaa986c58091e58a6e3e8b4c6a1ad339cdc6b72e94330f011275533565eadd1c\"},\"owner\":\"6092c2ff-578e-0c2a-9ae5-2b0a7ecc7fb3\",\"orderType\":\"GTC\"}","params":{}}}
based on this code const userMarketOrder: UserMarketOrder = { tokenID: "53553664417907856984221108080710056607067142953702581302407402201747968079910", amount: 4, price: 0.6, nonce: 0, feeRateBps: 0 };
try { await POLYMARKET_CLIENT.writeMarketOrder(userMarketOrder); } catch (error) { logger.error(Error writing market order: ${error}); }
Error writing market order: ${error}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Unclear error when trying to post an order
[CLOB Client] request error {"status":400,"statusText":"Bad Request","data":{"error":"invalid amounts, the buy orders maker amount supports a max accuracy of 5 decimals, taker amount a max of 2 decimals"},"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":"/","Content-Type":"application/json","POLY_ADDRESS":"0x1e1344248c31aB7dA4B88A5d63D7BbFBd9bfE375","POLY_SIGNATURE":"_7XjiOnbjE8x8KXxz51YM86TkCg5Fg_zHVU0MxgWi9w=","POLY_TIMESTAMP":"1729051546","POLY_API_KEY":"6092c2ff-578e-0c2a-9ae5-2b0a7ecc7fb3","POLY_PASSPHRASE":"d6c0c17e9945dd120e70d3c116690fc213ca8033b619e178b6b872b0e5734417","User-Agent":"@polymarket/clob-client","Connection":"keep-alive","Content-Length":618},"method":"post","url":"https://clob.polymarket.com/order","data":"{\"order\":{\"salt\":164845550304,\"maker\":\"0x1e1344248c31aB7dA4B88A5d63D7BbFBd9bfE375\",\"signer\":\"0x1e1344248c31aB7dA4B88A5d63D7BbFBd9bfE375\",\"taker\":\"0x0000000000000000000000000000000000000000\",\"tokenId\":\"53553664417907856984221108080710056607067142953702581302407402201747968079910\",\"makerAmount\":\"4000000\",\"takerAmount\":\"6666660\",\"side\":\"BUY\",\"expiration\":\"0\",\"nonce\":\"0\",\"feeRateBps\":\"0\",\"signatureType\":0,\"signature\":\"0xd88e0279672e282ac9578ed664e6bc7dc76f6467f6b61498c524a482655df1594fcaa986c58091e58a6e3e8b4c6a1ad339cdc6b72e94330f011275533565eadd1c\"},\"owner\":\"6092c2ff-578e-0c2a-9ae5-2b0a7ecc7fb3\",\"orderType\":\"GTC\"}","params":{}}}
based on this code
const userMarketOrder: UserMarketOrder = {
tokenID: "53553664417907856984221108080710056607067142953702581302407402201747968079910",
amount: 4,
price: 0.6,
nonce: 0,
feeRateBps: 0
};
try {
await POLYMARKET_CLIENT.writeMarketOrder(userMarketOrder);
} catch (error) {
logger.error(
Error writing market order: ${error}
);}
The text was updated successfully, but these errors were encountered: