Java (SDK)
package hello.world;
import java.lang.Exception;
import org.openapis.openapi.AriesJava;
import org.openapis.openapi.models.components.UpdateOrderRequest;
import org.openapis.openapi.models.errors.ErrorResponse;
import org.openapis.openapi.models.operations.UpdateOrderResponse;
public class Application {
public static void main(String[] args) throws ErrorResponse, Exception {
AriesJava sdk = AriesJava.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
UpdateOrderRequest req = UpdateOrderRequest.builder()
.orderId(628998L)
.account("49839745")
.symbol("<value>")
.quantity(448383L)
.orderType("<value>")
.tradeAction("<value>")
.timeInForce("<value>")
.build();
UpdateOrderResponse res = sdk.orders().update()
.request(req)
.call();
if (res.updateOrderResponse().isPresent()) {
// handle response
}
}
}curl --request PUT \
--url https://api.tradearies.dev/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"orderId": 123,
"account": "<string>",
"symbol": "<string>",
"quantity": 123,
"orderType": "<string>",
"tradeAction": "<string>",
"timeInForce": "<string>",
"route": "<string>",
"limitPrice": "<string>",
"stopPrice": "<string>",
"legs": [
{
"symbol": "<string>",
"ratioQuantity": "<string>",
"tradeAction": "<string>",
"positionEffect": "<string>"
}
]
}
'import requests
url = "https://api.tradearies.dev/v1/orders"
payload = {
"orderId": 123,
"account": "<string>",
"symbol": "<string>",
"quantity": 123,
"orderType": "<string>",
"tradeAction": "<string>",
"timeInForce": "<string>",
"route": "<string>",
"limitPrice": "<string>",
"stopPrice": "<string>",
"legs": [
{
"symbol": "<string>",
"ratioQuantity": "<string>",
"tradeAction": "<string>",
"positionEffect": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
orderId: 123,
account: '<string>',
symbol: '<string>',
quantity: 123,
orderType: '<string>',
tradeAction: '<string>',
timeInForce: '<string>',
route: '<string>',
limitPrice: '<string>',
stopPrice: '<string>',
legs: [
{
symbol: '<string>',
ratioQuantity: '<string>',
tradeAction: '<string>',
positionEffect: '<string>'
}
]
})
};
fetch('https://api.tradearies.dev/v1/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://api.tradearies.dev/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'orderId' => 123,
'account' => '<string>',
'symbol' => '<string>',
'quantity' => 123,
'orderType' => '<string>',
'tradeAction' => '<string>',
'timeInForce' => '<string>',
'route' => '<string>',
'limitPrice' => '<string>',
'stopPrice' => '<string>',
'legs' => [
[
'symbol' => '<string>',
'ratioQuantity' => '<string>',
'tradeAction' => '<string>',
'positionEffect' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tradearies.dev/v1/orders"
payload := strings.NewReader("{\n \"orderId\": 123,\n \"account\": \"<string>\",\n \"symbol\": \"<string>\",\n \"quantity\": 123,\n \"orderType\": \"<string>\",\n \"tradeAction\": \"<string>\",\n \"timeInForce\": \"<string>\",\n \"route\": \"<string>\",\n \"limitPrice\": \"<string>\",\n \"stopPrice\": \"<string>\",\n \"legs\": [\n {\n \"symbol\": \"<string>\",\n \"ratioQuantity\": \"<string>\",\n \"tradeAction\": \"<string>\",\n \"positionEffect\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.tradearies.dev/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orderId\": 123,\n \"account\": \"<string>\",\n \"symbol\": \"<string>\",\n \"quantity\": 123,\n \"orderType\": \"<string>\",\n \"tradeAction\": \"<string>\",\n \"timeInForce\": \"<string>\",\n \"route\": \"<string>\",\n \"limitPrice\": \"<string>\",\n \"stopPrice\": \"<string>\",\n \"legs\": [\n {\n \"symbol\": \"<string>\",\n \"ratioQuantity\": \"<string>\",\n \"tradeAction\": \"<string>\",\n \"positionEffect\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"orderId": 123,
"status": "<string>"
}{
"error": "<string>",
"codes": [
{
"code": "<string>",
"description": "<string>"
}
]
}Orders
Update Order
Update an existing order
PUT
/
v1
/
orders
Java (SDK)
package hello.world;
import java.lang.Exception;
import org.openapis.openapi.AriesJava;
import org.openapis.openapi.models.components.UpdateOrderRequest;
import org.openapis.openapi.models.errors.ErrorResponse;
import org.openapis.openapi.models.operations.UpdateOrderResponse;
public class Application {
public static void main(String[] args) throws ErrorResponse, Exception {
AriesJava sdk = AriesJava.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
UpdateOrderRequest req = UpdateOrderRequest.builder()
.orderId(628998L)
.account("49839745")
.symbol("<value>")
.quantity(448383L)
.orderType("<value>")
.tradeAction("<value>")
.timeInForce("<value>")
.build();
UpdateOrderResponse res = sdk.orders().update()
.request(req)
.call();
if (res.updateOrderResponse().isPresent()) {
// handle response
}
}
}curl --request PUT \
--url https://api.tradearies.dev/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"orderId": 123,
"account": "<string>",
"symbol": "<string>",
"quantity": 123,
"orderType": "<string>",
"tradeAction": "<string>",
"timeInForce": "<string>",
"route": "<string>",
"limitPrice": "<string>",
"stopPrice": "<string>",
"legs": [
{
"symbol": "<string>",
"ratioQuantity": "<string>",
"tradeAction": "<string>",
"positionEffect": "<string>"
}
]
}
'import requests
url = "https://api.tradearies.dev/v1/orders"
payload = {
"orderId": 123,
"account": "<string>",
"symbol": "<string>",
"quantity": 123,
"orderType": "<string>",
"tradeAction": "<string>",
"timeInForce": "<string>",
"route": "<string>",
"limitPrice": "<string>",
"stopPrice": "<string>",
"legs": [
{
"symbol": "<string>",
"ratioQuantity": "<string>",
"tradeAction": "<string>",
"positionEffect": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
orderId: 123,
account: '<string>',
symbol: '<string>',
quantity: 123,
orderType: '<string>',
tradeAction: '<string>',
timeInForce: '<string>',
route: '<string>',
limitPrice: '<string>',
stopPrice: '<string>',
legs: [
{
symbol: '<string>',
ratioQuantity: '<string>',
tradeAction: '<string>',
positionEffect: '<string>'
}
]
})
};
fetch('https://api.tradearies.dev/v1/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://api.tradearies.dev/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'orderId' => 123,
'account' => '<string>',
'symbol' => '<string>',
'quantity' => 123,
'orderType' => '<string>',
'tradeAction' => '<string>',
'timeInForce' => '<string>',
'route' => '<string>',
'limitPrice' => '<string>',
'stopPrice' => '<string>',
'legs' => [
[
'symbol' => '<string>',
'ratioQuantity' => '<string>',
'tradeAction' => '<string>',
'positionEffect' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tradearies.dev/v1/orders"
payload := strings.NewReader("{\n \"orderId\": 123,\n \"account\": \"<string>\",\n \"symbol\": \"<string>\",\n \"quantity\": 123,\n \"orderType\": \"<string>\",\n \"tradeAction\": \"<string>\",\n \"timeInForce\": \"<string>\",\n \"route\": \"<string>\",\n \"limitPrice\": \"<string>\",\n \"stopPrice\": \"<string>\",\n \"legs\": [\n {\n \"symbol\": \"<string>\",\n \"ratioQuantity\": \"<string>\",\n \"tradeAction\": \"<string>\",\n \"positionEffect\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.tradearies.dev/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orderId\": 123,\n \"account\": \"<string>\",\n \"symbol\": \"<string>\",\n \"quantity\": 123,\n \"orderType\": \"<string>\",\n \"tradeAction\": \"<string>\",\n \"timeInForce\": \"<string>\",\n \"route\": \"<string>\",\n \"limitPrice\": \"<string>\",\n \"stopPrice\": \"<string>\",\n \"legs\": [\n {\n \"symbol\": \"<string>\",\n \"ratioQuantity\": \"<string>\",\n \"tradeAction\": \"<string>\",\n \"positionEffect\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"orderId": 123,
"status": "<string>"
}{
"error": "<string>",
"codes": [
{
"code": "<string>",
"description": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Order ID to update
Account ID
Trading symbol
Order quantity
Order type (MARKET, LIMIT, STOP, STOP_LIMIT)
Trade action (BUY, SELL)
Time in force (DAY, GTC, IOC, FOK)
Order routing destination
Limit price for limit orders
Stop price for stop orders
Legs for multi-leg orders
Show child attributes
Show child attributes
Was this page helpful?
⌘I