GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — hyperliquid-df/python-api at main · hakmarkdev/hyperliquid-df

Expand file tree

/

python-api

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

python-api

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
alembic
alembic
 
 
src/python_api
src/python_api
 
 
tests
tests
 
 
.python-version
.python-version
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
alembic.ini
alembic.ini
 
 
pyproject.toml
pyproject.toml
 
 
uv.lock
uv.lock
 
 

README.md

Outline

Python API

FastAPI service for fetching and processing market data with Redis-backed storage, JWT authentication, gRPC streaming, and OpenTelemetry observability.

Prerequisites

  • Python 3.11+
  • uv for dependency management
  • Redis (local or Docker)

Quick Start

# Start Redis
make redis-up

# Install dependencies
cd python-api && uv sync

# Copy and configure env
cp .env.example ../config/python-api.env
# Edit python-api.env — set JWT_SECRET_KEY (min 32 chars)

# Run the API server
make py-run

The API is available at http://localhost:8000. Interactive docs at /docs.

Development

# Run tests (requires Redis on localhost:6379)
make py-test

# Lint & format
make py-lint
make py-format

# Type checking
make py-check

Project Structure

src/python_api/
├── api/              # FastAPI routes and dependencies
│   ├── routes/       # auth, health, market, price
│   └── dependencies.py
├── grpc/             # gRPC server and protobuf definitions
├── middleware/        # Rate limiting, request ID
├── models/           # Pydantic request/response schemas
├── services/         # Business logic (auth, Rust API client)
└── utils/            # Config, logging, telemetry, errors

API Endpoints

Method Path Auth Description
GET /health/live No Liveness probe
GET /health/ready No Readiness probe (Redis)
POST /api/v1/auth/signup No Register a new user
POST /api/v1/auth/signin No Sign in and get JWT tokens
POST /api/v1/auth/signout Yes Revoke current token
GET /api/v1/price/{pair} Yes Get price for a pair
GET /api/v1/prices?pairs= Yes Get prices for multiple pairs
GET /api/v1/pairs Yes List available pairs
GET /allmids No Proxy to Rust API

Environment Variables

See .env.example for a full list with defaults.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.