Create a new crypto address
curl --request POST \
--url https://app.sandbox.rio.trade/api/addresses \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"address": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin",
"asset": "USDC",
"network": "solana",
"label": "Treasury"
}
'import requests
url = "https://app.sandbox.rio.trade/api/addresses"
payload = {
"address": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin",
"asset": "USDC",
"network": "solana",
"label": "Treasury"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin',
asset: 'USDC',
network: 'solana',
label: 'Treasury'
})
};
fetch('https://app.sandbox.rio.trade/api/addresses', 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/addresses",
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([
'address' => '9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin',
'asset' => 'USDC',
'network' => 'solana',
'label' => 'Treasury'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sandbox.rio.trade/api/addresses"
payload := strings.NewReader("{\n \"address\": \"9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin\",\n \"asset\": \"USDC\",\n \"network\": \"solana\",\n \"label\": \"Treasury\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://app.sandbox.rio.trade/api/addresses")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin\",\n \"asset\": \"USDC\",\n \"network\": \"solana\",\n \"label\": \"Treasury\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandbox.rio.trade/api/addresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin\",\n \"asset\": \"USDC\",\n \"network\": \"solana\",\n \"label\": \"Treasury\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2024-07-25T19:57:09.812Z",
"userId": "66562bc04fe8bf83c577c178",
"asset": "USDC",
"network": "solana",
"address": "0x32Be343B94f860124dC4fEe278FDCBD38C102D88",
"memo": "1234567890",
"approved": false,
"lastChecked": "2024-05-30T20:09:40.500Z",
"label": "Crypto Address",
"id": "6658dd0420b7daba6a25ff3a"
}{
"errors": [
{
"code": 39,
"message": "Address did not pass background check"
}
]
}{
"errors": [
{
"code": 19,
"message": "Not authorized"
}
]
}Address API
Create a new crypto address
POST
/
api
/
addresses
Create a new crypto address
curl --request POST \
--url https://app.sandbox.rio.trade/api/addresses \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"address": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin",
"asset": "USDC",
"network": "solana",
"label": "Treasury"
}
'import requests
url = "https://app.sandbox.rio.trade/api/addresses"
payload = {
"address": "9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin",
"asset": "USDC",
"network": "solana",
"label": "Treasury"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin',
asset: 'USDC',
network: 'solana',
label: 'Treasury'
})
};
fetch('https://app.sandbox.rio.trade/api/addresses', 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/addresses",
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([
'address' => '9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin',
'asset' => 'USDC',
'network' => 'solana',
'label' => 'Treasury'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sandbox.rio.trade/api/addresses"
payload := strings.NewReader("{\n \"address\": \"9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin\",\n \"asset\": \"USDC\",\n \"network\": \"solana\",\n \"label\": \"Treasury\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://app.sandbox.rio.trade/api/addresses")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin\",\n \"asset\": \"USDC\",\n \"network\": \"solana\",\n \"label\": \"Treasury\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandbox.rio.trade/api/addresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin\",\n \"asset\": \"USDC\",\n \"network\": \"solana\",\n \"label\": \"Treasury\"\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2024-07-25T19:57:09.812Z",
"userId": "66562bc04fe8bf83c577c178",
"asset": "USDC",
"network": "solana",
"address": "0x32Be343B94f860124dC4fEe278FDCBD38C102D88",
"memo": "1234567890",
"approved": false,
"lastChecked": "2024-05-30T20:09:40.500Z",
"label": "Crypto Address",
"id": "6658dd0420b7daba6a25ff3a"
}{
"errors": [
{
"code": 39,
"message": "Address did not pass background check"
}
]
}{
"errors": [
{
"code": 19,
"message": "Not authorized"
}
]
}Requirements to consume the endpoint.
Create and modify role
The user must have the role to create and modify.
Body
application/json
The memo for the blockchain transaction (USDC Stellar addresses only). Please check if your wallet requires a memo for deposits. If so, please include the memo in the transaction. Failure to include the memo will result in the payment not being credited to your order and your funds may be permanently lost.
Example:
"1234567890"
Response
Created
The memo for the blockchain transaction (USDC Stellar addresses only). Please check if your wallet requires a memo for deposits. If so, please include the memo in the transaction. Failure to include the memo will result in the payment not being credited to your order and your funds may be permanently lost.
Example:
"1234567890"