Withdraw

Withdraw funds from user account

post

Withdraws funds from the user's account to the specified address.

Header parameters
x-api-keystringRequired

API key for authentication.

Example: your-api-key
Body
protocolstringOptional

The protocol for the withdrawal.

Example: bitcoin
tokenstringOptional

The token for the withdrawal.

Example: BTC
amountnumberOptional

The amount to withdraw.

Example: 0.5
addressstringOptional

The address to withdraw to.

Example: bc1qh3rp2pns6nrr8mhx0rlzd5kktwm33wc4ax0h4y
Responses
200
Successfully created the withdrawal request.
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
}