As this is an older post you have probably already worked it out but this is similar to what I use but with V1
Using VS Code you need both
pip install gspread oauth2client requests
pip install tabulate
----------------------------------------------------------------------------------------------
import requests
from tabulate import tabulate
def pull_flying_item_prices():
# Insert your Torn API key directly here or prompt for it
api_key = "KEY" # Replace with your actual API key
# Torn API URL
url = f"https://api.torn.com/torn/?selections=items&key={api_key}"
response = requests.get(url)
data = response.json()
items = data.get("items", {})
# Relevant item IDs
flying_item_ids = [
282, 617, 271, 277, 263, 260, 272, 267, 264, 276, 385, # Flowers
384, 273, 258, 215, 281, 269, 266, 274, 268, 186, 618, 187, 261, # Plushies
206 # Xanax
]
# Prepare data for printing
output = []
for item_id in flying_item_ids:
item = items.get(str(item_id))
if item:
output.append([item["name"], item_id, f"${item['market_value']:,}"])
# Print table
print(tabulate(output, headers=["Item Name", "Item ID", "Market Value ($)"], tablefmt="pretty"))
# Run the function
pull_flying_item_prices()
-----------------------------------------------------------------------------------------------------
To change to what items you want just change IDs hope this helped
It returns this:
+--------------------+---------+------------------+
| Item Name | Item ID | Market Value ($) |
+--------------------+---------+------------------+
| African Violet | 282 | $54,084 |
| Banana Orchid | 617 | $8,021 |
| Ceibo Flower | 271 | $27,404 |
| Cherry Blossom | 277 | $45,843 |
| Crocus | 263 | $5,395 |
| Dahlia | 260 | $1,826 |
| Edelweiss | 272 | $2,042 |
| Heather | 267 | $35,129 |
| Orchid | 264 | $14,685 |
| Peony | 276 | $54,765 |
| Tribulus Omanense | 385 | $61,837 |
| Camel Plushie | 384 | $72,474 |
| Chamois Plushie | 273 | $6,415 |
| Jaguar Plushie | 258 | $14,417 |
| Kitten Plushie | 215 | $617 |
| Lion Plushie | 281 | $57,085 |
| Kitten Plushie | 215 | $617 |
| Kitten Plushie | 215 | $617 |
| Kitten Plushie | 215 | $617 |
| Lion Plushie | 281 | $57,085 |
| Monkey Plushie | 269 | $33,273 |
| Nessie Plushie | 266 | $30,006 |
| Panda Plushie | 274 | $51,649 |
| Red Fox Plushie | 268 | $31,882 |
| Sheep Plushie | 186 | $599 |
| Stingray Plushie | 618 | $6,135 |
| Teddy Bear Plushie | 187 | $608 |
| Wolverine Plushie | 261 | $6,212 |
| Xanax | 206 | $841,177 |
+--------------------+---------+------------------+