Skip to main content
GET
/
api
/
bank
/
accounts
Get bank accounts
curl --request GET \
  --url https://app.sandbox.rio.trade/api/bank/accounts \
  --header 'x-api-key: <api-key>'
import requests

url = "https://app.sandbox.rio.trade/api/bank/accounts"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://app.sandbox.rio.trade/api/bank/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://app.sandbox.rio.trade/api/bank/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 => [
"x-api-key: <api-key>"
],
]);

$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://app.sandbox.rio.trade/api/bank/accounts"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://app.sandbox.rio.trade/api/bank/accounts")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.sandbox.rio.trade/api/bank/accounts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
[
  {
    "userId": "66562bc04fe8bf83c577c178",
    "createdAt": "2024-05-31T13:55:11.452Z",
    "bankName": "BANAMEX",
    "accountHolderName": "Account holder name",
    "accountNumber": "0123456789",
    "CLABE": "0023764000000012345",
    "CCI": "00111233001112345678",
    "approved": true,
    "notes": "Bank Account",
    "email": "<string>",
    "id": "6659d6bfd78151f639e74d53",
    "userName": "<string>"
  }
]
{
"errors": [
{
"code": 19,
"message": "Not authorized"
}
]
}

Requirements to consume the endpoint.

User approved

The user must be approved in at least one country.

Authorizations

x-api-key
string
header
required

Query Parameters

userId
string

User id by which you want to filter.

Example:

"665f4084b96e4fb76f5a0e0c"

brokerId
string

Broker id by which you want to filter.

Example:

"655f4084b96e4fb76f5a0e6e"

country
enum<string>

Country by which you want to filter.

Available options:
MX,
PE,
CO,
US
fiat
enum<string>

Fiat by which you want to filter.

Available options:
USD,
MXN,
PEN,
COP
CLABE
string

CLABE by which you want to filter.

Example:

"646770400400000001"

page
integer

Used to specify the current page you want to get in the paging results.

limit
integer

Used to specify the maximum number of records to be returned on a single page.

Response

OK

userId
string

Id of the user who owns the bank account.

Example:

"66562bc04fe8bf83c577c178"

createdAt
string

Creation date and time of the bank account.

Example:

"2024-05-31T13:55:11.452Z"

bankName
string

Name of the bank.

Example:

"BANAMEX"

country
enum<string>

Country of the bank.

Available options:
MX,
PE,
CO,
US
accountHolderName
string

Name of the account holder.

Example:

"Account holder name"

fiat
enum<string>

Fiat currency of the bank account.

Available options:
USD,
MXN,
PEN,
COP
accountNumber
string

Number of the bank account.

Example:

"0123456789"

CLABE
string

The Standardized Bank Code (CLABE) associated with the bank account, used in Mexico.

Example:

"0023764000000012345"

CCI
string

Only for bank accounts in Peru.

Example:

"00111233001112345678"

approved
boolean

Indicates if the bank account has been approved.

Example:

true

notes
string

Notes about the bank account.

Example:

"Bank Account"

email
string

Only if the bank account is NVIO bank account.

advancedVerificationStatus
enum<string>

Advanced verification status of the bank account.

Available options:
initiated,
sent,
passed,
cancelled
id
string

Id of the bank account.

Example:

"6659d6bfd78151f639e74d53"

userName
string

Name of the user who owns the bank account.