Get prediction mass cancel
curl --request GET \
--url https://api.tradearies.dev/v1/predictions/orders/mass-cancels/{massCancelId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tradearies.dev/v1/predictions/orders/mass-cancels/{massCancelId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tradearies.dev/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.tradearies.dev/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.tradearies.dev/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.tradearies.dev/v1/predictions/orders/mass-cancels/{massCancelId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tradearies.dev/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}
Get prediction mass cancel
curl --request GET \
--url https://api.tradearies.dev/v1/predictions/orders/mass-cancels/{massCancelId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tradearies.dev/v1/predictions/orders/mass-cancels/{massCancelId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tradearies.dev/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.tradearies.dev/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.tradearies.dev/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.tradearies.dev/v1/predictions/orders/mass-cancels/{massCancelId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tradearies.dev/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, and only on staging (
https://api.tradearies.dev). 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
OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.
Path Parameters
Query Parameters
The account the mass cancel was sent for.
Response
The mass cancel.
Was this page helpful?