List prediction mass cancels
curl --request GET \
--url https://api.tradearies.dev/v1/predictions/orders/mass-cancels \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tradearies.dev/v1/predictions/orders/mass-cancels"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tradearies.dev/v1/predictions/orders/mass-cancels")
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": {
"massCancels": [
{
"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>"
}
],
"nextCursor": "<string>"
}
}Orders
List Prediction Mass Cancels
Returns an account’s mass cancel requests, newest first, paged.
Use Case: Show who cancelled an account’s orders in bulk, and what the venue answered.
GET
/
v1
/
predictions
/
orders
/
mass-cancels
List prediction mass cancels
curl --request GET \
--url https://api.tradearies.dev/v1/predictions/orders/mass-cancels \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tradearies.dev/v1/predictions/orders/mass-cancels"
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', 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",
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"
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")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tradearies.dev/v1/predictions/orders/mass-cancels")
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": {
"massCancels": [
{
"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>"
}
],
"nextCursor": "<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
accountId is required. Every mass cancel sent for the account is returned, newest first, each in the shape Get Prediction Mass Cancel returns. requestedBy is the user who sent it.
limit sets the page size. It defaults to 50, and values above 200 are clamped to 200. Pass the response’s nextCursor as cursor to fetch the next page. nextCursor is absent on the last page.
Example
curl -X GET "https://api.tradearies.dev/v1/predictions/orders/mass-cancels?accountId=ACCOUNT-0001&limit=20" \
-H "Authorization: Bearer $ACCESS_TOKEN"
Errors
| Status | code | Meaning |
|---|---|---|
400 | INVALID_LIMIT | limit is not a positive integer. |
400 | INVALID_ORDER | accountId is missing, or a malformed cursor. |
401 | — | Missing or invalid credentials. |
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.
Query Parameters
The account. Every order on it is covered, whoever placed it.
Mass cancels per page. Values above 200 are clamped to 200.
Required range:
1 <= x <= 200nextCursor from the previous page.
Was this page helpful?