Withdraw
Withdraws funds from the user's account to the specified address.
Header parameters
x-api-keystringRequiredExample:
API key for authentication.
your-api-key
Body
protocolstringOptionalExample:
The protocol for the withdrawal.
bitcoin
tokenstringOptionalExample:
The token for the withdrawal.
BTC
amountnumberOptionalExample:
The amount to withdraw.
0.5
addressstringOptionalExample:
The address to withdraw to.
bc1qh3rp2pns6nrr8mhx0rlzd5kktwm33wc4ax0h4y
Responses
200
Successfully created the withdrawal request.
application/json
400
Bad request. Invalid input parameters.
application/json
500
Internal server error.
application/json
post
POST /tokenpay/user/account/withdraw HTTP/1.1
Host: api.ordinalsbot.com
x-api-key: your-api-key
Content-Type: application/json
Accept: */*
Content-Length: 104
{
"protocol": "bitcoin",
"token": "BTC",
"amount": 0.5,
"address": "bc1qh3rp2pns6nrr8mhx0rlzd5kktwm33wc4ax0h4y"
}
{
"id": "f2bcddd4-bd8d-4c88-bf8a-61be0d5b0600",
"accountId": "user123",
"protocol": "bitcoin",
"token": "BTC",
"amount": 0.5,
"address": "bc1qh3rp2pns6nrr8mhx0rlzd5kktwm33wc4ax0h4y",
"state": "pending",
"createdAt": 1721745751531
}