Iniciar Saque
curl --request POST \
--url https://api.example.com/api/v1/onchain/withdraw/initiate \
--header 'Content-Type: application/json' \
--data '
{
"toAddress": "<string>",
"value": 123,
"token": "<string>",
"network": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/onchain/withdraw/initiate"
payload = {
"toAddress": "<string>",
"value": 123,
"token": "<string>",
"network": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({toAddress: '<string>', value: 123, token: '<string>', network: '<string>'})
};
fetch('https://api.example.com/api/v1/onchain/withdraw/initiate', 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.example.com/api/v1/onchain/withdraw/initiate",
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([
'toAddress' => '<string>',
'value' => 123,
'token' => '<string>',
'network' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.example.com/api/v1/onchain/withdraw/initiate"
payload := strings.NewReader("{\n \"toAddress\": \"<string>\",\n \"value\": 123,\n \"token\": \"<string>\",\n \"network\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/api/v1/onchain/withdraw/initiate")
.header("Content-Type", "application/json")
.body("{\n \"toAddress\": \"<string>\",\n \"value\": 123,\n \"token\": \"<string>\",\n \"network\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/onchain/withdraw/initiate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"toAddress\": \"<string>\",\n \"value\": 123,\n \"token\": \"<string>\",\n \"network\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"transactionHash": "<string>",
"success": true
}Onchain
Iniciar Saque
Inicie uma transação de saque para um endereço externo
POST
/
api
/
v1
/
onchain
/
withdraw
/
initiate
Iniciar Saque
curl --request POST \
--url https://api.example.com/api/v1/onchain/withdraw/initiate \
--header 'Content-Type: application/json' \
--data '
{
"toAddress": "<string>",
"value": 123,
"token": "<string>",
"network": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/onchain/withdraw/initiate"
payload = {
"toAddress": "<string>",
"value": 123,
"token": "<string>",
"network": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({toAddress: '<string>', value: 123, token: '<string>', network: '<string>'})
};
fetch('https://api.example.com/api/v1/onchain/withdraw/initiate', 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.example.com/api/v1/onchain/withdraw/initiate",
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([
'toAddress' => '<string>',
'value' => 123,
'token' => '<string>',
'network' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.example.com/api/v1/onchain/withdraw/initiate"
payload := strings.NewReader("{\n \"toAddress\": \"<string>\",\n \"value\": 123,\n \"token\": \"<string>\",\n \"network\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/api/v1/onchain/withdraw/initiate")
.header("Content-Type", "application/json")
.body("{\n \"toAddress\": \"<string>\",\n \"value\": 123,\n \"token\": \"<string>\",\n \"network\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/onchain/withdraw/initiate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"toAddress\": \"<string>\",\n \"value\": 123,\n \"token\": \"<string>\",\n \"network\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"transactionHash": "<string>",
"success": true
}Iniciar transação de saque
Este endpoint inicia uma transação de saque da carteira do usuário para um endereço específico na blockchain.Requisição
string
required
Endereço de carteira de destino
number
required
O valor a ser sacado
string
O token a ser sacado (padrão: USDT)Valores possíveis:
USDT, USDC, DAI, BUSDstring
required
A rede blockchain para a transaçãoValores possíveis:
bsc, polygonExemplo de requisição
curl -X POST "https://server.cryptouse.com.br/api/v1/onchain/withdraw/initiate" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer seu_token_aqui" \
-d '{
"toAddress": "0x1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t",
"value": 50.00,
"token": "USDT",
"network": "bsc"
}'
Resposta
string
Mensagem de sucesso
string
O hash da transação na blockchain
boolean
Indica se o saque foi bem-sucedido
Exemplo de resposta
{
"message": "Saque iniciado com sucesso",
"transactionHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"success": true
}
{
"message": "Dados inválidos na requisição",
"error": "Saldo insuficiente para o saque"
}
{
"message": "Chave de API inválida ou não autorizada"
}
{
"message": "Ocorreu um erro ao processar sua solicitação",
"success": false
}
Taxas de saque
Cada saque inclui duas taxas:- Taxa de rede: Custo da transação na blockchain (gas)
- Taxa de serviço: Taxa cobrada pela CryptoUse (0.5% do valor sacado)
valor_do_saque + taxa_de_rede + taxa_de_serviço
Limites de saque
| Tipo de conta | Limite diário | Limite por transação |
|---|---|---|
| Padrão | R$ 10.000 | R$ 5.000 |
| Verificada | R$ 50.000 | R$ 10.000 |
| Empresarial | R$ 100.000 | R$ 25.000 |
Notas
- As transações de saque são irreversíveis após confirmação na blockchain
- O tempo de processamento varia de acordo com a rede blockchain selecionada
- Você receberá uma notificação quando a transação for confirmada na blockchain
- Saques para endereços de exchange podem exigir um campo memo/tag que deve ser incluído no endereço
