• Dein Produkt auf beyond.lol
  • Kontakt
  • Kontakt
  • IP
  • Impressum
  • Datenschutz
  • Software
    • Open Source
  • Hardware
  • Tutorials
    • Web
    • Linux
    • Windows
    • Gaming
    • PHP
    • Raspberry Pi
  • Crypto-Welt
    • Altcoins
    • Bitcoin
    • Ethereum
    • Mining
  • Scripts
    • BASH
    • PowerShell
  • Lustiges aus der IT
    • Spamantworten
  • Gaming
  • and More
    • Dein Produkt auf beyond.lol
    • Kontakt
    • Impressum
    • Datenschutz
    • Tools
      • Wie ist meine IP?
No Result
View All Result
  • Software
    • Open Source
  • Hardware
  • Tutorials
    • Web
    • Linux
    • Windows
    • Gaming
    • PHP
    • Raspberry Pi
  • Crypto-Welt
    • Altcoins
    • Bitcoin
    • Ethereum
    • Mining
  • Scripts
    • BASH
    • PowerShell
  • Lustiges aus der IT
    • Spamantworten
  • Gaming
  • and More
    • Dein Produkt auf beyond.lol
    • Kontakt
    • Impressum
    • Datenschutz
    • Tools
      • Wie ist meine IP?
No Result
View All Result
No Result
View All Result
Home Scripts BASH

BASH Aktienkurs mit der Yahoo Finance API anzeigen

Patrick by Patrick
Dezember 19, 2022
in BASH, Scripts
10
0
Automatisches Update von Ubuntu aktivieren
1
SHARES
99
VIEWS
Auf Facebook teilenAuf Twitter teilenAuf Whatsapp teilen

Ein BASH Script welches den aktuellen Kurs einer Aktie mit der Yahoo Finance API anzeigen kann.

  1. Melde dich bei Yahoo Finance an und erstellen Sie einen neuen App-Schlüssel. Dieser wird benötigt, um auf die Yahoo Finance API zugreifen zu können.
  2. Erstelle nun eine neue Bash-Datei und fügen Sie den folgenden Code hinzu:
#!/bin/bash

# Set the App ID and stock ticker symbol
app_id=<your_app_id>
ticker=<ticker_symbol>

# Fetch the current price of the stock from Yahoo Finance
price=$(curl -s "https://apidojo-yahoo-finance-v1.p.rapidapi.com/market/get-quotes?region=US&lang=en&symbols=$ticker" \
  -H "X-RapidAPI-Key: $app_id" | jq -r '.quoteResponse .result[0] .regularMarketPrice')

# Print the current price
echo "The current price of $ticker is $price."

Ersetze <your_app_id> durch deinen Yahoo Finance App-Schlüssel und <ticker_symbol> durch das Ticker-Symbol der Aktie, die Sie anzeigen möchten.

Füge dem Script Ausführungsberechtigungen hinzu:

chmod +x stock_price.sh

Führen nun das Script aus, indem du den folgenden Befehl eingibst:

./stock_price.sh

Abhängigkeiten

Um dieses Script ausführen zu können, musst du das curl– und jq-Paket installiert haben.

sudo apt-get install curl jq
Tags: aktiebashyahoo
Previous Post

BASH Countdown bis Weihnachten

Next Post

BASH Aktiendaten für ein ganzes Jahr anzeigen. Open-, High-, Low- und Close-Preis über Yahoo Finance API

Patrick

Patrick

IT Systemadministrator

Next Post
Automatisches Update von Ubuntu aktivieren

BASH Aktiendaten für ein ganzes Jahr anzeigen. Open-, High-, Low- und Close-Preis über Yahoo Finance API

Schreibe einen Kommentar Antwort abbrechen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Bloggerei.de - Bewertung für beyond.lol
  • Dein Produkt auf beyond.lol
  • Kontakt
  • Kontakt
  • IP
  • Impressum
  • Datenschutz

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In

Add New Playlist

No Result
View All Result
  • Software
    • Open Source
  • Hardware
  • Tutorials
    • Web
    • Linux
    • Windows
    • Gaming
    • PHP
    • Raspberry Pi
  • Crypto-Welt
    • Altcoins
    • Bitcoin
    • Ethereum
    • Mining
  • Scripts
    • BASH
    • PowerShell
  • Lustiges aus der IT
    • Spamantworten
  • Gaming
  • and More
    • Dein Produkt auf beyond.lol
    • Kontakt
    • Impressum
    • Datenschutz
    • Tools
      • Wie ist meine IP?

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.