Get User Orders
curl --request GET \
--url https://api.sandbox.sardine.ai/v1/ordersimport requests
url = "https://api.sandbox.sardine.ai/v1/orders"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.sandbox.sardine.ai/v1/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://api.sandbox.sardine.ai/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.sandbox.sardine.ai/v1/orders"
req, _ := http.NewRequest("GET", url, nil)
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.sandbox.sardine.ai/v1/orders")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.sardine.ai/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"orders": [
{
"orderId": "OFF-20250417-001",
"fromCurrency": "ETH",
"toCurrency": "USD",
"amount": 0.05,
"status": "pending",
"createdAt": "2025-04-17T10:00:00Z"
},
{
"orderId": "OFF-20250416-002",
"fromCurrency": "BTC",
"toCurrency": "USD",
"amount": 0.2,
"status": "completed",
"createdAt": "2025-04-16T14:30:00Z"
}
]
}Order
Get User Orders
This endpoint retrieves the list of orders placed by the user, with optional filtering based on specific query parameters like userId.
GET
/
orders
Get User Orders
curl --request GET \
--url https://api.sandbox.sardine.ai/v1/ordersimport requests
url = "https://api.sandbox.sardine.ai/v1/orders"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.sandbox.sardine.ai/v1/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://api.sandbox.sardine.ai/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.sandbox.sardine.ai/v1/orders"
req, _ := http.NewRequest("GET", url, nil)
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.sandbox.sardine.ai/v1/orders")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.sardine.ai/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"orders": [
{
"orderId": "OFF-20250417-001",
"fromCurrency": "ETH",
"toCurrency": "USD",
"amount": 0.05,
"status": "pending",
"createdAt": "2025-04-17T10:00:00Z"
},
{
"orderId": "OFF-20250416-002",
"fromCurrency": "BTC",
"toCurrency": "USD",
"amount": 0.2,
"status": "completed",
"createdAt": "2025-04-16T14:30:00Z"
}
]
}Query Parameters
The ID of the user whose orders are being retrieved
Filter orders by status (e.g., pending, completed)
Filter orders created after this date (ISO 8601 format)
Filter orders created before this date (ISO 8601 format)
Response
200 - application/json
Successfully retrieved user orders
Show child attributes
Show child attributes
⌘I