How do I initialize the CLOB client?

Users have 3 ways of initializing the CLOB client:

If trading directly from an EOA

Where:

  • host: The Polymarket CLOB endpoint https://clob.polymarket.com
  • key: The private key for the EOA that holds funds
  • chain_id: The chain ID for blockchain. 137 in most cases

If trading from an account with Email/Magic login

Where:

  • host: The Polymarket CLOB endpoint https://clob.polymarket.com
  • key: The private key exported from Magic that is associated with the account
  • chain_id: The chain ID for blockchain. 137 in most cases
  • funder: The Polymarket address associated with the email login

If trading from an account with Browser Wallet (Metamask, Coinbase Wallet)

Where:

  • host: The Polymarket CLOB endpoint https://clob.polymarket.com
  • key: The private key exported from the Browser Wallet that is associated with the account
  • chain_id: The chain ID for blockchain. 137 in most cases
  • funder: The Polymarket address associated with the browser wallet login

See CLOB documentation and these links for more information