Skip to content

Instantly share code, notes, and snippets.

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

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.


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 '-', ''
$result = Invoke-RestMethod "https://data.sec.gov/submissions/CIK0000857156.json" -Headers @{ 'User-Agent' = 'dharmatech [email protected]' }
# $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"
$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'
$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)
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
$base = 'https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v1/accounting/dts'
$rest_url = '/dts_table_2?filter=record_date:gte:{0},transaction_catg:eq:{1},transaction_today_amt:gte:{2}&fields=record_date,transaction_type,transaction_catg,transaction_today_amt&page[number]=1&page[size]=900'
$date = '2000-01-01'
$category = 'Interest on Treasury Securities'
$result = Invoke-RestMethod -Method Get -Uri ($base + $rest_url -f $date, $category, 1000)
PS C:\Users\dharm\Dropbox\Documents\tga-projection.ps1> $look_back
record_date transaction_type transaction_catg transaction_today_amt
----------- ---------------- ---------------- ---------------------
2020-04-01 Withdrawals HHS - Grants to States for Medicaid 1317
2020-04-02 Withdrawals HHS - Grants to States for Medicaid 4007
2020-04-03 Withdrawals HHS - Grants to States for Medicaid 2182
2020-04-06 Withdrawals HHS - Grants to States for Medicaid 1239
2020-04-07 Withdrawals HHS - Grants to States for Medicaid 2445
2020-04-08 Withdrawals HHS - Grants to States for Medicaid 915
$base = 'https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v1/accounting/dts'
$rest_url = '/dts_table_2?filter=record_date:gte:{0},transaction_catg:eq:{1}&fields=record_date,transaction_type,transaction_catg,transaction_today_amt&page[number]=1&page[size]=300'
$date = '2023-01-01'
# ----------------------------------------------------------------------
# https://www.opm.gov/policy-data-oversight/pay-leave/federal-holidays/#url=2023