Crates.io | lowestbins |
lib.rs | lowestbins |
version | 1.4.1 |
source | src |
created_at | 2022-09-29 18:32:26.336713 |
updated_at | 2022-11-03 20:27:35.624884 |
description | Lowestbins made in rust for maximum efficiency |
homepage | https://lb.tricked.pro |
repository | https://github.com/tricked-dev/lowestbins |
max_upload_size | |
id | 676832 |
size | 3,312,844 |
A fast and effecient lowestbins implementation this uses parrallel requests to fetch all lowestbins in less than 2.5 SECONDS and uses the hyper server allowing for practically unlimited requests per second while only using 50mb of ram!
Lowestbins-rs is used by Skytils for the lowestbins feature.
If you are using this in a project please credit me! or sponsor me on github github.com/sponsors/Tricked-dev
node:
const fetch = require("undici"); // node-fetch also works
let json = await fetch("https://lb.tricked.pro/lowestbins").then((res) =>
res.json()
);
console.log(json["ENCHANTMENT_ULTIMATE_SWARM_2"]);
web/deno:
let json = await fetch("https://lb.tricked.pro/lowestbins").then((res) =>
res.json()
);
console.log(json["ENCHANTMENT_ULTIMATE_SWARM_2"]);
import requests
json = requests.get("https://lb.tricked.pro/lowestbins").json()
print(json["ENCHANTMENT_ULTIMATE_SWARM_2"])
/lowestbins
| /lowestbins.json
| /auctions/lowestbins
Returns a json object with all lowestbins
/lowestbins.txt
Returns a text file with all lowestbins easier to parse and smaller in size
/auction/{item}
| lowestbin/{item}
Returns the price of a item as number this endpoint can be used to get more up to date prices due to it not being cached as often
/metrics
Returns prometheus metrics of the prices
/
Returns basic data about the api and update time
docker run --name lowestbins -p 8080:8080 -e HOST=0.0.0.0 -e UPDATE_SECONDS=120 -d ghcr.io/tricked-dev/lowestbins:latest
cargo build --release
and the exe/binary should be in the ./target/release/lowestbins
.Env variables
PORT # The port to run the server on
HOST # The host to run the server on
SAVE_TO_DISK # set to 0 to not save the auctions to disk
OVERWRITES # Overwrite values format: `BLESSED_BAIT:200,ROCK_CANDY:6000,NON_EXISTENT_ITEM:200`
UPDATE_SECONDS # The amount of seconds to wait before updating the lowestbins
WEBHOOK_URL # The webhook url used for reporting the requests (discord/discord compatible)
RUST_LOG # The log level lowestbins=debug recommended
/metrics
Licensed under the Apache 2 License