Python (SDK)
from finance_dev import FinanceDev, models
import os
with FinanceDev(
security=models.Security(
client_id=os.getenv("FINANCE_DEV_CLIENT_ID", ""),
client_secret=os.getenv("FINANCE_DEV_CLIENT_SECRET", ""),
),
) as fd_client:
res = fd_client.options.get_option_last_trade(ticker="O:AAPL230120C00150000")
assert res.option_last_trade_response is not None
# Handle response
print(res.option_last_trade_response)curl --request GET \
--url https://api.aries.com/v1/options/last-trade \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aries.com/v1/options/last-trade', 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/options/last-trade",
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/options/last-trade"
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/options/last-trade")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/options/last-trade")
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{
"requestId": "c6f94e3d743860d032711055c19da4fe",
"results": {
"conditions": [
232
],
"exchange": 308,
"id": "2",
"participantTimestamp": 1674248368870000000,
"price": 0.01,
"sequenceNumber": 0,
"sipTimestamp": 1674248368870000000,
"size": 2,
"ticker": "O:AAPL230120C00150000"
},
"status": "OK"
}Options
Options Last Trade
Get the most recent trade for an options contract. Returns the latest executed options trade with price, size, and timestamp.
Use Case: Display real-time last trade information for options contracts on trading platforms and option chains.
GET
/
v1
/
options
/
last-trade
Python (SDK)
from finance_dev import FinanceDev, models
import os
with FinanceDev(
security=models.Security(
client_id=os.getenv("FINANCE_DEV_CLIENT_ID", ""),
client_secret=os.getenv("FINANCE_DEV_CLIENT_SECRET", ""),
),
) as fd_client:
res = fd_client.options.get_option_last_trade(ticker="O:AAPL230120C00150000")
assert res.option_last_trade_response is not None
# Handle response
print(res.option_last_trade_response)curl --request GET \
--url https://api.aries.com/v1/options/last-trade \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aries.com/v1/options/last-trade', 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/options/last-trade",
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/options/last-trade"
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/options/last-trade")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aries.com/v1/options/last-trade")
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{
"requestId": "c6f94e3d743860d032711055c19da4fe",
"results": {
"conditions": [
232
],
"exchange": 308,
"id": "2",
"participantTimestamp": 1674248368870000000,
"price": 0.01,
"sequenceNumber": 0,
"sipTimestamp": 1674248368870000000,
"size": 2,
"ticker": "O:AAPL230120C00150000"
},
"status": "OK"
}Authorizations
OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.
Query Parameters
Options contract ticker symbol. Enter the exact option symbol returned by option search or chain endpoints.
Example:
"O:AAPL230120C00150000"
Response
Successful response
Most recent trade for an options contract.
Was this page helpful?