聊天记录
共 14 条,显示第 1-14 条
<@281115296931250176> Can you confirm me the address shown in the Accounts -> Profile -> Address in the polymarket portal is a deposit wallet address or not?
<@281115296931250176> Can you confirm me the address shown in the Accounts -> Profile -> Address in the polymarket portal is a deposit wallet address or not?
I have extracted a private key from the polymarket portal itself but it's of that deposit wallet (one that I am considering as) only.
I have extracted a private key from the polymarket portal itself but it's of that deposit wallet (one that I am considering as) only.
I am able to see my fund in the address which I got from Accounts -> Profile -> Address. According to my understanding this is the Deposit Wallet Address.
I have created the Polymarket account using Gmail. Also I have a Relayer Address which I use as Signer Address.
I am able to see my fund in the address which I got from Accounts -> Profile -> Address. According to my understanding this is the Deposit Wallet Address.
I have created the Polymarket account using Gmail. Also I have a Relayer Address which I use as Signer Address.
Yes
Yes
As I have created the account newly, therefore I will be having a deposit wallet address. According to that I am trying to place an order. On the side note, I am already getting successfully retrieving the api keys for the account.
As I have created the account newly, therefore I will be having a deposit wallet address. According to that I am trying to place an order. On the side note, I am already getting successfully retrieving the api keys for the account.
Hi everyone,
I'm running into an issue while placing an order via the API and would appreciate some guidance.
I'm receiving the following error:
```json
{
"error": "the order signer address has to be the address of the API KEY"
}
```
In my order payload, I'm currently using the **deposit wallet address** for both the `maker` and `signer` fields, but I still receive this error.
Any clarification or examples of the correct setup would be greatly appreciated.
Thanks in advance!
Hi everyone,
I'm running into an issue while placing an order via the API and would appreciate some guidance.
I'm receiving the following error:
```json
{
"error": "the order signer address has to be the address of the API KEY"
}
```
In my order payload, I'm currently using the **deposit wallet address** for both the `maker` and `signer` fields, but I still receive this error.
Any clarification or examples of the correct setup would be greatly appreciated.
Thanks in advance!
The signer getting Private Key should be collect from the Deposit Wallet?
The signer getting Private Key should be collect from the Deposit Wallet?
Should I post my message on that channel again?
Should I post my message on that channel again?
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!
You have to maintain the connection using heartbeats
https://docs.polymarket.com/market-data/websocket/overview#heartbeats
You have to maintain the connection using heartbeats
https://docs.polymarket.com/market-data/websocket/overview#heartbeats
Thanks for the suggestions <@173453984638566400>
Thanks for the suggestions <@173453984638566400>
Claude is looping with same suggestions :3
Claude is looping with same suggestions :3
<@173453984638566400> no it's not working
<@173453984638566400> no it's not working
Hi everyone 👋
I’m trying to implement Polymarket CLOB L2 authentication manually in Node.js and I’m currently validating the HMAC signature generation against the official implementation:
Reference:
https://raw.githubusercontent.com/Polymarket/clob-client-v2/refs/heads/main/src/signing/hmac.ts
---
## Signature generation code
```js
const decode_base64_secret = (secret) => {
const normalized = secret.replace(/-/g, '+').replace(/_/g, '/');
const padded = normalized + '='.repeat((4 - (normalized.length % 4)) % 4);
const binary = atob(padded);
const buffer = new ArrayBuffer(binary.length);
const bytes = new Uint8Array(buffer);
for (let i = 0; i < binary.length; i++) {
bytes[i] = binary.charCodeAt(i);
}
return bytes;
};
export const polymarket_signature = async (timestamp, method, path, body) => {
let message = timestamp + method + path;
if (body !== undefined) message += body;
const keyBytes = decode_base64_secret(POLYMARKET_SECRET);
const key = await crypto.subtle.importKey(
'raw',
keyBytes,
{ name: 'HMAC', hash: 'SHA-256' },
false,
['sign']
);
const sigBuffer = await crypto.subtle.sign(
'HMAC',
key,
new TextEncoder().encode(message)
);
const sigBytes = new Uint8Array(sigBuffer);
let binary = '';
for (let i = 0; i < sigBytes.length; i++) {
binary += String.fromCharCode(sigBytes[i]);
}
return btoa(binary)
.replace(/\+/g, '-')
.replace(/\//g, '_');
};
```
---
Any help validating whether this matches the expected Polymarket L2 HMAC format would be appreciated 🙏
```
Hi everyone 👋
I’m trying to implement Polymarket CLOB L2 authentication manually in Node.js and I’m currently validating the HMAC signature generation against the official implementation:
Reference:
https://raw.githubusercontent.com/Polymarket/clob-client-v2/refs/heads/main/src/signing/hmac.ts
---
## Signature generation code
```js
const decode_base64_secret = (secret) => {
const normalized = secret.replace(/-/g, '+').replace(/_/g, '/');
const padded = normalized + '='.repeat((4 - (normalized.length % 4)) % 4);
const binary = atob(padded);
const buffer = new ArrayBuffer(binary.length);
const bytes = new Uint8Array(buffer);
for (let i = 0; i < binary.length; i++) {
bytes[i] = binary.charCodeAt(i);
}
return bytes;
};
export const polymarket_signature = async (timestamp, method, path, body) => {
let message = timestamp + method + path;
if (body !== undefined) message += body;
const keyBytes = decode_base64_secret(POLYMARKET_SECRET);
const key = await crypto.subtle.importKey(
'raw',
keyBytes,
{ name: 'HMAC', hash: 'SHA-256' },
false,
['sign']
);
const sigBuffer = await crypto.subtle.sign(
'HMAC',
key,
new TextEncoder().encode(message)
);
const sigBytes = new Uint8Array(sigBuffer);
let binary = '';
for (let i = 0; i < sigBytes.length; i++) {
binary += String.fromCharCode(sigBytes[i]);
}
return btoa(binary)
.replace(/\+/g, '-')
.replace(/\//g, '_');
};
```
---
Any help validating whether this matches the expected Polymarket L2 HMAC format would be appreciated 🙏
```