docs: sync with official Polymarket docs - 2026-04-20

This commit is contained in:
Etherdrake
2026-04-20 01:19:37 +02:00
parent 3ad0048c35
commit ff4882db02
50 changed files with 705 additions and 1857 deletions
+9 -33
View File
@@ -13,7 +13,7 @@ L2 methods require the client to initialize with a signer, signature type, API c
<Tabs>
<Tab title="TypeScript">
```typescript theme={null}
import { ClobClient } from "@polymarket/clob-client";
import { ClobClient } from "@polymarket/clob-client-v2";
import { Wallet } from "ethers";
const signer = new Wallet(process.env.PRIVATE_KEY);
@@ -24,14 +24,14 @@ L2 methods require the client to initialize with a signer, signature type, API c
passphrase: process.env.PASSPHRASE,
};
const client = new ClobClient(
"https://clob.polymarket.com",
137,
const client = new ClobClient({
host: "https://clob.polymarket.com",
chain: 137,
signer,
apiCreds,
2, // GNOSIS_SAFE
process.env.FUNDER_ADDRESS
);
creds: apiCreds,
signatureType: 2, // GNOSIS_SAFE
funderAddress: process.env.FUNDER_ADDRESS,
});
// Ready to send authenticated requests
const order = await client.postOrder(signedOrder);
@@ -52,7 +52,7 @@ L2 methods require the client to initialize with a signer, signature type, API c
client = ClobClient(
host="https://clob.polymarket.com",
chain_id=137,
chain=137,
key=os.getenv("PRIVATE_KEY"),
creds=api_creds,
signature_type=2, # GNOSIS_SAFE
@@ -101,22 +101,10 @@ async createAndPostOrder(
The side of the order (buy or sell).
</ResponseField>
<ResponseField name="feeRateBps" type="number">
Optional fee rate in basis points.
</ResponseField>
<ResponseField name="nonce" type="number">
Optional nonce for the order.
</ResponseField>
<ResponseField name="expiration" type="number">
Optional expiration timestamp for the order.
</ResponseField>
<ResponseField name="taker" type="string">
Optional taker address.
</ResponseField>
<ResponseField name="tickSize" type="TickSize">
Tick size for the order. One of `"0.1"`, `"0.01"`, `"0.001"`, `"0.0001"`.
</ResponseField>
@@ -187,18 +175,6 @@ async createAndPostMarketOrder(
Optional price hint for the market order.
</ResponseField>
<ResponseField name="feeRateBps" type="number">
Optional fee rate in basis points.
</ResponseField>
<ResponseField name="nonce" type="number">
Optional nonce for the order.
</ResponseField>
<ResponseField name="taker" type="string">
Optional taker address.
</ResponseField>
<ResponseField name="orderType" type="OrderType.FOK | OrderType.FAK">
Optional order type override. Defaults to FOK.
</ResponseField>