Withdraw Onchain
curl --request POST \
--url https://api.pro.daya.co/public/v1/withdrawals/onchain \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"idempotency_key": "<string>",
"asset": "<string>",
"amount": "<string>",
"blockchain": "<string>",
"to_address": "<string>"
}
'import requests
url = "https://api.pro.daya.co/public/v1/withdrawals/onchain"
payload = {
"idempotency_key": "<string>",
"asset": "<string>",
"amount": "<string>",
"blockchain": "<string>",
"to_address": "<string>"
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
idempotency_key: '<string>',
asset: '<string>',
amount: '<string>',
blockchain: '<string>',
to_address: '<string>'
})
};
fetch('https://api.pro.daya.co/public/v1/withdrawals/onchain', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pro.daya.co/public/v1/withdrawals/onchain",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'idempotency_key' => '<string>',
'asset' => '<string>',
'amount' => '<string>',
'blockchain' => '<string>',
'to_address' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pro.daya.co/public/v1/withdrawals/onchain"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"asset\": \"<string>\",\n \"amount\": \"<string>\",\n \"blockchain\": \"<string>\",\n \"to_address\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pro.daya.co/public/v1/withdrawals/onchain")
.header("X-Api-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"asset\": \"<string>\",\n \"amount\": \"<string>\",\n \"blockchain\": \"<string>\",\n \"to_address\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pro.daya.co/public/v1/withdrawals/onchain")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotency_key\": \"<string>\",\n \"asset\": \"<string>\",\n \"amount\": \"<string>\",\n \"blockchain\": \"<string>\",\n \"to_address\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Withdrawal confirmed and processing",
"data": {
"transaction_id": "33333333-3333-3333-3333-333333333333",
"status": "processing",
"amount": "25.505555",
"asset": "USDT",
"fee": "0.750000",
"transaction_hash": "0xwithdrawaltx",
"blockchain": "polygon",
"created_at": "2026-06-05T11:00:00Z"
}
}
Withdrawals
Withdraw Onchain
Initiate an on-chain withdrawal from your Daya Pro stablecoin balance
POST
/
public
/
v1
/
withdrawals
/
onchain
Withdraw Onchain
curl --request POST \
--url https://api.pro.daya.co/public/v1/withdrawals/onchain \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"idempotency_key": "<string>",
"asset": "<string>",
"amount": "<string>",
"blockchain": "<string>",
"to_address": "<string>"
}
'import requests
url = "https://api.pro.daya.co/public/v1/withdrawals/onchain"
payload = {
"idempotency_key": "<string>",
"asset": "<string>",
"amount": "<string>",
"blockchain": "<string>",
"to_address": "<string>"
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
idempotency_key: '<string>',
asset: '<string>',
amount: '<string>',
blockchain: '<string>',
to_address: '<string>'
})
};
fetch('https://api.pro.daya.co/public/v1/withdrawals/onchain', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pro.daya.co/public/v1/withdrawals/onchain",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'idempotency_key' => '<string>',
'asset' => '<string>',
'amount' => '<string>',
'blockchain' => '<string>',
'to_address' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pro.daya.co/public/v1/withdrawals/onchain"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"asset\": \"<string>\",\n \"amount\": \"<string>\",\n \"blockchain\": \"<string>\",\n \"to_address\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pro.daya.co/public/v1/withdrawals/onchain")
.header("X-Api-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"asset\": \"<string>\",\n \"amount\": \"<string>\",\n \"blockchain\": \"<string>\",\n \"to_address\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pro.daya.co/public/v1/withdrawals/onchain")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"idempotency_key\": \"<string>\",\n \"asset\": \"<string>\",\n \"amount\": \"<string>\",\n \"blockchain\": \"<string>\",\n \"to_address\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Withdrawal confirmed and processing",
"data": {
"transaction_id": "33333333-3333-3333-3333-333333333333",
"status": "processing",
"amount": "25.505555",
"asset": "USDT",
"fee": "0.750000",
"transaction_hash": "0xwithdrawaltx",
"blockchain": "polygon",
"created_at": "2026-06-05T11:00:00Z"
}
}
Overview
Initiates an account-level on-chain withdrawal to a raw destination. The request is accepted synchronously and the withdrawal continues asynchronously on-chain. Requires Trade scope.Trade-scoped API keys authorize fund movement. Keep these keys server-side and restrict access to systems that are allowed to initiate withdrawals from the account.
Requests are idempotent on
idempotency_key. Replaying the same key returns the original transaction without creating a duplicate withdrawal.This endpoint does not manage saved withdrawal addresses. Pass the destination directly in
to_address for each request.Authentication
string
required
Your API key with Trade scope
Request Body
string
required
Caller-supplied unique key. Reuse on retry to avoid duplicate withdrawals.Example:
onchain-wd-2026-06-05-001string
required
Asset to withdraw. Asset symbols are normalized by Daya, so
usdt and USDT resolve to the same partner-facing asset when supported.Example: USDTstring
required
Withdrawal amount as a decimal string.Example:
25.505555string
required
Canonical chain key from List Onchain Withdrawal Options.Example:
polygonstring
required
Destination string for the selected blockchain. Daya forwards this value to the on-chain provider without Daya-side address-format validation, so provider-supported formats may be accepted and unsupported formats are rejected during initiation.Example:
0x1234567890abcdef1234567890abcdef12345678Request Example
curl --request POST \
--url https://api.pro.daya.co/public/v1/withdrawals/onchain \
--header 'X-Api-Key: daya_sk_YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"idempotency_key": "onchain-wd-2026-06-05-001",
"asset": "usdt",
"amount": "25.505555",
"blockchain": "polygon",
"to_address": "0x1234567890abcdef1234567890abcdef12345678"
}'
Response
string
required
Daya transaction UUID. Store this as the primary Daya reference for reconciliation and support.
string
required
Initial withdrawal status. Most accepted withdrawals return as
processing.Values: pending, processing, completed, failedstring
required
Accepted amount as a full-precision decimal string for the asset.
string
required
Canonical partner-facing asset symbol.
string
required
Withdrawal fee as a full-precision decimal string for the asset.
string
On-chain transaction hash when available from initiation. This may be omitted if the provider has not returned a hash yet.
string
Canonical chain key used for the withdrawal.
string
required
ISO 8601 timestamp when the withdrawal was accepted.
{
"success": true,
"message": "Withdrawal confirmed and processing",
"data": {
"transaction_id": "33333333-3333-3333-3333-333333333333",
"status": "processing",
"amount": "25.505555",
"asset": "USDT",
"fee": "0.750000",
"transaction_hash": "0xwithdrawaltx",
"blockchain": "polygon",
"created_at": "2026-06-05T11:00:00Z"
}
}
Error Responses
| Code | Meaning |
|---|---|
400 | Invalid asset, amount, blockchain, destination, or provider rejection during initiation |
401 | Missing or invalid API key |
402 | Insufficient balance |
403 | Missing Trade scope or account restricted |
409 | Same idempotency_key previously used with a different request body |
Notes on settlement
The response confirms the withdrawal was accepted for processing. It does not mean the recipient has received funds on-chain. Store thetransaction_id, idempotency_key, initial status, and transaction_hash when returned. Use transaction_hash for on-chain monitoring, and use transaction_id when reconciling the withdrawal with Daya support.
The public API does not expose a withdrawal-status endpoint or withdrawal-status webhook. For now, review withdrawal history and status in your Daya Pro account.