curl --request GET \
--url 'https://doc-api.oppiwallet.com/api/v1/balance/6698aec7f188ae24c673da1c' \
--header 'signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: application/json'
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://doc-api.oppiwallet.com/api/v1/balance/6698aec7f188ae24c673da1c',
headers: {
'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
'Content-Type': 'application/json'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import requests
currency_id = "6698aec7f188ae24c673da1c"
url = f"https://doc-api.oppiwallet.com/api/v1/balance/{currency_id}"
headers = {
"signatureToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.json())
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://doc-api.oppiwallet.com/api/v1/balance/6698aec7f188ae24c673da1c"
req, _ := http.NewRequest("GET", url, nil)
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();
$currencyId = "6698aec7f188ae24c673da1c";
curl_setopt_array($curl, [
CURLOPT_URL => "https://doc-api.oppiwallet.com/api/v1/balance/{$currencyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
{
"balance": 0.564333586
}
{
"message": "Hata mesajı"
}
{
"message": "Para birimi bulunamadı"
}
Uç Noktalar
Cüzdan Bakiyesi
Bu API, kullanıcının cüzdan bakiyesini almak için kullanılır.
GET
/
v1
/
balance
/
{currencyId}
curl --request GET \
--url 'https://doc-api.oppiwallet.com/api/v1/balance/6698aec7f188ae24c673da1c' \
--header 'signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: application/json'
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://doc-api.oppiwallet.com/api/v1/balance/6698aec7f188ae24c673da1c',
headers: {
'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
'Content-Type': 'application/json'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import requests
currency_id = "6698aec7f188ae24c673da1c"
url = f"https://doc-api.oppiwallet.com/api/v1/balance/{currency_id}"
headers = {
"signatureToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.json())
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://doc-api.oppiwallet.com/api/v1/balance/6698aec7f188ae24c673da1c"
req, _ := http.NewRequest("GET", url, nil)
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();
$currencyId = "6698aec7f188ae24c673da1c";
curl_setopt_array($curl, [
CURLOPT_URL => "https://doc-api.oppiwallet.com/api/v1/balance/{$currencyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
{
"balance": 0.564333586
}
{
"message": "Hata mesajı"
}
{
"message": "Para birimi bulunamadı"
}
Kimlik Doğrulama
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)
string
gerekli
application/json olarak ayarlanmalıdır.Yol Parametreleri (Path Parameters)
string
gerekli
Bakiyesini almak istediğiniz para biriminin kimliği.
İstek
Bu uç nokta için bir istek gövdesi gerekli değildir.curl --request GET \
--url 'https://doc-api.oppiwallet.com/api/v1/balance/6698aec7f188ae24c673da1c' \
--header 'signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: application/json'
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://doc-api.oppiwallet.com/api/v1/balance/6698aec7f188ae24c673da1c',
headers: {
'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
'Content-Type': 'application/json'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import requests
currency_id = "6698aec7f188ae24c673da1c"
url = f"https://doc-api.oppiwallet.com/api/v1/balance/{currency_id}"
headers = {
"signatureToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.json())
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://doc-api.oppiwallet.com/api/v1/balance/6698aec7f188ae24c673da1c"
req, _ := http.NewRequest("GET", url, nil)
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();
$currencyId = "6698aec7f188ae24c673da1c";
curl_setopt_array($curl, [
CURLOPT_URL => "https://doc-api.oppiwallet.com/api/v1/balance/{$currencyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
Yanıt
Belirtilen para birimi için mevcut bakiyeyi döndürür.number
gerekli
Belirtilen para birimi için cüzdandaki mevcut bakiye.
{
"balance": 0.564333586
}
{
"message": "Hata mesajı"
}
{
"message": "Para birimi bulunamadı"
}
⌘I