phisix
Simple PSEi (formerly known as PHISIX) RESTful API hosted on Google AppEngine
⚠️ IMPORTANT NOTICE: The public phisix-api.appspot.com service has been discontinued for legal reasons.
A takedown notice was received on November 30, 2023, and the service was shut down on December 4, 2023.
To access Philippine Stock Exchange data, please deploy your own instance using the instructions below.
Development & Deployment
Prerequisites
- Java 21 (OpenJDK recommended)
 - Maven 3.6+
 - Google Cloud SDK (for App Engine deployment)
 - Git
 
Quick Start
- 
Clone the repository
git clone https://github.com/phisix-org/phisix.git cd phisix - 
Build the project
mvn clean compile - 
Run tests
mvn test - 
Run full verification (includes integration tests & code coverage)
mvn clean verify - 
Run locally (for development)
mvn clean package appengine:run 
Local Development
Running with App Engine Development Server
Note: Always use mvn clean package appengine:run during development to ensure:
- Source code changes are recompiled
 - Tests are executed
 - Documentation changes are regenerated
 - Site content is updated with latest modifications
 - WAR file is properly packaged
 
- 
Stage the application (optional - for testing staging process)
mvn clean package appengine:stage - 
Run locally (recommended for development)
mvn clean package appengine:runThe API will be available at:
http://localhost:8080 
Test the local API
- All stocks (JSON): 
http://localhost:8080/stocks.json - All stocks (XML): 
http://localhost:8080/stocks.xml - Specific stock: 
http://localhost:8080/stocks/BDO.json - Historical data: 
http://localhost:8080/stocks/BDO.2024-01-15.json 
Deployment to Google App Engine
Prerequisites for Deployment
- 
Setup Google Cloud Project
gcloud projects create your-project-id gcloud config set project your-project-id gcloud app create - 
Enable App Engine API
gcloud services enable appengine.googleapis.com - 
Authenticate
gcloud auth login gcloud auth application-default login 
Deploy to App Engine
- 
Update
pom.xml- Change the App Engine application name:<properties> <appengine.app.name>your-project-id</appengine.app.name> </properties> - 
Deploy
mvn clean package appengine:deployYour API will be available at:
https://your-project-id.appspot.com 
Project Structure
phisix/
├── src/
│   ├── main/
│   │   ├── java/
│   │   │   └── com/googlecode/phisix/api/
│   │   │       ├── client/          # PSE website scraping clients
│   │   │       ├── ext/             # JAX-RS providers & filters  
│   │   │       ├── parser/          # HTML & JSON parsers
│   │   │       ├── repository/      # Data access layer
│   │   │       └── resource/        # REST API endpoints
│   │   ├── resources/               # Configuration files
│   │   └── webapp/
│   │       ├── WEB-INF/            # Web app configuration
│   │       └── schema/             # XSD schemas
│   └── test/                       # Unit & integration tests
├── target/                         # Build output
├── pom.xml                        # Maven configuration
└── README.md                      # Documentation
Technology Stack
- Runtime: Java 21 (Jakarta EE 10)
 - Framework: JAX-RS (RESTEasy 7.0.0.Final)
 - Platform: Google App Engine Standard (Java 21)
 - Build Tool: Maven
 - Data Binding: JAXB (XML), Gson 2.13.2 (JSON)
 - Web Scraping: JSoup
 - Testing: JUnit, Mockito
 
Resources Summary
Stocks: look up stocks
GET http://localhost:8080/stocks.{json|xml}
GET http://localhost:8080/stocks/{symbol}.{json|xml}
GET http://localhost:8080/stocks/{symbol}.{yyyy-MM-dd}.{json|xml}
JSON feeds (Local Development Examples)
| Symbol | Name | URL (when running locally) | 
|---|---|---|
| - | ALL | http://localhost:8080/stocks.json | 
| BDO | BDO UNIBANK, INC. | http://localhost:8080/stocks/BDO.json | 
| BPI | BANK OF THE PHILIPPINE ISLANDS | http://localhost:8080/stocks/BPI.json | 
| CBC | CHINA BANKING CORPORATION | http://localhost:8080/stocks/CBC.json | 
| COL | COL FINANCIAL GROUP, INC. | http://localhost:8080/stocks/COL.json | 
| EW | EAST WEST BANKING CORPORATION | http://localhost:8080/stocks/EW.json | 
XML feeds (Local Development Examples)
| Symbol | Name | URL (when running locally) | 
|---|---|---|
| - | ALL | http://localhost:8080/stocks.xml | 
| MBT | METROPOLITAN BANK & TRUST COMPANY | http://localhost:8080/stocks/MBT.xml | 
| PNB | PHILIPPINE NATIONAL BANK | http://localhost:8080/stocks/PNB.xml | 
| PSE | THE PHILIPPINE STOCK EXCHANGE, INC. | http://localhost:8080/stocks/PSE.xml | 
| RCB | RIZAL COMMERCIAL BANKING CORPORATION | http://localhost:8080/stocks/RCB.xml | 
| SECB | SECURITY BANK CORPORATION | http://localhost:8080/stocks/SECB.xml | 
XSD Schema
When running locally: http://localhost:8080/schema/stocks/phisix-stocks.xsd
