For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /api/gateway/create-paper-withdrawal.md.
Remove test funds (paper trading only)
POST/paper/withdrawals
Paper-trading environments only. This endpoint is not served in production, where it answers 404.
Sends test funds of the DeFi listing asset_id out of the caller's paper wallet. Only the wallet's unallocated balance can leave it, so when the wallet cannot cover the request, allocated balance is first released from CeFi trading through POST /cefi/releases, returned in release, and the request waits up to 20 seconds for it to free the funds.
With amount omitted, the wallet is emptied: everything the caller has allocated of the listing on CeFi is released first, then the whole wallet balance leaves. With amount given, CeFi is released from only when the wallet's unallocated balance falls short, and by at most amount. The CeFi release is capped at the caller's allocation of the listing; when omitting amount, any CeFi balance beyond that allocation stays on CeFi and is reported in cefi_unbacked.
When the release has not freed the funds within the wait, the request answers 409 with code release_settling and metadata.release_id; retry shortly. A wallet that still cannot cover the request with nothing left on CeFi answers 422 with code insufficient_balance or funds_allocated.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- 500
- 503
Test funds removed from the wallet
Bad request
Unauthorized
Forbidden. On order creation this also covers an asset that is not available to trade from the country the request came from.
Not found
Conflict
Request is well-formed but cannot be processed (e.g. leverage missing or out of range for a perp order)
Internal server error
Service unavailable