Skip to content

Instantly share code, notes, and snippets.

View area-under-usts-yield-curve.ps1
Param([string[]] $years, [switch]$display_chart_url, [switch]$save_iframe)
if ($years -eq $null)
{
$years = @(Get-Date -Format 'yyyy')
}
# ----------------------------------------------------------------------
View polygon-io-websocket-trades-show-if-higher-filtered-table-release.py
# ----------------------------------------------------------------------
# Uses the polygon-api-client package:
# https://github.com/polygon-io/client-python
# Start the script like this:
# python -i polygon-io-websocket-trades-show-if-higher-filtered-table-release.py
View options-filtered-hod-2023-08-02.txt
06:30:00.006000 AMZN 23-10-20 C 120.00 O:AMZN231020C00120000 15.50 300 465,000 ['Automatic Execution']
06:30:00.571000 PDD 23-08-04 C 70.00 O:PDD230804C00070000 16.90 225 380,249 ['Automatic Execution']
06:30:00.860000 LRCX 23-09-15 P 700.00 O:LRCX230915P00700000 27.00 50 135,000 ['Automatic Execution']
06:30:01.205000 TSLA 25-12-19 C 350.00 O:TSLA251219C00350000 58.00 100 580,000 ['Automatic Execution']
06:30:01.272000 COIN 24-04-19 P 65.00 O:COIN240419P00065000 10.75 200 215,000 ['Multi Leg auto-electronic trade']
06:30:01.272000 COIN 24-04-19 C 115.00 O:COIN240419C00115000 17.46 300 523,800 ['Multi Leg auto-electronic trade']
06:30:01.929000 MSTR 24-06-21 C 320.00 O:MSTR240621C00320000 172.45 8 137,960 ['Automatic Execution']
06:30:01.535000 FXI 25-01-17 C 32.85 O:FXI250117C00032850 3.10 123 38,130 ['Automatic Execution']
06:30:01.847000
View Hebrews-10-26-30.md

Dear friends, if we deliberately continue sinning after we have received knowledge of the truth, there is no longer any sacrifice that will cover these sins. There is only the terrible expectation of God’s judgment and the raging fire that will consume his enemies. For anyone who refused to obey the law of Moses was put to death without mercy on the testimony of two or three witnesses. Just think how much worse the punishment will be for those who have trampled on the Son of God, and have treated the blood of the covenant, which made us holy, as if it were common and unholy, and have insulted and disdained the Holy Spirit who brings God’s mercy to us. For we know the one who said, “I will take revenge. I will pay them back.” He also said, “The Lord will judge his own people.” Hebrews 10:26‭-‬30 NLT https://bible.com/bible/116/heb.10.26-30.NLT


Cavazos: If this is true, then the vast majority of us are in serious trouble.


View sec-gov-api-get-recent-filings.ps1
function get-recent-filings ([string]$cik)
{
$cik_padded = $cik.PadLeft(10, '0')
$result = Invoke-RestMethod "https://data.sec.gov/submissions/CIK$cik_padded.json" -Headers @{ 'User-Agent' = $SEC_GOV_USER_AGENT }
for ($i = 0; $i -lt $result.filings.recent.accessionNumber.Count; $i++)
{
$a = $result.filings.recent.accessionNumber[$i] -replace '-', ''
View sec-gov-api-paths.ps1
$result = Invoke-RestMethod "https://data.sec.gov/submissions/CIK0000857156.json" -Headers @{ 'User-Agent' = 'dharmatech wayo.cavazos@gmail.com' }
# $result.cik
$paths = for ($i = 0; $i -lt $result.filings.recent.accessionNumber.Count; $i++)
{
$a = $result.filings.recent.accessionNumber[$i] -replace '-', ''
$b = $result.filings.recent.primaryDocument[$i]
"https://www.sec.gov/Archives/edgar/data/$($result.cik)/$a/$b"
View treasury-gov-tga-chart-table-iii-a-public-debt-transactions.ps1
$base = 'https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v1/accounting/dts'
# $date = '2022-12-15'
#
# $result_raw = Invoke-RestMethod -Method Get -Uri ($base + '/dts_table_3a?filter=record_date:eq:{0}&page[number]=1&page[size]=300' -f $date)
#
# $result_raw.data | ft *
$date = '2022-01-01'
View polygon-io-websocket-options-large-value-shared.ps1
$api_key = '{0}' -f (Get-Content C:\Users\dharm\Dropbox\api-keys\polygon-io)
$ws = [System.Net.WebSockets.ClientWebSocket]::new()
$buffer = [byte[]]::new(1024 * 4)
function send ($msg)
{
$msg_bytes = [System.Text.Encoding]::UTF8.GetBytes($msg)
View treasury-direct-912796XQ7.txt
cusip : 912796XQ7
issueDate : 2023-06-05T00:00:00
securityType : Bill
securityTerm : 38-Day
maturityDate : 2023-07-13T00:00:00
interestRate :
refCpiOnIssueDate :
refCpiOnDatedDate :
announcementDate : 2023-06-02T00:00:00
auctionDate : 2023-06-02T00:00:00