python -m venv venv
source venv/bin/activatepip install -r requirements.txtExport your private key from your wallet (e.g., MetaMask):
- Open MetaMask
- Click the three dots → Account Details
- Click Show Private Key
- Enter your password and copy the key
Get your Polymarket proxy wallet address from the UI:
- Go to polymarket.com
- Click on your profile → Settings
- Click Deposit
- Copy the Deposit Address - this is your
FUNDER_ADDRESS
Create a .env file in the project root:
touch .envAdd your private key and funder address:
PRIVATE_KEY=0x_your_private_key_here
FUNDER_ADDRESS=0x_your_deposit_address_here
Run the script to generate Polymarket API credentials:
python utils/getApiStuff.pyThis will output:
API_KEY=xxx
API_SECRET=xxx
API_PASSPHRASE=xxx
Add the generated credentials to your .env file:
PRIVATE_KEY=0x_your_private_key_here
FUNDER_ADDRESS=0x_your_deposit_address_here
API_KEY=your_api_key
API_SECRET=your_api_secret
API_PASSPHRASE=your_api_passphrase
Test your API keys:
python testUtils/getBalanceTest.py.env file or share your private key.
- The
.envfile is already in.gitignore - Use a dedicated wallet with limited funds for trading bots
- API keys don't expire but can be regenerated
| Type | Description |
|---|---|
0 |
EOA (direct wallet) |
1 |
Polymarket proxy wallet |
2 |
Polymarket browser/magic wallet |
Most users who trade via polymarket.com use type 2.