Get Completed Orders
curl --request GET \
--url https://order.sandbox.rails.xyz/api/v1/completed-orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://order.sandbox.rails.xyz/api/v1/completed-orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://order.sandbox.rails.xyz/api/v1/completed-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://order.sandbox.rails.xyz/api/v1/completed-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 => [
"Authorization: Bearer <token>"
],
]);
$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://order.sandbox.rails.xyz/api/v1/completed-orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://order.sandbox.rails.xyz/api/v1/completed-orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://order.sandbox.rails.xyz/api/v1/completed-orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"completedOrders": [
{
"market": "ETH-USDT",
"matchId": "a59141f0-9c13-4ec8-bc37-beceb7fb284a",
"orderId": "01JP39KFBF8SHJAT3ERHPF3YSP",
"orderType": "buy",
"executionType": "maker",
"fillType": "complete",
"price": "1949",
"quantity": "273.78842139",
"tradeType": "limit",
"fees": "533.61363328",
"triggerType": "none",
"triggerPrice": "0",
"transactionHash": "335a50808317116f2fc1147277bcc226e0e52dfea7b15899d66add371d2ab499",
"filledAt": 1747426816421
},
{
"market": "BTC-USDT",
"matchId": "6d6ca016-fd1d-415a-8a83-25a1f5fc02f4",
"orderId": "01JP390Z8WVR9EP6X1P187P722",
"orderType": "sell",
"executionType": "taker",
"fillType": "complete",
"price": "82850.59187039",
"quantity": "6.34127086",
"tradeType": "market",
"fees": "525.37804396",
"triggerType": "none",
"triggerPrice": "0",
"transactionHash": "4dfb16c92be57701a4498b37c9af9ece0d1109bef5350d9a891e5f2f64eaf6d2",
"filledAt": 1747426816421
}
],
"last": "BTC-USDT#FEES#01JP390Z8WVR9EP6X1P187P722#01JP36QTCRJCGN7NC0CPZ22NAB@1741719371497"
}{
"error": {
"slug": "BAD_REQUEST",
"code": "SYS-0006"
},
"message": "pageSize must be between 20 and 200"
}{
"message": "Unauthorized"
}{
"error": {
"slug": "TOO_MANY_REQUESTS",
"code": "SYS-0003"
},
"message": "api rate limit exceeded"
}Margin, Leverage & Orders
Get Completed Orders
This endpoint retrieves the completed orders (fills) of your account across all markets.
GET
/
api
/
v1
/
completed-orders
Get Completed Orders
curl --request GET \
--url https://order.sandbox.rails.xyz/api/v1/completed-orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://order.sandbox.rails.xyz/api/v1/completed-orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://order.sandbox.rails.xyz/api/v1/completed-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://order.sandbox.rails.xyz/api/v1/completed-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 => [
"Authorization: Bearer <token>"
],
]);
$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://order.sandbox.rails.xyz/api/v1/completed-orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://order.sandbox.rails.xyz/api/v1/completed-orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://order.sandbox.rails.xyz/api/v1/completed-orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"completedOrders": [
{
"market": "ETH-USDT",
"matchId": "a59141f0-9c13-4ec8-bc37-beceb7fb284a",
"orderId": "01JP39KFBF8SHJAT3ERHPF3YSP",
"orderType": "buy",
"executionType": "maker",
"fillType": "complete",
"price": "1949",
"quantity": "273.78842139",
"tradeType": "limit",
"fees": "533.61363328",
"triggerType": "none",
"triggerPrice": "0",
"transactionHash": "335a50808317116f2fc1147277bcc226e0e52dfea7b15899d66add371d2ab499",
"filledAt": 1747426816421
},
{
"market": "BTC-USDT",
"matchId": "6d6ca016-fd1d-415a-8a83-25a1f5fc02f4",
"orderId": "01JP390Z8WVR9EP6X1P187P722",
"orderType": "sell",
"executionType": "taker",
"fillType": "complete",
"price": "82850.59187039",
"quantity": "6.34127086",
"tradeType": "market",
"fees": "525.37804396",
"triggerType": "none",
"triggerPrice": "0",
"transactionHash": "4dfb16c92be57701a4498b37c9af9ece0d1109bef5350d9a891e5f2f64eaf6d2",
"filledAt": 1747426816421
}
],
"last": "BTC-USDT#FEES#01JP390Z8WVR9EP6X1P187P722#01JP36QTCRJCGN7NC0CPZ22NAB@1741719371497"
}{
"error": {
"slug": "BAD_REQUEST",
"code": "SYS-0006"
},
"message": "pageSize must be between 20 and 200"
}{
"message": "Unauthorized"
}{
"error": {
"slug": "TOO_MANY_REQUESTS",
"code": "SYS-0003"
},
"message": "api rate limit exceeded"
}