null
Source: https://docs.polymarket.com/developers/CLOB/clients
Polymarket has implemented reference clients that allow programmatic use of the API below:
clob-client (Typescript)
py-clob-client (Python)
pythonpip install py-clob-client from py_clob_client.client import ClobClient host: str = "" key: str = "" chain_id: int = 137 ### Initialization of a client that trades directly from an EOA client = ClobClient(host, key=key, chain_id=chain_id) ### Initialization of a client using a Polymarket Proxy associated with an Email/Magic account client = ClobClient(host, key=key, chain_id=chain_id, signature_type=1, funder=POLYMARKET_PROXY_ADDRESS) ### Initialization of a client using a Polymarket Proxy associated with a Browser Wallet(Metamask, Coinbase Wallet, etc) client = ClobClient(host, key=key, chain_id=chain_id, signature_type=2, funder=POLYMARKET_PROXY_ADDRESS)javascript//npm install @polymarket/clob-client //npm install ethers //Client initialization example and dumping API Keys import { ApiKeyCreds, ClobClient} from "@polymarket/clob-client"; import { Wallet } from "@ethersproject/wallet"; const host = 'https://clob.polymarket.com'; const funder = '';//This is your Polymarket Profile Address, where you send UDSC to. const signer = new Wallet(""); //This is your Private Key. If using email login export from https://reveal.magic.link/polymarket otherwise export from your Web3 Application //In general don't create a new API key, always derive or createOrDerive const creds = new ClobClient(host, 137, signer).createOrDeriveApiKey(); //0: EOA //1: Magic/Email Login //2: Metamask const signatureType = 1; (async () => { const clobClient = new ClobClient(host, 137, signer, await creds, signatureType, funder); })