---
title: "Relay a Polymarket withdrawal"
method: POST
path: "/polymarket/withdraw"
tags: ["Processing"]
---

# Relay a Polymarket withdrawal

`POST /polymarket/withdraw`

## Request

- Base URL: `https://v1.orchestrator.rhinestone.dev/deposit-processor`
- URL: `https://v1.orchestrator.rhinestone.dev/deposit-processor/polymarket/withdraw`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/rhinestonewtf/apis/deposit-service-api/docs/polymarket/withdraw/post.ts> (a function with typed inputs; its response is checked against the schema)

Submits a signed withdrawal from a Polymarket deposit wallet.

## Headers

- `x-api-key` string: API key for authentication
- `x-api-version` string: API version identifier (e.g. "2026-04.amazon"). Optional today, will become required in a future release.

## Request body

- PolymarketWithdrawRequestBody
  - `depositWallet` string, required: Ethereum address (0x followed by 40 hex characters)
  - `owner` string, required: Ethereum address (0x followed by 40 hex characters)
  - `nonce` string, required: Numeric string representing a bigint value
  - `deadline` string, required: Numeric string representing a bigint value
  - `calls` PolymarketCall[], required
    - `target` string, required: Ethereum address (0x followed by 40 hex characters)
    - `value` string, required: Numeric string representing a bigint value
    - `data` string, required: Hex-encoded string (0x followed by hex characters)
  - `signature` string, required: Hex-encoded string (0x followed by hex characters)

## Response `200`

Withdrawal relayed successfully

- PolymarketWithdrawResponse
  - `message` string, required
  - `txHash` string, required: Hex-encoded string (0x followed by hex characters)

## Other responses

- `400`: Invalid request, disallowed call, or unauthorized
- `401`: Authentication required or the presented credential is invalid.
- `403`: API key lacks required deposits scope
- `502`: Polymarket relayer rejected or failed the batch
- `503`: Polymarket builder credentials not configured

## Changes

- **2026-11-06** `aa1767d704fa`: 4 info
  - the endpoint scheme security `internalProjectBearer` was added to the API
  - the endpoint scheme security `tenantApiKey` was added to the API
  - the `header` request parameter `x-api-key` became optional
  - added the non-success response with the status `401`
- **2026-09-17** `676300ac19ff`: 4 info
  - added the optional property `code` to the response with the `400` status
  - added the optional property `code` to the response with the `403` status
  - added the optional property `code` to the response with the `502` status
  - added the optional property `code` to the response with the `503` status
- **2026-05-28** `26fe44507260`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/rhinestonewtf/apis/deposit-service-api/changes/polymarket/withdraw/post.md)

---

[API](https://skmtc.dev/rhinestonewtf/apis/deposit-service-api.md) - [All operations](https://skmtc.dev/rhinestonewtf/apis/deposit-service-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rhinestonewtf/apis/deposit-service-api/revisions/aa1767d704fa?raw)
