cURL
curl --request POST \
--url https://api.relay.link/withdrawals/request \
--header 'Content-Type: application/json' \
--data '
{
"chainId": "<string>",
"currency": "<string>",
"amount": "<string>",
"ownerChainId": "<string>",
"owner": "<string>",
"recipient": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
chainId: '<string>',
currency: '<string>',
amount: '<string>',
ownerChainId: '<string>',
owner: '<string>',
recipient: '<string>'
})
};
fetch('https://api.relay.link/withdrawals/request', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.relay.link/withdrawals/request"
payload = {
"chainId": "<string>",
"currency": "<string>",
"amount": "<string>",
"ownerChainId": "<string>",
"owner": "<string>",
"recipient": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Withdrawals
Request Withdrawal
Prepare or execute a user-triggered withdrawal from the Relay Depository
POST
/
withdrawals
/
request
cURL
curl --request POST \
--url https://api.relay.link/withdrawals/request \
--header 'Content-Type: application/json' \
--data '
{
"chainId": "<string>",
"currency": "<string>",
"amount": "<string>",
"ownerChainId": "<string>",
"owner": "<string>",
"recipient": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
chainId: '<string>',
currency: '<string>',
amount: '<string>',
ownerChainId: '<string>',
owner: '<string>',
recipient: '<string>'
})
};
fetch('https://api.relay.link/withdrawals/request', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.relay.link/withdrawals/request"
payload = {
"chainId": "<string>",
"currency": "<string>",
"amount": "<string>",
"ownerChainId": "<string>",
"owner": "<string>",
"recipient": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)How do programmatic withdrawals work?
Call this endpoint twice per withdrawal: first without
signature to prepare (returns the nonce, validated amount, and any additionalData to sign), then with the nonce and owner signature to execute (returns a jobId). chainId and ownerChainId are protocol chain slugs, not numeric ids. These endpoints power relay.link/withdraw and are not yet a versioned API surface.Body
application/json
Minimum string length:
1Minimum string length:
1Pattern:
^[0-9]+$Minimum string length:
1Minimum string length:
1Minimum string length:
1Response
200
Default Response
Was this page helpful?