Get Order Status
curl --request GET \
--url https://api-options.sandbox.rails.xyz/v1/matching/orders/{orderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-options.sandbox.rails.xyz/v1/matching/orders/{orderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-options.sandbox.rails.xyz/v1/matching/orders/{orderId}', 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-options.sandbox.rails.xyz/v1/matching/orders/{orderId}",
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://api-options.sandbox.rails.xyz/v1/matching/orders/{orderId}"
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://api-options.sandbox.rails.xyz/v1/matching/orders/{orderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-options.sandbox.rails.xyz/v1/matching/orders/{orderId}")
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{
"clientRequestId": "9f1c2c9e-3f4a-4a4e-9f10-2b7d3f2a1c55",
"status": "open",
"body": "order accepted",
"action": "create",
"contract": "BTC-7FEB26-100000-C",
"orderId": "01JRQM8H5XYZABCDEFGHJKMNPQ",
"quantity": "2",
"filledQuantity": "1",
"remainingQuantity": "1",
"updatedAt": 1770000001500
}{
"error": {
"slug": "BAD_REQUEST",
"code": "0006"
},
"message": "orderId is required"
}{
"error": {
"slug": "UNAUTHORIZED",
"code": "0001"
},
"message": "unauthorized"
}{
"error": {
"slug": "NOT_FOUND",
"code": "0007"
},
"message": "order not found"
}{
"key": "options-read-orders",
"retry_after_seconds": 3,
"remaining": 0
}{
"error": {
"slug": "SERVICE_UNAVAILABLE",
"code": "0004"
},
"message": "matching service unavailable"
}{
"error": {
"slug": "SERVICE_UNAVAILABLE",
"code": "0004"
},
"message": "matching service timed out"
}Orders
Get Order Status
Retrieve the current state of an order.
GET
/
v1
/
matching
/
orders
/
{orderId}
Get Order Status
curl --request GET \
--url https://api-options.sandbox.rails.xyz/v1/matching/orders/{orderId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-options.sandbox.rails.xyz/v1/matching/orders/{orderId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-options.sandbox.rails.xyz/v1/matching/orders/{orderId}', 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-options.sandbox.rails.xyz/v1/matching/orders/{orderId}",
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://api-options.sandbox.rails.xyz/v1/matching/orders/{orderId}"
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://api-options.sandbox.rails.xyz/v1/matching/orders/{orderId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-options.sandbox.rails.xyz/v1/matching/orders/{orderId}")
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{
"clientRequestId": "9f1c2c9e-3f4a-4a4e-9f10-2b7d3f2a1c55",
"status": "open",
"body": "order accepted",
"action": "create",
"contract": "BTC-7FEB26-100000-C",
"orderId": "01JRQM8H5XYZABCDEFGHJKMNPQ",
"quantity": "2",
"filledQuantity": "1",
"remainingQuantity": "1",
"updatedAt": 1770000001500
}{
"error": {
"slug": "BAD_REQUEST",
"code": "0006"
},
"message": "orderId is required"
}{
"error": {
"slug": "UNAUTHORIZED",
"code": "0001"
},
"message": "unauthorized"
}{
"error": {
"slug": "NOT_FOUND",
"code": "0007"
},
"message": "order not found"
}{
"key": "options-read-orders",
"retry_after_seconds": 3,
"remaining": 0
}{
"error": {
"slug": "SERVICE_UNAVAILABLE",
"code": "0004"
},
"message": "matching service unavailable"
}{
"error": {
"slug": "SERVICE_UNAVAILABLE",
"code": "0004"
},
"message": "matching service timed out"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier of the order. Example value: 01JRQM8H5XYZABCDEFGHJKMNPQ. You can get this value from the create, modify or cancel response.
Response
Order status. See Order Lifecycle.
Available options:
pending, accepted, open, completed, cancelled, rejected, not_found Order last update timestamp (milliseconds since epoch).
Client-generated UUID for correlation.
Status message.
The last action recorded for this order.
Available options:
create, modify, cancel Contract name.
Unique identifier for the order.
Order quantity.
Quantity filled so far.
Quantity not yet filled.
Why the order was rejected.