For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /api/gateway/create-allocation.md.
Allocate funds to CeFi
POST/cefi/allocations
Allocates amount of the caller's DeFi wallet balance to CeFi trading. This does not move tokens; to send funds out of the wallet, use POST /transfers. The tokens stay in the caller's wallet, but the allocated amount can't leave it until it is released with POST /cefi/releases. The wallet must cover everything the caller has allocated of the asset.
Answers 202 with the allocation in crediting. Poll GET /cefi/allocations/{id} until it is completed or rejected.
Only one allocation per asset_id can be in progress at a time. Another request for the same asset_id answers 409, so retrying after a lost response can't allocate twice.
asset_id is a DeFi listing from GET /assets that also trades on CeFi. A CeFi listing answers 404.
Request
Responses
- 202
- 400
- 401
- 403
- 404
- 409
- 422
- 500
- 503
Allocation accepted
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