curl --request GET \
--url https://api.trysoar.com/v1/markets/{market_id}/snapshot \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.trysoar.com/v1/markets/{market_id}/snapshot"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.trysoar.com/v1/markets/{market_id}/snapshot', 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.trysoar.com/v1/markets/{market_id}/snapshot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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.trysoar.com/v1/markets/{market_id}/snapshot"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
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.trysoar.com/v1/markets/{market_id}/snapshot")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trysoar.com/v1/markets/{market_id}/snapshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"market": {
"ticker": "<string>",
"market_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_ticker": "<string>",
"project_market_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"outcome_label": "<string>",
"state": "active",
"min_price": 123,
"max_price": 123,
"tick_size": 123,
"maker_fee_rate": "0.0700",
"taker_fee_rate": "0.0700",
"open_interest": 1,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"strike_value": "1050000000000.00",
"strike_unit": "<string>",
"last_price": 123
},
"orderbook": {
"ticker": "<string>",
"market_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"as_of": "2023-11-07T05:31:56Z",
"bids": [
{
"price": 50,
"size": 1
}
],
"asks": [
{
"price": 50,
"size": 1
}
]
},
"stats": {
"volume_usd": "<string>",
"open_interest": 1,
"last_price": 50
},
"positions": [
{
"ticker": "<string>",
"market_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_ticker": "<string>",
"outcome": "yes",
"qty": 1,
"cost_basis": 123,
"avg_entry_price": 123,
"realized_pnl": 123
}
],
"resting_orders": [
{
"order_id": "<string>",
"ticker": "<string>",
"market_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_ticker": "<string>",
"outcome": "yes",
"side": "buy",
"price": 50,
"qty": 1,
"remaining_qty": 1,
"filled_qty": 1,
"status": "accepted",
"time_in_force": "gtc",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"client_order_id": "<string>",
"reserved_cents": 1,
"spent_cents": 2
}
],
"last_trade": {
"trade_id": "<string>",
"ticker": "<string>",
"market_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 50,
"qty": 1,
"created_at": "2023-11-07T05:31:56Z"
}
}{
"code": "unauthenticated",
"error": "API key or bearer token required"
}{
"code": "forbidden_scope",
"error": "api key lacks scope: trade"
}{
"code": "invalid_request_body",
"error": "<string>",
"details": "<string>"
}{
"code": "rate_limited",
"error": "rate limited (per-api-key)"
}Get everything about one market in a single call
The endpoint to call first. It returns the market’s metadata, its order book, its last print, its activity, and your own position and resting orders in it — the five reads you would otherwise issue separately and have to join yourself.
Caller-scoped: positions and resting_orders are the authenticated
key’s, never anyone else’s.
Two things it deliberately does not include. Your cash balance is not
per-market — read /portfolio/balance once and cache it, rather than
re-fetching it per market. And the sibling rungs of a ladder are not
here either: follow market.event_ticker to
GET /events/{event_ticker} for the whole ladder in strike order.
curl --request GET \
--url https://api.trysoar.com/v1/markets/{market_id}/snapshot \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.trysoar.com/v1/markets/{market_id}/snapshot"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.trysoar.com/v1/markets/{market_id}/snapshot', 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.trysoar.com/v1/markets/{market_id}/snapshot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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.trysoar.com/v1/markets/{market_id}/snapshot"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
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.trysoar.com/v1/markets/{market_id}/snapshot")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trysoar.com/v1/markets/{market_id}/snapshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"market": {
"ticker": "<string>",
"market_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_ticker": "<string>",
"project_market_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"outcome_label": "<string>",
"state": "active",
"min_price": 123,
"max_price": 123,
"tick_size": 123,
"maker_fee_rate": "0.0700",
"taker_fee_rate": "0.0700",
"open_interest": 1,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"strike_value": "1050000000000.00",
"strike_unit": "<string>",
"last_price": 123
},
"orderbook": {
"ticker": "<string>",
"market_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"as_of": "2023-11-07T05:31:56Z",
"bids": [
{
"price": 50,
"size": 1
}
],
"asks": [
{
"price": 50,
"size": 1
}
]
},
"stats": {
"volume_usd": "<string>",
"open_interest": 1,
"last_price": 50
},
"positions": [
{
"ticker": "<string>",
"market_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_ticker": "<string>",
"outcome": "yes",
"qty": 1,
"cost_basis": 123,
"avg_entry_price": 123,
"realized_pnl": 123
}
],
"resting_orders": [
{
"order_id": "<string>",
"ticker": "<string>",
"market_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_ticker": "<string>",
"outcome": "yes",
"side": "buy",
"price": 50,
"qty": 1,
"remaining_qty": 1,
"filled_qty": 1,
"status": "accepted",
"time_in_force": "gtc",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"client_order_id": "<string>",
"reserved_cents": 1,
"spent_cents": 2
}
],
"last_trade": {
"trade_id": "<string>",
"ticker": "<string>",
"market_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price": 50,
"qty": 1,
"created_at": "2023-11-07T05:31:56Z"
}
}{
"code": "unauthenticated",
"error": "API key or bearer token required"
}{
"code": "forbidden_scope",
"error": "api key lacks scope: trade"
}{
"code": "invalid_request_body",
"error": "<string>",
"details": "<string>"
}{
"code": "rate_limited",
"error": "rate limited (per-api-key)"
}Authorizations
Per-user API key. Create and revoke keys from your SOAR account settings. A revoked key stops working within 60 seconds.
Path Parameters
The market's ticker or its event_market_id UUID. Tickers are
case-insensitive.
^[A-Za-z0-9.](?:[A-Za-z0-9.-]*[A-Za-z0-9.])?$"ANTHROPIC-VALUATION-26Q3-1.05T"
Response
The market and your state in it.
Everything you need to decide on one market, in one call.
Sections fail differently, on purpose. Market colour — the order
book and the last print — degrades to an empty value if its backing
store is unavailable, because four of five sections beat none, and
orderbook.as_of already tells you the depth is not fresh. Your own
state never degrades: if positions or resting orders cannot be read the
whole call fails, because an empty resting_orders you believe reads as
"nothing working here", and a quoter that believes that re-quotes on top
of its own live orders.
A brand-new market — no book, no trades, no position, no orders — is a
well-formed object with empty arrays and an absent last_trade. That is
the common case for a new listing, not an error.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Your holdings in this market, [] when you hold none.
An array, not a single object, and that matters: you can hold YES and NO in the same market at once, so one market can produce two entries. Code that reads only the first drops a leg of its own hedge.
Show child attributes
Show child attributes
Your still-working orders in this market — the resting status
group. [] when you have none.
Together with positions this also gives you your free inventory,
which no single endpoint reports: your sell-side remaining_qty
here is the part of your position that is already committed.
Show child attributes
Show child attributes
The most recent print. Absent when the market has never traded — not a zero-valued object, which would read as "last printed at 0".
Show child attributes
Show child attributes
Was this page helpful?