Withdraw Tokens
Allow holders to withdraw their tokens to an external wallet address.
POSTapi.metal.build/holder/:address/withdraw
Withdraw tokens
This endpoint initiates a token withdrawal for a holder.
Required attributes
- Name
amount
- Type
- number
- Description
The amount of tokens to withdraw.
- Name
sendTo
- Type
- string
- Description
The wallet address to receive the withdrawn tokens.
Request
POST
api.metal.build/holder/:address/withdrawcurl https://api.metal.build/holder/0xabcdef1234567890abcdef1234567890abcdef12/withdraw \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR-API-KEY" \
-d '{
"amount": "1000000000000000000000",
"sendTo": "0x7890abcdef1234567890abcdef1234567890abcd"
}'
Response
{
"jobId": "e20b21ec-10ca-5756-938c-855e78add351",
"status": "pending"
}
GETapi.metal.build/holder/:address/withdraw/status/:jobId
Status
This endpoint will return the status of your withdrawal request.
Required attributes
- Name
jobId
- Type
- string
- Description
Job ID of the withdrawal request.
Request
GET
api.metal.build/holder/:address/withdraw/status/:jobIdcurl https://api.metal.build/holder/0xabcdef1234567890abcdef1234567890abcdef12/withdraw/status/e20b21ec-10ca-5756-938c-855e78add351 \
-H "x-api-key: YOUR-API-KEY"
Pending Response
{
"jobId": "e20b21ec-10ca-5756-938c-855e78add351",
"status": "pending"
}
Successful Response
{
"jobId": "e20b21ec-10ca-5756-938c-855e78add351",
"status": "success"
}