Python (SDK)
from finance_dev import FinanceDev, models
with FinanceDev(
security=models.Security(
client_id="<YOUR_CLIENT_ID_HERE>",
client_secret="<YOUR_CLIENT_SECRET_HERE>",
),
) as fd_client:
res = fd_client.predictions.orders.get_prediction_mass_cancel(mass_cancel_id="97599149-c654-4879-ab4b-aaac771b2949", account_id="ACCOUNT-0001")
assert res.object is not None
# Handle response
print(res.object)import { FinanceDev } from "@ariesdotcom/finance-dev";
const financeDev = new FinanceDev({
security: {
clientID: "<YOUR_CLIENT_ID_HERE>",
clientSecret: "<YOUR_CLIENT_SECRET_HERE>",
},
});
async function run() {
const result = await financeDev.predictions.orders.getPredictionMassCancel({
massCancelId: "97599149-c654-4879-ab4b-aaac771b2949",
accountId: "ACCOUNT-0001",
});
console.log(result);
}
run();curl --request GET \
--url https://api.aries.com/v1/predictions/orders/mass-cancels/{massCancelId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aries.com/v1/predictions/orders/mass-cancels/{massCancelId}', 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.aries.com/v1/predictions/orders/mass-cancels/{massCancelId}",
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.aries.com/v1/predictions/orders/mass-cancels/{massCancelId}"
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.aries.com/v1/predictions/orders/mass-cancels/{massCancelId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/predictions/orders/mass-cancels/{massCancelId}")
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{
"success": true,
"data": {
"accountId": "<string>",
"answeredAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"massCancelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcome": "<string>",
"rejectReason": "not_supported",
"rejectText": "<string>",
"requestType": "all",
"requestedBy": "<string>",
"sentAt": "2023-11-07T05:31:56Z",
"status": "pending",
"symbol": "<string>",
"totalAffectedOrders": "<string>"
}
}Orders
Get Prediction Mass Cancel
Returns one mass cancel request on an account and the venue’s answer to it.
Use Case: Check whether the venue accepted a mass cancel, and how many orders it reported cancelling.
GET
/
v1
/
predictions
/
orders
/
mass-cancels
/
{massCancelId}
Python (SDK)
from finance_dev import FinanceDev, models
with FinanceDev(
security=models.Security(
client_id="<YOUR_CLIENT_ID_HERE>",
client_secret="<YOUR_CLIENT_SECRET_HERE>",
),
) as fd_client:
res = fd_client.predictions.orders.get_prediction_mass_cancel(mass_cancel_id="97599149-c654-4879-ab4b-aaac771b2949", account_id="ACCOUNT-0001")
assert res.object is not None
# Handle response
print(res.object)import { FinanceDev } from "@ariesdotcom/finance-dev";
const financeDev = new FinanceDev({
security: {
clientID: "<YOUR_CLIENT_ID_HERE>",
clientSecret: "<YOUR_CLIENT_SECRET_HERE>",
},
});
async function run() {
const result = await financeDev.predictions.orders.getPredictionMassCancel({
massCancelId: "97599149-c654-4879-ab4b-aaac771b2949",
accountId: "ACCOUNT-0001",
});
console.log(result);
}
run();curl --request GET \
--url https://api.aries.com/v1/predictions/orders/mass-cancels/{massCancelId} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aries.com/v1/predictions/orders/mass-cancels/{massCancelId}', 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.aries.com/v1/predictions/orders/mass-cancels/{massCancelId}",
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.aries.com/v1/predictions/orders/mass-cancels/{massCancelId}"
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.aries.com/v1/predictions/orders/mass-cancels/{massCancelId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/predictions/orders/mass-cancels/{massCancelId}")
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{
"success": true,
"data": {
"accountId": "<string>",
"answeredAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"massCancelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outcome": "<string>",
"rejectReason": "not_supported",
"rejectText": "<string>",
"requestType": "all",
"requestedBy": "<string>",
"sentAt": "2023-11-07T05:31:56Z",
"status": "pending",
"symbol": "<string>",
"totalAffectedOrders": "<string>"
}
}This endpoint is in closed beta. It is available only to accounts enrolled in the beta. Request and response shapes may change before general availability.
Overview
Mass Cancel Prediction Orders returns while the request ispending. Read it back here with its massCancelId and accountId to see the venue’s answer:
status | Meaning |
|---|---|
pending | Sent. The venue has not answered yet. |
accepted | The venue took the request. totalAffectedOrders is its count, when it gives one. |
rejected | The venue refused. rejectReason is not_supported, unknown_security, other or business_reject, and rejectText is the venue’s own words. |
not_sent | Nothing reached the venue, and nothing was canceled. |
canceled event, in Get Prediction Order, carries this massCancelId.
Example
curl -X GET "https://api.tradearies.dev/v1/predictions/orders/mass-cancels/0192f3a4-7a1b-7c2d-8e3f-456789abcdef?accountId=ACCOUNT-0001" \
-H "Authorization: Bearer $ACCESS_TOKEN"
Errors
| Status | code | Meaning |
|---|---|---|
400 | INVALID_ORDER | accountId is missing. |
401 | — | Missing or invalid credentials. |
404 | ORDER_NOT_FOUND | No such mass cancel on accountId. |
500 | ORDER_REQUEST_FAILED | Unexpected server error. |
Authorizations
Was this page helpful?