Skip to content

yatoiv/rust-query-api

 
 

Repository files navigation

Rust Query API

downloads license license

A versatile API facade for the Hypixel Auction API written in Rust. The entire auction house is fetched with NBT parsing and inserted into a PostgreSQL database in about 3-7 seconds every minute with low memory usage (can vary depending on enabled features, network speed, and latency of the Hypixel API)! You can query by auction UUID, auctioneer, end time, item name, item tier, item id, price, enchants, bin and bids. You can sort by the item's bin / starting price. You can track the last known price of each unique pet-level-rarity combination. You can track the lowest prices of all bins. It also can track new bins that are at least one million lower than previous bins. Lastly, it can track the average auction prices and sales up to five days with custom 'averaging methods'.

Set Up

Prerequisites

Steps

  • Clone the repository
  • Rename the .example_env file to .env and fill out all fields OR set all fields using environment variables
  • Run cargo run --release (may take some time to build)
  • Use it!

Configuration Fields or Environment Variables

  • BASE_URL: The base URL of the domain such as 127.0.0.1
  • PORT: The port such as 8080
  • API_KEY: Key needed to access this API (NOT a Hypixel API key)
  • ADMIN_API_KEY: Admin key required to use raw SQL parameters. Will default to the API_KEY if not provided
  • POSTGRES_URL: Full URL of a PostgreSQL database
  • WEBHOOK_URL: Discord webhook URL for logging
  • FEATURES: The features (QUERY, PETS, LOWESTBIN, UNDERBIN, AVERAGE_AUCTION) you want to be enabled separated with a '+'

Usage

Endpoints

  • /query
  • /pets
  • /lowestbin
  • /underbin
  • /average_auction

Docs & Examples

  • See docs and examples here

Deploy To Railway

Deploy on Railway

Todo

  • Better documentation & more examples
  • Improve underbin
  • Deply on Heroku instructions

About

A versatile API facade for the Hypixel Auction API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 97.1%
  • Dockerfile 2.8%
  • Procfile 0.1%