Get orders
curl --request GET \
--url https://app.sandbox.rio.trade/api/orders \
--header 'x-api-key: <api-key>'import requests
url = "https://app.sandbox.rio.trade/api/orders"
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/orders', 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/orders",
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/orders"
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/orders")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandbox.rio.trade/api/orders")
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[
{
"fees": {
"processingFeeFiat": 0,
"transferFeeFiat": 0.17584797034499297,
"platformFeeFiat": 20
},
"destinationOfFunds": {
"blockchainAddress": "TS9kqAVq4PR7xNoQDJXSP6Kgz8GFbwUbzi",
"blockchainMemo": "1234567890",
"accountHolderName": "John Doe",
"accountNumber": "1234567890",
"CCI": "00111233001112345678",
"CLABE": "014027000000000008"
},
"quoteId": "6660be85d6c964829d63fd05",
"userId": "65a99abb6a92bda6e52bf7af",
"status": "awaitingTimeInForceToStart",
"crypto": "USDC",
"side": "buy",
"fiat": "USD",
"createdAt": "2024-06-05T19:38:20.264Z",
"country": "MX",
"amountFiat": 1000,
"amountCrypto": 55.54,
"marketPrice": 0.0568673040717,
"netPrice": 0.05554,
"notes": "Description Pt.1",
"payoutBankAccountId": "660c10c6eb4fbb235708b8e8",
"expiredQuotes": [
"<string>"
],
"cryptoAddress": "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C",
"id": "6660beaccc4633bc6412318a",
"payoutAddressId": "673b5cf6302b8444c78dd3d3",
"attributes": [
"fixedPrice"
],
"payoutTransferLimit": 475000,
"paymentsReceived": [
{
"amount": 100000,
"accountHolderName": "John Doe",
"accountNumber": null,
"CCI": null,
"CLABE": "123456789012345678",
"receivedAt": "2025-01-10T13:14:42.855Z"
}
],
"payoutsSent": [
{
"amount": 4748.36,
"blockchainTxId": "0x66ECBd38905CC32249ddd6f4f0B4A3DdDDCbd608",
"sentAt": "2025-01-10T13:14:48.240Z",
"SPEITrackingNumber": "<string>",
"CEPLink": "<string>",
"reference": "<string>"
}
],
"paymentInstructions": {
"dueDate": "2024-06-04T15:02:13.097Z",
"bankName": "Bank Name",
"companyName": "Company Name",
"companyAddress": "Company Address",
"bankAddress": "Sandbox Bank Address, 12345, Sandbox City, Sandbox Country",
"accountNumber": "<string>",
"reference": "9f5676",
"CLABE": "01212345678901",
"RUC": "<string>",
"RFC": "RBL123456789",
"CCI": "00111233001112345678",
"blockchainAddress": "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C",
"blockchainMemo": "1234567890"
},
"paymentReceivedAt": "2025-01-10T13:14:42.855Z",
"invoice": {
"PDFLink": "<string>",
"XMLLink": "<string>"
},
"informationalFees": {
"serviceFeeFiat": 0,
"serviceFeeFiatTax": 0
},
"twoWaySettlementType": "default",
"twoWaySettlementDateOffset": 1,
"twoWaySettlementDate": "2024-06-04T15:02:13.097Z",
"effectiveTwoWaySettlementDateOffset": 1,
"type": "market",
"limitNetPrice": 0.0555,
"timeInForceStartsAt": "2024-06-04T15:02:13.097Z",
"timeInForceEndsAt": "2024-06-04T15:02:13.097Z",
"parentOrderId": "6660beaccc4633bc6412318a"
}
]{
"errors": [
{
"code": 19,
"message": "Not authorized"
}
]
}Orders API
Get orders
GET
/
api
/
orders
Get orders
curl --request GET \
--url https://app.sandbox.rio.trade/api/orders \
--header 'x-api-key: <api-key>'import requests
url = "https://app.sandbox.rio.trade/api/orders"
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/orders', 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/orders",
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/orders"
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/orders")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandbox.rio.trade/api/orders")
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[
{
"fees": {
"processingFeeFiat": 0,
"transferFeeFiat": 0.17584797034499297,
"platformFeeFiat": 20
},
"destinationOfFunds": {
"blockchainAddress": "TS9kqAVq4PR7xNoQDJXSP6Kgz8GFbwUbzi",
"blockchainMemo": "1234567890",
"accountHolderName": "John Doe",
"accountNumber": "1234567890",
"CCI": "00111233001112345678",
"CLABE": "014027000000000008"
},
"quoteId": "6660be85d6c964829d63fd05",
"userId": "65a99abb6a92bda6e52bf7af",
"status": "awaitingTimeInForceToStart",
"crypto": "USDC",
"side": "buy",
"fiat": "USD",
"createdAt": "2024-06-05T19:38:20.264Z",
"country": "MX",
"amountFiat": 1000,
"amountCrypto": 55.54,
"marketPrice": 0.0568673040717,
"netPrice": 0.05554,
"notes": "Description Pt.1",
"payoutBankAccountId": "660c10c6eb4fbb235708b8e8",
"expiredQuotes": [
"<string>"
],
"cryptoAddress": "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C",
"id": "6660beaccc4633bc6412318a",
"payoutAddressId": "673b5cf6302b8444c78dd3d3",
"attributes": [
"fixedPrice"
],
"payoutTransferLimit": 475000,
"paymentsReceived": [
{
"amount": 100000,
"accountHolderName": "John Doe",
"accountNumber": null,
"CCI": null,
"CLABE": "123456789012345678",
"receivedAt": "2025-01-10T13:14:42.855Z"
}
],
"payoutsSent": [
{
"amount": 4748.36,
"blockchainTxId": "0x66ECBd38905CC32249ddd6f4f0B4A3DdDDCbd608",
"sentAt": "2025-01-10T13:14:48.240Z",
"SPEITrackingNumber": "<string>",
"CEPLink": "<string>",
"reference": "<string>"
}
],
"paymentInstructions": {
"dueDate": "2024-06-04T15:02:13.097Z",
"bankName": "Bank Name",
"companyName": "Company Name",
"companyAddress": "Company Address",
"bankAddress": "Sandbox Bank Address, 12345, Sandbox City, Sandbox Country",
"accountNumber": "<string>",
"reference": "9f5676",
"CLABE": "01212345678901",
"RUC": "<string>",
"RFC": "RBL123456789",
"CCI": "00111233001112345678",
"blockchainAddress": "0xAf56edF88c429F1D6858f9E47731FF53F6d34D0C",
"blockchainMemo": "1234567890"
},
"paymentReceivedAt": "2025-01-10T13:14:42.855Z",
"invoice": {
"PDFLink": "<string>",
"XMLLink": "<string>"
},
"informationalFees": {
"serviceFeeFiat": 0,
"serviceFeeFiatTax": 0
},
"twoWaySettlementType": "default",
"twoWaySettlementDateOffset": 1,
"twoWaySettlementDate": "2024-06-04T15:02:13.097Z",
"effectiveTwoWaySettlementDateOffset": 1,
"type": "market",
"limitNetPrice": 0.0555,
"timeInForceStartsAt": "2024-06-04T15:02:13.097Z",
"timeInForceEndsAt": "2024-06-04T15:02:13.097Z",
"parentOrderId": "6660beaccc4633bc6412318a"
}
]{
"errors": [
{
"code": 19,
"message": "Not authorized"
}
]
}v1 (legacy). This page documents the API before the v2 update. The v1
format is not enabled for new accounts and must be enabled on your account by
your account manager. New integrations should use the
current documentation. To update an existing integration,
follow the migration guide.
Requirements to consume the endpoint.
User approved
The user must be approved in at least one country.
Retrieving several orders at once
Use theids parameter to fetch up to 50 specific orders in a single request instead of calling GET /api/orders/{id} once per order. Separate the ids with commas.
curl -G https://app.sandbox.rio.trade/api/orders \
-H "x-api-key: $RIO_API_KEY" \
--data-urlencode "ids=b49f4084b96e4fb76f5a496e,765f4084b96e4fb76f5a4fb0"
When
ids is present and limit is not, the limit defaults to the number of ids you sent, so a single page returns all of them. If you also pass limit, that value wins and the results are paginated as usual.Query Parameters
Crypto by which you want to filter.
Available options:
USDC, USDC_POLYGON_NXTB, SOL_USDC_PTHX, XLM_USDC_5F3T, USDC_BASECHAIN_ETH_5I5C, ARC, USDCE_TEMPO_MXYR, USDT_POLYGON, USDT_ERC20, TRX_USDT_S2UZ, USDT_BSC, SOL_USDT_EWAY, EUROC_ETH_F5NG, EURC_SOL, EURC_B609K9QB_Y213, OUSD_ETH_D6W3, OUSD_TEMPO_8YSU Status by which you want to filter. These are the statuses an order moves through on a normal flow, and other statuses can be filtered on depending on the circumstances of the order.
Available options:
awaitingTimeInForceToStart, awaitingLimitPriceCondition, timeInForceEnded, created, addressCheckPassed, awaitingPayment, processing, paid, incorrectAmountPaid, sourcingLiquidity, liquiditySourced, filled, complete, depositAddressCreated, awaitingBankPayoutDetails, bankPayoutDetailsAdded, depositConfirmed, awaitingPayout, bankPaymentDetailsAdded, awaitingAsyncPayment, awaitingAsyncPayout, cancelled, expired Response
OK
The status of the order. These are the statuses an order moves through on a normal flow, and which ones it sees depends on whether it is a buy or a sell and on whether payment is deferred. Other statuses can appear depending on the circumstances of the order.
Available options:
awaitingTimeInForceToStart, awaitingLimitPriceCondition, timeInForceEnded, created, addressCheckPassed, awaitingPayment, processing, paid, incorrectAmountPaid, sourcingLiquidity, liquiditySourced, filled, complete, depositAddressCreated, awaitingBankPayoutDetails, bankPayoutDetailsAdded, depositConfirmed, awaitingPayout, bankPaymentDetailsAdded, awaitingAsyncPayment, awaitingAsyncPayout, cancelled, expired The type of cryptocurrency used
Available options:
USDC, USDC_POLYGON_NXTB, SOL_USDC_PTHX, XLM_USDC_5F3T, USDC_BASECHAIN_ETH_5I5C, ARC, USDCE_TEMPO_MXYR, USDT_POLYGON, USDT_ERC20, TRX_USDT_S2UZ, USDT_BSC, SOL_USDT_EWAY, EUROC_ETH_F5NG, EURC_SOL, EURC_B609K9QB_Y213, OUSD_ETH_D6W3, OUSD_TEMPO_8YSU