curl --request POST \
--url https://app.sandbox.rio.trade/api/orders/export \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"email": "user@example.com",
"id": "b49f4084b96e4fb76f5a496e",
"userId": "b49f4084b96e4fb76f5a496e",
"brokerId": "b49f4084b96e4fb76f5a496e",
"startDate": "2024-01-01T00:00:00.000Z",
"endDate": "2024-01-31T23:59:59.999Z",
"fiat": "MXN",
"crypto": "USDC",
"status": "completed",
"country": "Mexico",
"minOrderSize": 100,
"maxOrderSize": 10000,
"orderStatusGroups": [
"completed",
"processing"
]
}
'import requests
url = "https://app.sandbox.rio.trade/api/orders/export"
payload = {
"email": "user@example.com",
"id": "b49f4084b96e4fb76f5a496e",
"userId": "b49f4084b96e4fb76f5a496e",
"brokerId": "b49f4084b96e4fb76f5a496e",
"startDate": "2024-01-01T00:00:00.000Z",
"endDate": "2024-01-31T23:59:59.999Z",
"fiat": "MXN",
"crypto": "USDC",
"status": "completed",
"country": "Mexico",
"minOrderSize": 100,
"maxOrderSize": 10000,
"orderStatusGroups": ["completed", "processing"]
}
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({
email: 'user@example.com',
id: 'b49f4084b96e4fb76f5a496e',
userId: 'b49f4084b96e4fb76f5a496e',
brokerId: 'b49f4084b96e4fb76f5a496e',
startDate: '2024-01-01T00:00:00.000Z',
endDate: '2024-01-31T23:59:59.999Z',
fiat: 'MXN',
crypto: 'USDC',
status: 'completed',
country: 'Mexico',
minOrderSize: 100,
maxOrderSize: 10000,
orderStatusGroups: ['completed', 'processing']
})
};
fetch('https://app.sandbox.rio.trade/api/orders/export', 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/export",
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([
'email' => 'user@example.com',
'id' => 'b49f4084b96e4fb76f5a496e',
'userId' => 'b49f4084b96e4fb76f5a496e',
'brokerId' => 'b49f4084b96e4fb76f5a496e',
'startDate' => '2024-01-01T00:00:00.000Z',
'endDate' => '2024-01-31T23:59:59.999Z',
'fiat' => 'MXN',
'crypto' => 'USDC',
'status' => 'completed',
'country' => 'Mexico',
'minOrderSize' => 100,
'maxOrderSize' => 10000,
'orderStatusGroups' => [
'completed',
'processing'
]
]),
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/orders/export"
payload := strings.NewReader("{\n \"email\": \"user@example.com\",\n \"id\": \"b49f4084b96e4fb76f5a496e\",\n \"userId\": \"b49f4084b96e4fb76f5a496e\",\n \"brokerId\": \"b49f4084b96e4fb76f5a496e\",\n \"startDate\": \"2024-01-01T00:00:00.000Z\",\n \"endDate\": \"2024-01-31T23:59:59.999Z\",\n \"fiat\": \"MXN\",\n \"crypto\": \"USDC\",\n \"status\": \"completed\",\n \"country\": \"Mexico\",\n \"minOrderSize\": 100,\n \"maxOrderSize\": 10000,\n \"orderStatusGroups\": [\n \"completed\",\n \"processing\"\n ]\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/orders/export")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"user@example.com\",\n \"id\": \"b49f4084b96e4fb76f5a496e\",\n \"userId\": \"b49f4084b96e4fb76f5a496e\",\n \"brokerId\": \"b49f4084b96e4fb76f5a496e\",\n \"startDate\": \"2024-01-01T00:00:00.000Z\",\n \"endDate\": \"2024-01-31T23:59:59.999Z\",\n \"fiat\": \"MXN\",\n \"crypto\": \"USDC\",\n \"status\": \"completed\",\n \"country\": \"Mexico\",\n \"minOrderSize\": 100,\n \"maxOrderSize\": 10000,\n \"orderStatusGroups\": [\n \"completed\",\n \"processing\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandbox.rio.trade/api/orders/export")
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 \"email\": \"user@example.com\",\n \"id\": \"b49f4084b96e4fb76f5a496e\",\n \"userId\": \"b49f4084b96e4fb76f5a496e\",\n \"brokerId\": \"b49f4084b96e4fb76f5a496e\",\n \"startDate\": \"2024-01-01T00:00:00.000Z\",\n \"endDate\": \"2024-01-31T23:59:59.999Z\",\n \"fiat\": \"MXN\",\n \"crypto\": \"USDC\",\n \"status\": \"completed\",\n \"country\": \"Mexico\",\n \"minOrderSize\": 100,\n \"maxOrderSize\": 10000,\n \"orderStatusGroups\": [\n \"completed\",\n \"processing\"\n ]\n}"
response = http.request(request)
puts response.read_bodyExport orders as CSV
Exports orders as a CSV file and sends it to the specified email address. This is an asynchronous operation that returns immediately with a 202 status.
curl --request POST \
--url https://app.sandbox.rio.trade/api/orders/export \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"email": "user@example.com",
"id": "b49f4084b96e4fb76f5a496e",
"userId": "b49f4084b96e4fb76f5a496e",
"brokerId": "b49f4084b96e4fb76f5a496e",
"startDate": "2024-01-01T00:00:00.000Z",
"endDate": "2024-01-31T23:59:59.999Z",
"fiat": "MXN",
"crypto": "USDC",
"status": "completed",
"country": "Mexico",
"minOrderSize": 100,
"maxOrderSize": 10000,
"orderStatusGroups": [
"completed",
"processing"
]
}
'import requests
url = "https://app.sandbox.rio.trade/api/orders/export"
payload = {
"email": "user@example.com",
"id": "b49f4084b96e4fb76f5a496e",
"userId": "b49f4084b96e4fb76f5a496e",
"brokerId": "b49f4084b96e4fb76f5a496e",
"startDate": "2024-01-01T00:00:00.000Z",
"endDate": "2024-01-31T23:59:59.999Z",
"fiat": "MXN",
"crypto": "USDC",
"status": "completed",
"country": "Mexico",
"minOrderSize": 100,
"maxOrderSize": 10000,
"orderStatusGroups": ["completed", "processing"]
}
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({
email: 'user@example.com',
id: 'b49f4084b96e4fb76f5a496e',
userId: 'b49f4084b96e4fb76f5a496e',
brokerId: 'b49f4084b96e4fb76f5a496e',
startDate: '2024-01-01T00:00:00.000Z',
endDate: '2024-01-31T23:59:59.999Z',
fiat: 'MXN',
crypto: 'USDC',
status: 'completed',
country: 'Mexico',
minOrderSize: 100,
maxOrderSize: 10000,
orderStatusGroups: ['completed', 'processing']
})
};
fetch('https://app.sandbox.rio.trade/api/orders/export', 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/export",
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([
'email' => 'user@example.com',
'id' => 'b49f4084b96e4fb76f5a496e',
'userId' => 'b49f4084b96e4fb76f5a496e',
'brokerId' => 'b49f4084b96e4fb76f5a496e',
'startDate' => '2024-01-01T00:00:00.000Z',
'endDate' => '2024-01-31T23:59:59.999Z',
'fiat' => 'MXN',
'crypto' => 'USDC',
'status' => 'completed',
'country' => 'Mexico',
'minOrderSize' => 100,
'maxOrderSize' => 10000,
'orderStatusGroups' => [
'completed',
'processing'
]
]),
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/orders/export"
payload := strings.NewReader("{\n \"email\": \"user@example.com\",\n \"id\": \"b49f4084b96e4fb76f5a496e\",\n \"userId\": \"b49f4084b96e4fb76f5a496e\",\n \"brokerId\": \"b49f4084b96e4fb76f5a496e\",\n \"startDate\": \"2024-01-01T00:00:00.000Z\",\n \"endDate\": \"2024-01-31T23:59:59.999Z\",\n \"fiat\": \"MXN\",\n \"crypto\": \"USDC\",\n \"status\": \"completed\",\n \"country\": \"Mexico\",\n \"minOrderSize\": 100,\n \"maxOrderSize\": 10000,\n \"orderStatusGroups\": [\n \"completed\",\n \"processing\"\n ]\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/orders/export")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"user@example.com\",\n \"id\": \"b49f4084b96e4fb76f5a496e\",\n \"userId\": \"b49f4084b96e4fb76f5a496e\",\n \"brokerId\": \"b49f4084b96e4fb76f5a496e\",\n \"startDate\": \"2024-01-01T00:00:00.000Z\",\n \"endDate\": \"2024-01-31T23:59:59.999Z\",\n \"fiat\": \"MXN\",\n \"crypto\": \"USDC\",\n \"status\": \"completed\",\n \"country\": \"Mexico\",\n \"minOrderSize\": 100,\n \"maxOrderSize\": 10000,\n \"orderStatusGroups\": [\n \"completed\",\n \"processing\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.sandbox.rio.trade/api/orders/export")
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 \"email\": \"user@example.com\",\n \"id\": \"b49f4084b96e4fb76f5a496e\",\n \"userId\": \"b49f4084b96e4fb76f5a496e\",\n \"brokerId\": \"b49f4084b96e4fb76f5a496e\",\n \"startDate\": \"2024-01-01T00:00:00.000Z\",\n \"endDate\": \"2024-01-31T23:59:59.999Z\",\n \"fiat\": \"MXN\",\n \"crypto\": \"USDC\",\n \"status\": \"completed\",\n \"country\": \"Mexico\",\n \"minOrderSize\": 100,\n \"maxOrderSize\": 10000,\n \"orderStatusGroups\": [\n \"completed\",\n \"processing\"\n ]\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Body
Email address to send the CSV file to
"user@example.com"
Order id by which you want to filter
"b49f4084b96e4fb76f5a496e"
User id by which you want to filter
"b49f4084b96e4fb76f5a496e"
Broker id by which you want to filter
"b49f4084b96e4fb76f5a496e"
Start date for filtering orders
"2024-01-01T00:00:00.000Z"
End date for filtering orders
"2024-01-31T23:59:59.999Z"
Fiat currency by which you want to filter
"MXN"
Crypto currency by which you want to filter
"USDC"
Order side by which you want to filter
Buy, Sell Order status by which you want to filter
"completed"
Country by which you want to filter
"Mexico"
Minimum order size to filter by
x >= 0100
Maximum order size to filter by
x >= 010000
Array of order status groups to filter by
["completed", "processing"]
Response
Export request accepted. CSV will be sent to the provided email.