Skip to main content
Order attribution credits trades to your builder account by attaching your builder code to every order. This enables:

Builder Code

Your builder code is a bytes32 identifier tied to your builder profile. Find it at polymarket.com/settings?tab=builder. That’s the only credential you need for attribution — no HMAC signing, no separate API key, no special headers.
Builder codes are public identifiers — they appear onchain in the builder field of every order you attribute. Only you control which orders include your code, so keep it scoped to apps you own.

Attaching the Builder Code

Pass builderCode in the order struct on every order you submit. The SDK serializes it into the onchain order’s builder field, and the protocol attributes every matched trade to your profile.
import { ClobClient, Side, OrderType } from "@polymarket/clob-client-v2";

const client = new ClobClient({
  host: "https://api.copilot.markets/clob",
  chain: 137,
  signer,
  creds: apiCreds,
  signatureType: 2,
  funderAddress,
});

const response = await client.createAndPostOrder(
  {
    tokenID: "0x...",
    price: 0.55,
    size: 100,
    side: Side.BUY,
    builderCode: "0xabc123...", // your builder code from polymarket.com/settings?tab=builder
  },
  { tickSize: "0.01", negRisk: false },
  OrderType.GTC,
);
Every order placed with builderCode attached is credited to your builder profile — no additional configuration needed.

Verifying Attribution

Query trades attributed to your builder code:
const trades = await client.getBuilderTrades();

// Filtered by market
const marketTrades = await client.getBuilderTrades({
  market: "0xbd31dc8a...",
});
Each BuilderTrade includes: id, market, assetId, side, size, price, status, outcome, owner, maker, builder, transactionHash, matchTime, fee, and feeUsdc.

Troubleshooting

  • Confirm your builderCode is correctly attached to every order
  • Check that orders are being matched (not just placed)
  • Allow up to 24 hours for volume to appear on the leaderboard
Verify the code matches what’s shown on your Builder Profile. Builder codes are bytes32 hex values starting with 0x.

Next Steps

Builder Program

Learn about the Builder Program tiers and rewards

Create Orders

Build, sign, and submit orders