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.orders.create(request={
"price": "150.00",
"qty": "10",
"side": models.OrderSideEnum.BUY,
"symbol": "AAPL",
"time_in_force": models.OrderRequestTimeInForceEnum.DAY,
"trading_account_id": "TEST-ACCOUNT-001",
"type": models.OrderTypeEnum.LIMIT,
})
assert res.ord_response is not None
# Handle response
print(res.ord_response)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.orders.create({
price: "150.00",
qty: "10",
side: "BUY",
symbol: "AAPL",
timeInForce: "DAY",
tradingAccountId: "TEST-ACCOUNT-001",
type: "LIMIT",
});
console.log(result);
}
run();curl --request POST \
--url https://api.aries.com/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"price": "150.00",
"qty": "10",
"side": "BUY",
"symbol": "AAPL",
"timeInForce": "DAY",
"tradingAccountId": "TEST-ACCOUNT-001",
"type": "LIMIT"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
price: '150.00',
qty: '10',
side: 'BUY',
symbol: 'AAPL',
timeInForce: 'DAY',
tradingAccountId: 'TEST-ACCOUNT-001',
type: 'LIMIT'
})
};
fetch('https://api.aries.com/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.aries.com/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'price' => '150.00',
'qty' => '10',
'side' => 'BUY',
'symbol' => 'AAPL',
'timeInForce' => 'DAY',
'tradingAccountId' => 'TEST-ACCOUNT-001',
'type' => 'LIMIT'
]),
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.aries.com/v1/orders"
payload := strings.NewReader("{\n \"price\": \"150.00\",\n \"qty\": \"10\",\n \"side\": \"BUY\",\n \"symbol\": \"AAPL\",\n \"timeInForce\": \"DAY\",\n \"tradingAccountId\": \"TEST-ACCOUNT-001\",\n \"type\": \"LIMIT\"\n}")
req, _ := http.NewRequest("POST", 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))
}HttpResponse<String> response = Unirest.post("https://api.aries.com/v1/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"price\": \"150.00\",\n \"qty\": \"10\",\n \"side\": \"BUY\",\n \"symbol\": \"AAPL\",\n \"timeInForce\": \"DAY\",\n \"tradingAccountId\": \"TEST-ACCOUNT-001\",\n \"type\": \"LIMIT\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"price\": \"150.00\",\n \"qty\": \"10\",\n \"side\": \"BUY\",\n \"symbol\": \"AAPL\",\n \"timeInForce\": \"DAY\",\n \"tradingAccountId\": \"TEST-ACCOUNT-001\",\n \"type\": \"LIMIT\"\n}"
response = http.request(request)
puts response.read_bodyPlace Order
Submits a new trading order to the market with specified parameters including symbol, quantity, order type, and price. Supports market, limit, stop, and stop-limit orders for both equity and option securities with advanced order features.
Use Case: Execute buy or sell orders for stocks and options with customizable order types, time-in-force settings, and execution instructions.
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.orders.create(request={
"price": "150.00",
"qty": "10",
"side": models.OrderSideEnum.BUY,
"symbol": "AAPL",
"time_in_force": models.OrderRequestTimeInForceEnum.DAY,
"trading_account_id": "TEST-ACCOUNT-001",
"type": models.OrderTypeEnum.LIMIT,
})
assert res.ord_response is not None
# Handle response
print(res.ord_response)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.orders.create({
price: "150.00",
qty: "10",
side: "BUY",
symbol: "AAPL",
timeInForce: "DAY",
tradingAccountId: "TEST-ACCOUNT-001",
type: "LIMIT",
});
console.log(result);
}
run();curl --request POST \
--url https://api.aries.com/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"price": "150.00",
"qty": "10",
"side": "BUY",
"symbol": "AAPL",
"timeInForce": "DAY",
"tradingAccountId": "TEST-ACCOUNT-001",
"type": "LIMIT"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
price: '150.00',
qty: '10',
side: 'BUY',
symbol: 'AAPL',
timeInForce: 'DAY',
tradingAccountId: 'TEST-ACCOUNT-001',
type: 'LIMIT'
})
};
fetch('https://api.aries.com/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.aries.com/v1/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'price' => '150.00',
'qty' => '10',
'side' => 'BUY',
'symbol' => 'AAPL',
'timeInForce' => 'DAY',
'tradingAccountId' => 'TEST-ACCOUNT-001',
'type' => 'LIMIT'
]),
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.aries.com/v1/orders"
payload := strings.NewReader("{\n \"price\": \"150.00\",\n \"qty\": \"10\",\n \"side\": \"BUY\",\n \"symbol\": \"AAPL\",\n \"timeInForce\": \"DAY\",\n \"tradingAccountId\": \"TEST-ACCOUNT-001\",\n \"type\": \"LIMIT\"\n}")
req, _ := http.NewRequest("POST", 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))
}HttpResponse<String> response = Unirest.post("https://api.aries.com/v1/orders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"price\": \"150.00\",\n \"qty\": \"10\",\n \"side\": \"BUY\",\n \"symbol\": \"AAPL\",\n \"timeInForce\": \"DAY\",\n \"tradingAccountId\": \"TEST-ACCOUNT-001\",\n \"type\": \"LIMIT\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"price\": \"150.00\",\n \"qty\": \"10\",\n \"side\": \"BUY\",\n \"symbol\": \"AAPL\",\n \"timeInForce\": \"DAY\",\n \"tradingAccountId\": \"TEST-ACCOUNT-001\",\n \"type\": \"LIMIT\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Body
The order to place. Required: at least one of accountId or tradingAccountId, symbol, side, type, qty, timeInForce. Add price for limit-style orders, stopPrice for stop-style orders, and legs for option orders. You may also send an OSI option symbol in symbol without legs and let the backend derive the option instrument.
- Option 1
- Option 2
Request body for placing a live order through the core trading API. Use Preview Order first when available, then submit this only after the user confirms the trade.
Which direction to trade in. Pick one:
BUY— buying shares or contracts (opens a long position or closes an existing short).SELL— selling shares or contracts you already hold (closes a long position).SELL_SHORT— selling shares you do not own (opens a short position). Subject to short-sale regulations.BUY_TO_COVER— buying shares to close an open short position.
BUY, SELL, SELL_SHORT, BUY_TO_COVER "BUY"
How long the order should stay alive before automatically cancelling. Pick one:
DAY— Active until the end of today's regular trading session, then cancelled if not filled. The default choice for most orders.GTC— Good 'Til Cancelled. Stays open across multiple trading days until you cancel it (the broker may cap at 60–90 days).IOC— Immediate Or Cancel. Fill whatever you can right now; cancel the rest immediately. Useful when you want partial fills but no resting order.FOK— Fill Or Kill. Fill the entire order immediately, or cancel it entirely. No partial fills allowed.EXTENDED_HOURS— Active during pre-market and after-hours trading sessions in addition to regular hours.AT_THE_OPENING— Execute at the official market open price; if it can't fill at open, it's cancelled.AT_THE_CLOSE— Execute at the official market close price; if it can't fill at close, it's cancelled.
DAY, GTC, IOC, FOK, EXTENDED_HOURS, AT_THE_OPENING, AT_THE_CLOSE, ATO, ATC, EXT "DAY"
How the order is priced. Pick one:
MARKET— Execute immediately at the best available price. Fast and guaranteed to fill, but no price guarantee — the actual fill price can move during execution.LIMIT— Execute only at the limitpriceor better (lower for buys, higher for sells). Gives you price control, no execution guarantee. Requires thepricefield.STOP— Sits inactive until the market hitsstopPrice, then converts to a market order. Common for stop-loss exits. Requires thestopPricefield.STOP_LIMIT— Sits inactive until the market hitsstopPrice, then converts to a limit order atprice. More control thanSTOP, but the limit may not fill. Requires bothstopPriceandprice.
MARKET, LIMIT, STOP, STOP_LIMIT "LIMIT"
Response
Order placed successfully
Response returned after submitting an order request. Treat it as acknowledgement and continue monitoring order status until final fill, cancel, or rejection.
Which direction to trade in. Pick one:
BUY— buying shares or contracts (opens a long position or closes an existing short).SELL— selling shares or contracts you already hold (closes a long position).SELL_SHORT— selling shares you do not own (opens a short position). Subject to short-sale regulations.BUY_TO_COVER— buying shares to close an open short position.
BUY, SELL, SELL_SHORT, BUY_TO_COVER "BUY"
Current order lifecycle state, mirroring FIX Tag 39 (OrdStatus). Most common values you'll see:
PENDING_NEW— broker has not yet acknowledged the order.NEW— order is live on the exchange (working, not yet executing).PARTIALLY_FILLED— some ofqtyhas filled; checkcumQtyandleavesQty.FILLED— the entire order has executed.PENDING_CANCEL/CANCELED— cancel request in progress / completed.PENDING_REPLACE/REPLACED— replace request in progress / completed.REJECTED— broker refused the order; seeordRejReasonandtext.EXPIRED— order reached its time-in-force limit without filling.STOPPED,SUSPENDED,DONE_FOR_DAY,CALCULATED,ACCEPTED_FOR_BID,SUPERSEDED— additional FIX states; rare in normal flows.
NEW, PARTIALLY_FILLED, FILLED, DONE_FOR_DAY, CANCELED, REPLACED, PENDING_CANCEL, STOPPED, REJECTED, SUSPENDED, PENDING_NEW, CALCULATED, EXPIRED, ACCEPTED_FOR_BID, PENDING_REPLACE, SUPERSEDED "NEW"
Was this page helpful?