curl --request POST \
--url https://api.engine.usesophic.com/accounts/{account_id}/order-quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instrument_id": "<string>",
"cash_amount": "1000.00",
"limit_price": "25.7500",
"quantity": "12.5000",
"return_only_fees": false
}
'import requests
url = "https://api.engine.usesophic.com/accounts/{account_id}/order-quotes"
payload = {
"instrument_id": "<string>",
"cash_amount": "1000.00",
"limit_price": "25.7500",
"quantity": "12.5000",
"return_only_fees": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
instrument_id: '<string>',
cash_amount: '1000.00',
limit_price: '25.7500',
quantity: '12.5000',
return_only_fees: false
})
};
fetch('https://api.engine.usesophic.com/accounts/{account_id}/order-quotes', 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.engine.usesophic.com/accounts/{account_id}/order-quotes",
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([
'instrument_id' => '<string>',
'cash_amount' => '1000.00',
'limit_price' => '25.7500',
'quantity' => '12.5000',
'return_only_fees' => false
]),
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.engine.usesophic.com/accounts/{account_id}/order-quotes"
payload := strings.NewReader("{\n \"instrument_id\": \"<string>\",\n \"cash_amount\": \"1000.00\",\n \"limit_price\": \"25.7500\",\n \"quantity\": \"12.5000\",\n \"return_only_fees\": false\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.engine.usesophic.com/accounts/{account_id}/order-quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instrument_id\": \"<string>\",\n \"cash_amount\": \"1000.00\",\n \"limit_price\": \"25.7500\",\n \"quantity\": \"12.5000\",\n \"return_only_fees\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engine.usesophic.com/accounts/{account_id}/order-quotes")
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 \"instrument_id\": \"<string>\",\n \"cash_amount\": \"1000.00\",\n \"limit_price\": \"25.7500\",\n \"quantity\": \"12.5000\",\n \"return_only_fees\": false\n}"
response = http.request(request)
puts response.read_body{
"cash_amount": "10000.00",
"created_at": "2023-11-07T05:31:56Z",
"currency": "EUR",
"estimate": {
"asof": "2023-11-07T05:31:56Z",
"fees": "1.00",
"net_cash_amount": "9999.00",
"price": "703.40",
"quantity": "14"
},
"expires_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"instrument": {
"days_to_maturity": 182,
"decimal_precision": 2,
"enforce_trading_rules": true,
"id": "<string>",
"initial_auction_date": "2024-12-30",
"initial_issue_date": "2025-01-02",
"instrument_type": "bill",
"isin": "US5949181045",
"issuer": "United States Department of the Treasury",
"issuer_country": "US",
"issuer_credit_rating": "AA+",
"latest_auction_date": "2025-01-27",
"latest_issue_date": "2025-01-30",
"maturity_date": "2025-07-03",
"minimum_initial_cash_investment": "1000.00",
"minimum_trading_quantity": "1.00",
"name": "Apple Inc.",
"price_type": "percent",
"pro_traders_only": true,
"required_cash_increment": 100,
"rollout_stage": "ga",
"supports_automatic_rollover": true,
"symbol": "US5949181045",
"trading_currency": "USD",
"trading_increment": "0.01",
"trading_status": "buy_sell",
"about": "Common stock listed on the Nasdaq Global Select Market.",
"exchange": "XNAS",
"icon_url": "https://storage.googleapis.com/sophic-assets/instrument-icons/in_x7GqT.png",
"ticker": "AAPL"
},
"is_binding": true,
"order_type": "market",
"reservation": {
"amount": "1000.00",
"denomination": "cash"
},
"side": "buy",
"quote_type": "etf_market_cash"
}{
"code": "<string>",
"detail": "<string>",
"context": {},
"docs": "<string>",
"params": [
{
"code": "<string>",
"detail": "<string>",
"path": [
123
]
}
]
}Get an order quote
Issues a quote for a prospective order. The quote captures the fees and estimated price/quantity that would apply, is persisted, and carries an id and expires_at; pass the id as quote_id at order placement to reference the previewed terms. Placement rejects expired quotes.
curl --request POST \
--url https://api.engine.usesophic.com/accounts/{account_id}/order-quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instrument_id": "<string>",
"cash_amount": "1000.00",
"limit_price": "25.7500",
"quantity": "12.5000",
"return_only_fees": false
}
'import requests
url = "https://api.engine.usesophic.com/accounts/{account_id}/order-quotes"
payload = {
"instrument_id": "<string>",
"cash_amount": "1000.00",
"limit_price": "25.7500",
"quantity": "12.5000",
"return_only_fees": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
instrument_id: '<string>',
cash_amount: '1000.00',
limit_price: '25.7500',
quantity: '12.5000',
return_only_fees: false
})
};
fetch('https://api.engine.usesophic.com/accounts/{account_id}/order-quotes', 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.engine.usesophic.com/accounts/{account_id}/order-quotes",
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([
'instrument_id' => '<string>',
'cash_amount' => '1000.00',
'limit_price' => '25.7500',
'quantity' => '12.5000',
'return_only_fees' => false
]),
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.engine.usesophic.com/accounts/{account_id}/order-quotes"
payload := strings.NewReader("{\n \"instrument_id\": \"<string>\",\n \"cash_amount\": \"1000.00\",\n \"limit_price\": \"25.7500\",\n \"quantity\": \"12.5000\",\n \"return_only_fees\": false\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.engine.usesophic.com/accounts/{account_id}/order-quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instrument_id\": \"<string>\",\n \"cash_amount\": \"1000.00\",\n \"limit_price\": \"25.7500\",\n \"quantity\": \"12.5000\",\n \"return_only_fees\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.engine.usesophic.com/accounts/{account_id}/order-quotes")
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 \"instrument_id\": \"<string>\",\n \"cash_amount\": \"1000.00\",\n \"limit_price\": \"25.7500\",\n \"quantity\": \"12.5000\",\n \"return_only_fees\": false\n}"
response = http.request(request)
puts response.read_body{
"cash_amount": "10000.00",
"created_at": "2023-11-07T05:31:56Z",
"currency": "EUR",
"estimate": {
"asof": "2023-11-07T05:31:56Z",
"fees": "1.00",
"net_cash_amount": "9999.00",
"price": "703.40",
"quantity": "14"
},
"expires_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"instrument": {
"days_to_maturity": 182,
"decimal_precision": 2,
"enforce_trading_rules": true,
"id": "<string>",
"initial_auction_date": "2024-12-30",
"initial_issue_date": "2025-01-02",
"instrument_type": "bill",
"isin": "US5949181045",
"issuer": "United States Department of the Treasury",
"issuer_country": "US",
"issuer_credit_rating": "AA+",
"latest_auction_date": "2025-01-27",
"latest_issue_date": "2025-01-30",
"maturity_date": "2025-07-03",
"minimum_initial_cash_investment": "1000.00",
"minimum_trading_quantity": "1.00",
"name": "Apple Inc.",
"price_type": "percent",
"pro_traders_only": true,
"required_cash_increment": 100,
"rollout_stage": "ga",
"supports_automatic_rollover": true,
"symbol": "US5949181045",
"trading_currency": "USD",
"trading_increment": "0.01",
"trading_status": "buy_sell",
"about": "Common stock listed on the Nasdaq Global Select Market.",
"exchange": "XNAS",
"icon_url": "https://storage.googleapis.com/sophic-assets/instrument-icons/in_x7GqT.png",
"ticker": "AAPL"
},
"is_binding": true,
"order_type": "market",
"reservation": {
"amount": "1000.00",
"denomination": "cash"
},
"side": "buy",
"quote_type": "etf_market_cash"
}{
"code": "<string>",
"detail": "<string>",
"context": {},
"docs": "<string>",
"params": [
{
"code": "<string>",
"detail": "<string>",
"path": [
123
]
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
ID of the instrument to quote.
The order side, buy or sell.
buy, sell The cash amount for a buy order.
"1000.00"
Optional limit price. When set, the quote is a deterministic bound: estimated_price echoes the limit, a cash buy returns affordable quantity and max_cost, a sell returns min_proceeds.
"25.7500"
The unit quantity for a sell order.
"12.5000"
Whether to return only applicable fees.
Response
Successful Response
- EtfMarketCashQuote
- EtfLimitCashQuote
- EtfMarketQuantityQuote
- EtfLimitQuantityQuote
- BillMarketCashQuote
- BondZeroCouponMarketCashQuote
- BondFixedCouponMarketCashQuote
- MmfMarketCashQuote
- AmcMarketCashQuote
- SellQuote
Cash the user chose to invest (before fees).
"10000.00"
When the quote was issued.
The currency every cash amount in this quote is given in.
EUR, USD, GBP Estimated economics at the latest price.
Show child attributes
Show child attributes
When the quote expires.
Quote ID, redeemable via quote_id at order placement.
The full instrument being quoted.
- Bill
- CurrencyPair
- Bond
- MoneyMarketFund
- AMC
- ETF
Show child attributes
Show child attributes
Whether the quoted price is binding at execution. Always false for security quotes; binding FX quotes are issued via /order-quotes/fx.
Market or limit.
market, limit What a placement referencing this quote would set aside.
Show child attributes
Show child attributes
Buy or sell.
buy, sell The kind of order quote returned, which determines the set of fields present in this response.