List bank deposit accounts
curl --request GET \
--url https://api.tuyo.com/public/bank_deposit_accounts \
--header 'Authorization: Bearer <token>' \
--header 'Tuyo-API-Version: <tuyo-api-version>'import requests
url = "https://api.tuyo.com/public/bank_deposit_accounts"
headers = {
"Tuyo-API-Version": "<tuyo-api-version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Tuyo-API-Version': '<tuyo-api-version>', Authorization: 'Bearer <token>'}
};
fetch('https://api.tuyo.com/public/bank_deposit_accounts', 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.tuyo.com/public/bank_deposit_accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Tuyo-API-Version: <tuyo-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tuyo.com/public/bank_deposit_accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Tuyo-API-Version", "<tuyo-api-version>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tuyo.com/public/bank_deposit_accounts")
.header("Tuyo-API-Version", "<tuyo-api-version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tuyo.com/public/bank_deposit_accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Tuyo-API-Version"] = '<tuyo-api-version>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"accounts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currency": "<unknown>",
"paymentRails": [
"<unknown>"
],
"accountHolderName": "<string>",
"bank": {
"name": "<string>",
"address": "<string>"
},
"accountDetails": {
"type": "us",
"accountNumber": "<string>",
"routingNumber": "<string>"
},
"settlement": "<unknown>",
"minDepositAmount": "<unknown>",
"estimatedSpeed": "<unknown>"
}
],
"available": [
{
"currency": "<unknown>",
"paymentRails": "<unknown>",
"accountDetailsType": "<unknown>",
"settlement": "<unknown>",
"minDepositAmount": "<unknown>",
"estimatedSpeed": "<unknown>"
}
],
"unavailableReason": "<unknown>",
"meta": {
"asOf": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
},
"meta": {
"requestId": "<string>"
}
}API Reference
List bank deposit accounts
The user’s virtual bank accounts for depositing fiat, and in available the currencies they could still open. When bank deposits are unavailable, unavailableReason says why.
GET
/
bank_deposit_accounts
List bank deposit accounts
curl --request GET \
--url https://api.tuyo.com/public/bank_deposit_accounts \
--header 'Authorization: Bearer <token>' \
--header 'Tuyo-API-Version: <tuyo-api-version>'import requests
url = "https://api.tuyo.com/public/bank_deposit_accounts"
headers = {
"Tuyo-API-Version": "<tuyo-api-version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Tuyo-API-Version': '<tuyo-api-version>', Authorization: 'Bearer <token>'}
};
fetch('https://api.tuyo.com/public/bank_deposit_accounts', 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.tuyo.com/public/bank_deposit_accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Tuyo-API-Version: <tuyo-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tuyo.com/public/bank_deposit_accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Tuyo-API-Version", "<tuyo-api-version>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tuyo.com/public/bank_deposit_accounts")
.header("Tuyo-API-Version", "<tuyo-api-version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tuyo.com/public/bank_deposit_accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Tuyo-API-Version"] = '<tuyo-api-version>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"accounts": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"currency": "<unknown>",
"paymentRails": [
"<unknown>"
],
"accountHolderName": "<string>",
"bank": {
"name": "<string>",
"address": "<string>"
},
"accountDetails": {
"type": "us",
"accountNumber": "<string>",
"routingNumber": "<string>"
},
"settlement": "<unknown>",
"minDepositAmount": "<unknown>",
"estimatedSpeed": "<unknown>"
}
],
"available": [
{
"currency": "<unknown>",
"paymentRails": "<unknown>",
"accountDetailsType": "<unknown>",
"settlement": "<unknown>",
"minDepositAmount": "<unknown>",
"estimatedSpeed": "<unknown>"
}
],
"unavailableReason": "<unknown>",
"meta": {
"asOf": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
},
"meta": {
"requestId": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true
},
"meta": {
"requestId": "<string>"
}
}Headers
Response
Successful response.
Null when bank deposits work. Otherwise why they do not, and accounts and available are empty, except account_frozen, which still lists accounts: verification_required (bank verification not started or finished), in_review (being reviewed), information_needed (the user must give more information in the Tuyo app), paused (paused; contact support, and do not reuse details shared before), not_eligible (not available to this account; contact support), account_frozen (no new accounts can be opened).