Create a withdrawal draft
/v1/blockchain-manager/order/withdrawal/draftCreates a draft withdrawal order that must be accepted before it is submitted to the
blockchain. The draft takes the destination address, network, tag and fees from the address
book entry referenced by addressBookId, and debits the user's pocket of that currency with the
highest balance; the caller only specifies how much to withdraw, either in the cryptocurrency or
in a fiat currency.
Checks the balance (including the network fee), the minimum amount for the network and that the
user is allowed to withdraw. Nothing is debited yet. The draft expires at expiresAt; after that
it cannot be accepted and a new one has to be created.
Authorization
ApiKeyAuth For accessing these endpoints a valid API key must be sent in the X-Api-Key header.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request to create a withdrawal draft. The destination address, network, tag, source pocket
and fees are taken from the address book entry referenced by addressBookId.
The caller only specifies how much to withdraw.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl --request POST \ --url 'https://gateway.bit2me.com/v1/blockchain-manager/order/withdrawal/draft' \ --header 'Content-Type: application/json' \ --data '{ "addressBookId": "550e8400-e29b-41d4-a716-446655440000", "amount": { "currency": "BTC", "value": "0.5" }}'{ "addressBookId": "550e8400-e29b-41d4-a716-446655440000", "amount": "0.5", "currency": "BTC", "denomination": { "amount": "0.5", "currency": "BTC", "price": "1" }, "destinationAddress": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh", "draftId": "550e8400-e29b-41d4-a716-446655440010", "expiresAt": "2026-06-02T12:00:30.000Z", "network": "bitcoin", "networkFee": "0.0001", "tag": null, "totalAmount": "0.5001", "walletPocketId": "550e8400-e29b-41d4-a716-446655440002"}Get address book entry GET
Returns the details of a single address book entry of the authenticated user, identified by its UUID. Only entries in `validating` or `verified` state can be retrieved.
Accept a withdrawal draft POST
Confirms and submits a previously created withdrawal draft, creating the actual withdrawal order on the blockchain. The draft must belong to the authenticated user and must not have expired. Every acceptance requires a second-factor code in the `x-totp` header. The first request is usually sent without it and answered with `428`: * For stablecoin withdrawals, the `428` means a code has just been sent to the user, and its body says through which channel (`sfaType`) and which phone channels are available (`availableChannels`, `defaultChannel`). * For any other currency, the `428` only says that the code is needed. Then repeat the same request with the code in `x-totp` and the channel it came through in `x-totp-type`. A wrong code returns `420` and nothing is executed.