Get Symbol Details
curl --request GET \
--url 'https://api.example.com/api/symbols/<symbol>'import requests
url = "https://api.example.com/api/symbols/<symbol>"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/symbols/<symbol>', 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.example.com/api/symbols/<symbol>",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/symbols/<symbol>"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/symbols/<symbol>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/symbols/<symbol>")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"symbol": "<string>",
"summary": {},
"trades": [
{}
],
"dividends": [
{}
]
},
"data_source": "<string>"
}Symbols
Get Symbol Details
Retrieves detailed information for a specific symbol including all trades, dividends, and statistics
GET
/
api
/
symbols
/
<symbol>
Get Symbol Details
curl --request GET \
--url 'https://api.example.com/api/symbols/<symbol>'import requests
url = "https://api.example.com/api/symbols/<symbol>"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/symbols/<symbol>', 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.example.com/api/symbols/<symbol>",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/symbols/<symbol>"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/symbols/<symbol>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/symbols/<symbol>")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"symbol": "<string>",
"summary": {},
"trades": [
{}
],
"dividends": [
{}
]
},
"data_source": "<string>"
}Endpoint
GET /api/symbols/<symbol>
Authentication
Requires OAuth 2.0 authentication via session cookies.Parameters
string
required
Stock ticker symbol (e.g., AAPL, TSLA)
Response
boolean
required
Indicates if the request was successful
object
required
string
required
Database source (always “postgresql”)
Example
curl -X GET https://performance.miningwood.com/api/symbols/AAPL \
-H "Cookie: session=your_session_cookie"
async function getSymbolDetails(symbol) {
const response = await fetch(`/api/symbols/${symbol}`);
const data = await response.json();
if (data.success) {
const { summary, trades, dividends } = data.data;
console.log(`${symbol} Summary:`, summary);
console.log(`Total Trades: ${trades.length}`);
console.log(`Total Dividends: ${dividends.length}`);
}
}
getSymbolDetails('AAPL');
import requests
def get_symbol_details(symbol):
response = requests.get(f'https://performance.miningwood.com/api/symbols/{symbol}')
data = response.json()
if data['success']:
return data['data']
else:
raise Exception(f"Error: {data.get('error')}")
details = get_symbol_details('AAPL')
print(f"Trading P&L: ${details['summary']['trading_profit_loss']:.2f}")
Response Example
{
"success": true,
"data": {
"symbol": "AAPL",
"summary": {
"total_trades": 25,
"trading_profit_loss": 3450.50,
"winning_trades": 18,
"win_rate_percentage": 72.0,
"avg_profit_loss": 138.02,
"min_profit_loss": -250.00,
"max_profit_loss": 550.00,
"avg_return_pct": 2.15,
"min_return_pct": -3.5,
"max_return_pct": 5.8,
"avg_holding_days": 12,
"total_volume": 2500,
"total_cost_basis": 487500.00,
"first_trade_date": "2024-01-15",
"last_trade_date": "2024-08-30",
"total_dividend_payments": 8,
"total_dividends": 320.00,
"avg_dividend_amount": 40.00,
"first_dividend_date": "2024-02-15",
"last_dividend_date": "2024-08-15",
"total_return": 3770.50,
"current_shares_held": 100
},
"trades": [
{
"buy_date": "2024-08-01",
"sell_date": "2024-08-15",
"buy_price": 195.50,
"sell_price": 198.75,
"volume": 100,
"total_profit_loss": 325.00,
"return_percentage": 1.66,
"trade_result": "Win",
"holding_days": 14
}
],
"dividends": [
{
"transaction_date": "2024-08-15",
"action": "Cash Dividend",
"amount": 40.00
}
]
},
"data_source": "postgresql"
}
Summary Statistics
Thesummary object includes:
| Statistic | Description |
|---|---|
| Trading Metrics | Total trades, winning trades, win rate, average P&L |
| Performance Range | Min/max profit loss and return percentages |
| Holding Pattern | Average holding days |
| Volume & Cost | Total volume traded and cost basis |
| Dividend Income | Payment count, total amount, average |
| Date Range | First and last trade/dividend dates |
| Current Position | Shares currently held |
Error Response
{
"success": false,
"error": "Symbol not found"
}
404 Not Found
Related Endpoints
Symbols Summary
Get summary stats for all symbols
Timeframe Data
Filter by date range and symbols
Was this page helpful?
⌘I