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": "0006"
},
"message": "pageSize must be between 20 and 200"
}{
"message": "Unauthorized"
}{
"error": {
"slug": "TOO_MANY_REQUESTS",
"code": "0003"
},
"message": "api rate limit exceeded"
}Get Completed Orders
This endpoint retrieves the completed orders (fills) of your account across all markets.
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": "0006"
},
"message": "pageSize must be between 20 and 200"
}{
"message": "Unauthorized"
}{
"error": {
"slug": "TOO_MANY_REQUESTS",
"code": "0003"
},
"message": "api rate limit exceeded"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Maximum number of items per page, between 20 and 200. Defaults to 100.
20 <= x <= 200This is a parameter to support querying by date. The value should be in the format of milliseconds since epoch. It can be used alone or in conjunction with the endDate parameter.
1000000000000 <= x <= 9999999999999This is a parameter to support querying by date. The value should be in the format of milliseconds since epoch. It can be used alone or in conjunction with the startDate parameter.
1000000000000 <= x <= 9999999999999This is a parameter to support pagination. Get the value from the last field if present in the previous response.
Response
List of completed (filled) orders for the account, newest first, across all markets.
Show child attributes
Show child attributes
This is a field in the response to support pagination. Use this value if present for the start parameter of the following request to get the next page of results.