Ana içeriğe atla
POST
/
autoWithdraw
curl --request POST \
  --url https://doc-api.oppiwallet.com/api/v1/autoWithdraw \
  --header 'signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
  --header 'Content-Type: application/json' \
  --data '{
    "currency": "6698aec7f188ae24c673da1c",
    "amount": "0.01",
    "address": "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07",
    "orderId": "order_12345"
  }'
const axios = require('axios');

let data = JSON.stringify({
  "currency": "6698aec7f188ae24c673da1c",
  "amount": "0.01",
  "address": "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07",
  "orderId": "order_12345"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://doc-api.oppiwallet.com/api/v1/autoWithdraw',
  headers: { 
    'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
    'Content-Type': 'application/json'
  },
  data: data
};

axios.request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data));
  })
  .catch((error) => {
    console.log(error);
  });
import requests

url = "https://doc-api.oppiwallet.com/api/v1/autoWithdraw"

headers = {
    "signatureToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "Content-Type": "application/json"
}

data = {
    "currency": "6698aec7f188ae24c673da1c",
    "amount": "0.01",
    "address": "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07",
    "orderId": "order_12345"
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {
    url := "https://doc-api.oppiwallet.com/api/v1/autoWithdraw"

    data := map[string]string{
        "currency": "6698aec7f188ae24c673da1c",
        "amount":   "0.01",
        "address":  "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07",
        "orderId":  "order_12345",
    }

    jsonData, _ := json.Marshal(data)

    req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
    req.Header.Add("signatureToken", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...")
    req.Header.Add("Content-Type", "application/json")

    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}
<?php
$curl = curl_init();

$data = [
    "currency" => "6698aec7f188ae24c673da1c",
    "amount" => "0.01",
    "address" => "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07",
    "orderId" => "order_12345"
];

curl_setopt_array($curl, [
  CURLOPT_URL => "https://doc-api.oppiwallet.com/api/v1/autoWithdraw",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "Content-Type: application/json"
  ],
  CURLOPT_POSTFIELDS => json_encode($data),
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
const axios = require('axios');

let data = JSON.stringify({
  "currency": "6698aec7f188ae24c673da1c",
  "amount": "0.01",
  "address": "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07",
  "orderId": "order_12345"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://doc-api.oppiwallet.com/api/v1/autoWithdraw',
  headers: { 
    'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
    'Content-Type': 'application/json'
  },
  data: data
};

axios.request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data));
  })
  .catch((error) => {
    console.log(error);
  });
{
  "message": "Para çekme talebiniz başarıyla gönderildi.",
  "transactionId": "0866f8-4a53-4579-9274-351ec868a627"
}
{
  "message": "Hata mesajı"
}
{
  "message": "Para çekme işleminiz başarısız oldu.",
  "transactionId": "0866f8-4a53-4579-9274-351ec868a627"
}

Talimatlar

Kaynak Kod

Gerekli Gereksinimler

  • Linux Sunucusu
  • Node JS (v18.19.1 veya daha yeni)

Kurulum

  • config.json dosyasını açın ve mnemonic, apiKey, encKey değerlerini değiştirin.
  • node pair.js komutunu kullanarak pair.js dosyasını çalıştırın. Bu işlem gerekli paketleri yükleyecektir.
  • Ardından sunucunuzda crypto.ts dosyasını başlatmanız gerekir.

Kimlik Doğrulama

signatureToken
string
gerekli
API kimlik doğrulaması için bir JWT token gereklidir. Boş bir dize kullanarak JWT Token Oluşturma bölümünde açıklandığı gibi bir JWT token oluşturun.

Başlıklar (Headers)

Content-Type
string
gerekli
application/json olarak ayarlanmalıdır.

İstek Gövdesi

currency
string
gerekli
Varlık para birimi kimliği.
amount
string
gerekli
İşlem için miktarı belirtin.
address
string
gerekli
Fonların gönderileceği harici adres.
orderId
string
gerekli
İsteğinize orderId parametresini referans olarak ekleyin.
curl --request POST \
  --url https://doc-api.oppiwallet.com/api/v1/autoWithdraw \
  --header 'signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
  --header 'Content-Type: application/json' \
  --data '{
    "currency": "6698aec7f188ae24c673da1c",
    "amount": "0.01",
    "address": "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07",
    "orderId": "order_12345"
  }'
const axios = require('axios');

let data = JSON.stringify({
  "currency": "6698aec7f188ae24c673da1c",
  "amount": "0.01",
  "address": "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07",
  "orderId": "order_12345"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://doc-api.oppiwallet.com/api/v1/autoWithdraw',
  headers: { 
    'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
    'Content-Type': 'application/json'
  },
  data: data
};

axios.request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data));
  })
  .catch((error) => {
    console.log(error);
  });
import requests

url = "https://doc-api.oppiwallet.com/api/v1/autoWithdraw"

headers = {
    "signatureToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "Content-Type": "application/json"
}

data = {
    "currency": "6698aec7f188ae24c673da1c",
    "amount": "0.01",
    "address": "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07",
    "orderId": "order_12345"
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {
    url := "https://doc-api.oppiwallet.com/api/v1/autoWithdraw"

    data := map[string]string{
        "currency": "6698aec7f188ae24c673da1c",
        "amount":   "0.01",
        "address":  "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07",
        "orderId":  "order_12345",
    }

    jsonData, _ := json.Marshal(data)

    req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
    req.Header.Add("signatureToken", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...")
    req.Header.Add("Content-Type", "application/json")

    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(string(body))
}
<?php
$curl = curl_init();

$data = [
    "currency" => "6698aec7f188ae24c673da1c",
    "amount" => "0.01",
    "address" => "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07",
    "orderId" => "order_12345"
];

curl_setopt_array($curl, [
  CURLOPT_URL => "https://doc-api.oppiwallet.com/api/v1/autoWithdraw",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "Content-Type: application/json"
  ],
  CURLOPT_POSTFIELDS => json_encode($data),
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
const axios = require('axios');

let data = JSON.stringify({
  "currency": "6698aec7f188ae24c673da1c",
  "amount": "0.01",
  "address": "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07",
  "orderId": "order_12345"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://doc-api.oppiwallet.com/api/v1/autoWithdraw',
  headers: { 
    'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
    'Content-Type': 'application/json'
  },
  data: data
};

axios.request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data));
  })
  .catch((error) => {
    console.log(error);
  });

Yanıt

Başarılı bir istek üzerine başarı mesajı döndürür.
message
string
gerekli
Çekim talebi için başarı mesajı.
transactionId
string
gerekli
İşlem için benzersiz tanımlayıcı.
{
  "message": "Para çekme talebiniz başarıyla gönderildi.",
  "transactionId": "0866f8-4a53-4579-9274-351ec868a627"
}
{
  "message": "Hata mesajı"
}
{
  "message": "Para çekme işleminiz başarısız oldu.",
  "transactionId": "0866f8-4a53-4579-9274-351ec868a627"
}