Audience: developers. This is a hands-on, copy-paste guide. For eligibility, agreements, and the business setup, see ISVs / IBs and Partner Onboarding.
- Authenticated with the API as your Firm — your only credential; every action after this is on behalf of a participant
- Onboarded a Retail Participant via KYC and captured their trading account
- Funded their account with a deposit transfer from your partner funding account
- Placed a FOK limit order with a declared vendor fee on their behalf
- Seen where the money moves — and how fees are collected later
Prerequisites: Complete Partner Onboarding to receive your Client ID and register your public key, and have your funding relationship configured (Partner Funding is Beta, enabled per partner). This guide uses pre-production (
api.preprod.polymarketexchange.com).Step 1: Authenticate
Authentication uses Private Key JWT — you sign a JWT with your private key and exchange it for a short-lived access token. The full mechanism, claims, and key rotation are covered in the Authentication guide; the complete, runnable token code is in the full script at the bottom of this page. Once you have a token, set your auth header and confirm your identity withGET /v1/whoami:
Your Firm authenticates; it never trades or holds funds. The Firm identity above is a permissions container — every trading action in this guide is performed on behalf of a Retail Participant. Participant-scoped REST calls (positions, reports) identify them with the
x-participant-id header — see Authentication → Acting on behalf of a participant. Partner order entry and transfers carry the participant’s provisioned DCM trading account in the request body. You’ll capture both identifiers in Step 2.Step 2: Onboard a participant (KYC)
Before you can fund an account or place an order for a Retail Participant, they must pass KYC. Submit their identity data withPOST /v1/kyc/start:
kyc.approved event, which carries the two identifiers you need:
provisioned_participant(e.g.firms/ISV-Participant-Acme/users/user-123) — thex-participant-idvalue for participant-scoped REST calls.- The participant’s provisioned DCM trading account — use it as
order.accountforCreateVendorOrder,participant_account_idfor transfers, and the account identity on Drop Copy and reconciliation records.
The account is provisioned with a $0 balance. The participant can trade as soon as you fund it — the next step.
Step 3: Fund the account (deposit transfer)
When the participant allocates wallet funds to trading, mirror the allocation onto the platform with aDEPOSIT transfer — partner funding account → participant account. The transfer API is gRPC-only (CashMovementService):
workflow_id; the transfer read model does not echo participant_account_id, external_reference, or memo. Wait until the workflow is CONFIRMED before placing the order. If it remains PENDING, recover the same workflow rather than creating another; if it is AMBIGUOUS, replay the identical request with the same idempotency key. Once confirmed, the participant has $500 of buying power — seconds after they allocated it in their wallet. See Transfers for recovery, terminal statuses, and rate-limit handling.
Step 4: Pick a market and instrument
Discover a market with the Market API, then confirm the one you want:symbol, not the market slug. Use the Reference Data API to obtain the selected instrument’s symbol, priceScale, fractionalQtyScale, tick size, and minimum quantity. Validate the participant’s price and quantity against that metadata before submitting.
The embedded public order uses fixed-point integers. The priceScale and fractionalQtyScale values published by Reference Data are the multipliers:
100, making $0.45 equal to 45, 100 shares equal to 10000, and “spend $20” equal to 2000.
Step 5: Estimate cost and gate buying power
Placement returns no economics. The exchange is authoritative and checks that account cash covers worst-case collateral plus the applicable exchange fee. Your system must additionally subtract accrued, uncollected vendor fees:cash_order_qty is the requested maximum spend. Add the maximum exchange fee from the fee schedule. If you need an informational server-side preview, call the optional public polymarket.v1.OrderEntryAPI/PreviewOrder with the same public order shape. It is not a locked quote; the exchange validates again at placement.
Step 6: Place the order
CreateVendorOrder is the static-model order RPC partners should use. It embeds the public polymarket.v1.InsertOrderRequest, adds your declared vendor fee and idempotency key, and returns a durable order outcome. There is no separate customer-account field: the customer is identified solely by order.account.
order.user, order.session_id, non-FOK time-in-force values, non-default good_till_time, and every unsupported feature are rejected with INVALID_ARGUMENT naming the offending field. See the supported-fields table and the cash-order example.
Handle all three durable outcomes:
The service guarantees at most one order per idempotency key — retrying with the same key can never place a duplicate order or double-charge the declared vendor fee. On transport errors (
UNAVAILABLE, timeouts), also retry the identical request with the same key and clord_id. Match the participant’s Drop Copy activity by order.account and clord_id. See idempotency and retries and the funding request lifecycle.
Step 7: Watch the money
Every cash event is visible in real time — this is how your backend keeps its books and its buying-power gate current:- The deposit transfer appears on the Balance Ledger Stream for the participant account and your funding account.
- Fills arrive on the Drop Copy Stream; per-execution exchange fees and settlement credits land on the ledger.
- Trading proceeds stay in the account — settlement credits and realized profit simply increase the participant’s buying power. Nothing needs to move after fills or settlements.
- Persist the response’s
correlationidentifiers withorder.account,clord_id, and the exchange order ID. They tie ledger entries and vendor-fee reporting back to the placement workflow.
Scaling note — per-account balance streams are provided now for accelerated development. The balance ledger subscription is per-account, and concurrent ledger streams per firm are capped — opening one stream per participant does not scale to thousands of accounts. A firm-level balance stream delivering ledger entries for every account under your Firm on a single subscription is coming soon. Build against the per-account stream today, but plan for the firm-level stream in production — see firm-wide ledger consumption for the interim pattern.
Step 8: Fees and withdrawals — later, not per order
Two flows complete the lifecycle, and neither happens at order time:- Vendor fees: the fee you declared in Step 6 accrued as a receivable. Collect accrued fees periodically — at most once per day per participant account — with one
VENDOR_FEEStransfer per participant account, reconciled against the daily Vendor Fees report. - Withdrawals: when the participant de-allocates funds in their wallet, mirror it with a
WITHDRAWALtransfer — checking their free cash (net of accrued fees) first.
Complete example
A single runnable script covering the deposit-and-order path — including the full token exchange (see the Authentication guide for an explanation of each claim). KYC is omitted because its terminal outcome arrives on your webhook; run Step 2 once and plug in the resulting account and the instrument metadata from Step 4:polymarket.v1, polymarket.us.cashmovement.v1, and polymarket.us.orderfunding.v1 stubs are generated from API protos provided during beta enablement — contact institutional@polymarket.us if you don’t have them.
Next steps
Create Order
Request and response contract, supported examples, and retry behavior.
Order Data Model
Fixed-point values and the fail-closed launch allowlist.
Transfers
Deposits, withdrawals, vendor fee collection, and paced queues.
Partner Funding
The full model — parties, money flows, and the transfer budget.
KYC Verification
All verification outcomes and webhook handling.
Balance Ledger Stream
Track every deposit, fill, and settlement credit in real time.