Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skecskes/axie-activity
API to ingest and serve items sold for Axie
https://github.com/skecskes/axie-activity
Last synced: 3 days ago
JSON representation
API to ingest and serve items sold for Axie
- Host: GitHub
- URL: https://github.com/skecskes/axie-activity
- Owner: skecskes
- Created: 2023-03-03T10:28:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-03-20T16:38:01.000Z (over 1 year ago)
- Last Synced: 2024-05-02T02:59:17.844Z (7 months ago)
- Language: Python
- Size: 761 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Axie Activity API
## Dependencies
This API is now dependent on the ingestor and postgres DB docker instances.
While ingestor ingests events from Ronin node and push the data to postgres DB,
this API will try to connect to DB and serve events from DB.## Description
This is POC to [task.pdf](task.pdf). Just 2 endpoints:
- GET /refresh -> endpoint will store last items sold, I believe it gets around 200 last events
- GET /activity/{ronin_address} endpoint will get item sales from DB (through GraphQL)
- GET /events/{ronin_address} endpoint will get transfer events (through `ingestor` from ronin EVM node) from DB## Local run
**System requirements**
- python 3.7
- pip
- love for gamesCreate project specific environment for dependencies
python3 -m venv .venv
Activate project libraries:
source .venv/bin/activate
Install all project dependencies:
pip install -r requirements.txt
Run the app
uvicorn src.main:app --reload
***Swagger available at http://127.0.0.1:8000/docs#/***
![Example request](swagger.png "example request")![Activity from GraphQL](GETactivity.png "activity from API")
![Events from EVM node](GETevents.png "events from EVM node")