Hi everyone, I'm trying to place an order using the Polymarket TypeScript SDK, following the Quickstart documentation. I'm creating the client like this: ```ts const account = privateKeyToAccount(POLYMARKET_PRIVATE_KEY); const url = `${ALCHEMY_POLYGON_REST_BASE_URL}/v2/${ALCHEMY_API_KEY}`; const signer = createWalletClient({ account, transport: http(url) }); const client = new ClobClient({ host: POLYMARKET_CLOB_REST_BASE_URL, chain: 137, builderConfig: { builderCode: POLYMARKET_BUILDER_CODE, }, signer, creds: { key: global.POLYMARKET_ACCOUNT.API_KEY, secret: global.POLYMARKET_ACCOUNT.SECRET, passphrase: global.POLYMARKET_ACCOUNT.PASSPHRASE, }, signatureType: SignatureTypeV2.POLY_1271, funderAddress: POLYMARKET_DEPOSIT_WALLET_ADDRESS, }); await client.createAndPostOrder( { price: 0.2, side: Side.BUY, size: 5, tokenID: "VALID_TOKEN_ID", builderCode: POLYMARKET_BUILDER_CODE, }, { negRisk: true, tickSize: "0.01", }, OrderType.GTC, true, true, ); ``` However, I get the following error: ```json { "error": "the order signer address has to be the address of the API KEY", "status": 400 } ``` A few additional details: * The API key, secret, and passphrase were generated using `.createOrDeriveApiKey()`. * The private key is the one obtained from the Polymarket web portal/account page (I'm not using a different wallet's private key). * I'm using `SignatureTypeV2.POLY_1271`. Based on the error, it seems the signer address doesn't match the address associated with the API key, but I'm not sure how to verify that or whether there's an additional setup step required when using `POLY_1271`. I'm following the Quickstart docs here: https://docs.polymarket.com/trading/quickstart Has anyone encountered this before or knows what I might be missing? Thanks!
Hi everyone, I'm trying to place an order using the Polymarket TypeScript SDK, following the Quickstart documentation. I'm creating the client like this: ```ts const account = privateKeyToAccount(POLYMARKET_PRIVATE_KEY); const url = `${ALCHEMY_POLYGON_REST_BASE_URL}/v2/${ALCHEMY_API_KEY}`; const signer = createWalletClient({ account, transport: http(url) }); const client = new ClobClient({ host: POLYMARKET_CLOB_REST_BASE_URL, chain: 137, builderConfig: { builderCode: POLYMARKET_BUILDER_CODE, }, signer, creds: { key: global.POLYMARKET_ACCOUNT.API_KEY, secret: global.POLYMARKET_ACCOUNT.SECRET, passphrase: global.POLYMARKET_ACCOUNT.PASSPHRASE, }, signatureType: SignatureTypeV2.POLY_1271, funderAddress: POLYMARKET_DEPOSIT_WALLET_ADDRESS, }); await client.createAndPostOrder( { price: 0.2, side: Side.BUY, size: 5, tokenID: "VALID_TOKEN_ID", builderCode: POLYMARKET_BUILDER_CODE, }, { negRisk: true, tickSize: "0.01", }, OrderType.GTC, true, true, ); ``` However, I get the following error: ```json { "error": "the order signer address has to be the address of the API KEY", "status": 400 } ``` A few additional details: * The API key, secret, and passphrase were generated using `.createOrDeriveApiKey()`. * The private key is the one obtained from the Polymarket web portal/account page (I'm not using a different wallet's private key). * I'm using `SignatureTypeV2.POLY_1271`. Based on the error, it seems the signer address doesn't match the address associated with the API key, but I'm not sure how to verify that or whether there's an additional setup step required when using `POLY_1271`. I'm following the Quickstart docs here: https://docs.polymarket.com/trading/quickstart Has anyone encountered this before or knows what I might be missing? Thanks!