Code Monkey home page Code Monkey logo

phisix's Introduction

phisix

Java CI with Maven Codacy Badge Codacy Badge Mergify Status

Status

Simple PSEi (formerly known as PHISIX) RESTful API hosted on Google AppEngine

###Resources Summary###

Stocks: look up stocks

GET http://phisix-api.appspot.com/stocks.{json|xml}
GET http://phisix-api.appspot.com/stocks/{symbol}.{json|xml}
GET http://phisix-api.appspot.com/stocks/{symbol}.{yyyy-MM-dd}.{json|xml}

###JSON feeds###

Symbol Name URL
- ALL /stocks.json
BDO BDO UNIBANK, INC. /stocks/BDO.json
BPI BANK OF THE PHILIPPINE ISLANDS /stocks/BPI.json
CHIB CHINA BANKING CORPORATION /stocks/CHIB.json
COL COL FINANCIAL GROUP, INC. /stocks/COL.json
EW EAST WEST BANKING CORPORATION /stocks/EW.json

###XML feeds###

Symbol Name URL
- ALL /stocks.xml
MBT METROPOLITAN BANK & TRUST COMPANY /stocks/MBT.xml
PNB PHILIPPINE NATIONAL BANK /stocks/PNB.xml
PSE THE PHILIPPINE STOCK EXCHANGE, INC. /stocks/PSE.xml
RCB RIZAL COMMERCIAL BANKING CORPORATION /stocks/RCB.xml
SECB SECURITY BANK CORPORATION /stocks/SECB.xml

###XSD###

http://phisix-api.appspot.com/schema/stocks/phisix-stocks.xsd

phisix's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar edgedalmacio avatar mergify[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phisix's Issues

[QUESTION] No data received

There's no data on Aug 20. 10:13 AM. Is this an expected behavior? there's no returned value on a weekend (it does not return the previous working business day data automatically)?

screen shot 2016-08-20 at 10 13 08

API call listing all available symbols

Useful for helping people who are working in portfolio analysis and are choosing between stocks and not just tracking one individual symbol.

A call for a file like "all_stocks.json" listing:
JFC
BPI
ABS
...
will suffice.

[QUESTION] Realtime Stock Quote

Hi Sir,

I have a question regarding the api, does it have the ability to get the realtime stock quotes?

Thanks and regards,

Ren Decano

FireBug: SyntaxError: missing ) after argument list

this is the JSONP response of API,

jQuery110205411668309245221_1410831829791({"stock":[{"name":"Banco de Oro","price":{"currency":"PHP","amount":95.7},"percent_change":0.95,"volume":20920,"symbol":"BDO"}],"as_of":"2014-09-16T09:39:00+08:00"}

I think there is a missing ')' in the final part of JSON.

API not accessible anymore on some devices

Hi Edge,

I noticed that just recently, some of my android devices have been having a problem accessing the API. It's working fine on other devices while some are getting an error "This site can't be reached". All are working fine previously. I'm not sure if a simple server restart would fix the issue but I think it's worth a try. Thank you so much!

Date function

GET /stocks/{symbol}.{yyyy-MM-dd}.{json|xml} is not working anymore? Request returns 404 when there is date input

Data off?

Greetings!

Firstly, thank you for the system as this is an extremely useful tool!

issue:
Im running a cron job to check the JSON data on 10min interval. On July 11,2019 the prices seems to be stuck at around 1:30pm. I checked on the eve of the same day to verify and it was indeed still showing (old) prices as it was not the same the PSE closing price on that day.

resource in issue:
http://phisix-api4.appspot.com/stocks.json

Thank you very much for your guidance.

Availability over https

It would be great if the api is available over https to avoid mixed content issues when ajax requests are made to the api in a page served over https. Thank you.

Is the volume for "sectoral indices" refers to traded volume?

The volume reported in the sectoral indices are different compared to the report from EOD of edge.pse.com.ph .. But I notice that it is equivalent to the volume reported to other stock platform (investing.com, bloomberg). What does this volume refers to?

PSE & PSEi symbol are the same

Hi Edge,

Hope you're doing well. I love your work on this! Please keep going.

I noticed that the symbol for both PSE and PSEi in your json file is both labeled as PSE.
{"name":"PSE","price":{"currency":"PHP","amount":160.50},"percent_change":0.31,"volume":2160,"symbol":"PSE"}
{"name":"PSEi","price":{"currency":"PHP","amount":-58.9100},"percent_change":-0.96,"volume":6088,"symbol":"PSE"}

So when I'm trying to pull the specific page (http://phisix-api3.appspot.com/stocks/PSE.json), it returns the PSE price of the day rather than the psei.

How to get multiple stock codes?

I think it would be a great feature if we can get multiple data in a single api access.
For ex, stocks.xml?code[]="AAA"&code[]="BBB".
The output will be stock details from AAA and BBB

URLConnectionEngine does not follow redirects?

I had an issue wherein calls to the PSE api were returning status 302. I traced it down to StocksRepositoryImpl, in the instantiation of client when URLConnectionEngine is used. Changing it to ApacheHttpClient43Engine and explicitly setting redirection to true made it work:

ApacheHttpClient43Engine engine = new ApacheHttpClient43Engine();
engine.setFollowRedirects(true);
Client client = new ResteasyClientBuilder()
		.httpEngine(engine)
		.register(StocksProvider.class)
		.build();

Would you have any idea why URLConnectionEngine works in your deployment?
Thanks!

PS. in my repo I updated many dependencies' versions, but resteasy is still 3.9.0.Final (latest).

CORS is disabled

I'm using jQuery's AJAX to access the API but i get an error message from the server that the CORS is disabled. Would be nice if it's enabled. :)

Not getting any result for a given stock/date request

Missing com.googlecode.phisix.api.model.Stocks

On downloading the code, when opened in Intellij IDEA CE, the com.googlecode.phisix.api.model.Stocks package could not be found in src and thus the import statement for the same gave errors.
screen shot 2017-04-15 at 9 39 37 pm

Enhancement

Hi, I would like to enhance this project myself. Is it possible for me to get the full code?

Thank you

Running in Tomcat

Hi running it in tomcat , does it is not possible to load json at local machine?

Issue with decimal places.

Stock prices that has more than 2 decimal places are inaccurate when using this API it rounded-off to 2 decimal places. Example: EG, AR, GREEN, and etc. Please increase the decimal places upto 4 thanks!

can't retrieve data

Hi,

I use excel to monitor the market price by importing the xml data to excel but as I notice since yesterday (feb. 27, 2017), excel cannot retrieve the data from the source. As i visit the page through a web browser it says page not available.

add total Value

can you add total value coming from this response?

can you add totalValue coming from this response? https://pse.com.ph/stockMarket/dailySummary.html?method=getAdvancedSecurity&limit=100

{"count":20,"records":[{"totalVolume":47000,"percChangeClose":14.07249,"companyLink":"companyInfo.html?id=2&security=150&tab=0","sqClose":5.35,"lastTradePrice":5.35,"securitySymbol":"DAVIN","number":1,"securityName":"DA VINCI CAPITAL HOLDINGS, INC.","changeClose":0.66,"marketStatus":"OPEN","totalValue":241170,"sqPrevious":4.69},{"totalVolume":7000,"percChangeClose":11.61049,"companyLink":"companyInfo.html?id=34&security=320&tab=0","sqClose":2.98,"lastTradePrice":2.98,"securitySymbol":"AT","number":2,"securityName":"ATLAS CONSOLIDATED MINING & DEVELOPMENT CORPORATION","changeClose":0.31,"marketStatus":"OPEN","totalValue":19380,"sqPrevious":2.67},{"totalVolume":5000,"percChangeClose":10.12658,"companyLink":"companyInfo.html?id=52&security=171&tab=0","sqClose":0.87,"lastTradePrice":0.87,"securitySymbol":"APO","number":3,"securityName":"ANGLO PHILIPPINE HOLDINGS CORPORATION","changeClose":0.08,"marketStatus":"OPEN","totalValue":4360,"sqPrevious":0.79},{"totalVolume":320,"percChangeClose":9.8878,"companyLink":"companyInfo.html?id=142&security=112&tab=0","sqClose":78.35,"lastTradePrice":78.35,"securitySymbol":"PSB","number":4,"securityName":"PHILIPPINE SAVINGS BANK","changeClose":7.05,"marketStatus":"OPEN","totalValue":25085.5,"sqPrevious":71.3},{"totalVolume":6238000,"percChangeClose":9.28571,"companyLink":"companyInfo.html?id=656&security=607&tab=0","sqClose":1.53,"lastTradePrice":1.53,"securitySymbol":"X","number":5,"securityName":"Xurpas Inc.","changeClose":0.13,"marketStatus":"OPEN","totalValue":9431740,"sqPrevious":1.4},{"totalVolume":1000,"percChangeClose":6.86695,"companyLink":"companyInfo.html?id=31&security=121&tab=0","sqClose":2.49,"lastTradePrice":2.49,"securitySymbol":"BLFI","number":6,"securityName":"BDO LEASING & FINANCE, INC.","changeClose":0.16,"marketStatus":"OPEN","totalValue":2490,"sqPrevious":2.33},{"totalVolume":780000,"percChangeClose":5.88235,"companyLink":"companyInfo.html?id=90&security=229&tab=0","sqClose":0.234,"lastTradePrice":0.234,"securitySymbol":"WIN","number":7,"securityName":"WELLEX INDUSTRIES, INC.","changeClose":0.013,"marketStatus":"OPEN","totalValue":182710,"sqPrevious":0.221},{"totalVolume":350000,"percChangeClose":5.71429,"companyLink":"companyInfo.html?id=60&security=188&tab=0","sqClose":0.222,"lastTradePrice":0.222,"securitySymbol":"BSC","number":8,"securityName":"BASIC ENERGY CORPORATION","changeClose":0.012,"marketStatus":"OPEN","totalValue":76100,"sqPrevious":0.21},{"totalVolume":240000,"percChangeClose":4.87805,"companyLink":"companyInfo.html?id=40&security=313&tab=0","sqClose":0.43,"lastTradePrice":0.43,"securitySymbol":"RLT","number":9,"securityName":"PHILIPPINE REALTY & HOLDINGS CORPORATION","changeClose":0.02,"marketStatus":"OPEN","totalValue":98650,"sqPrevious":0.41},{"totalVolume":6.3E7,"percChangeClose":4.54545,"companyLink":"companyInfo.html?id=33&security=321&tab=0","sqClose":0.0023,"lastTradePrice":0.0023,"securitySymbol":"AR","number":10,"securityName":"ABRA MINING & INDUSTRIAL CORPORATION","changeClose":1.0E-4,"marketStatus":"OPEN","totalValue":144700,"sqPrevious":0.0022},{"totalVolume":1450000,"percChangeClose":4.39024,"companyLink":"companyInfo.html?id=220&security=200&tab=0","sqClose":0.214,"lastTradePrice":0.214,"securitySymbol":"FPI","number":11,"securityName":"FORUM PACIFIC, INC.","changeClose":0.009,"marketStatus":"OPEN","totalValue":296690,"sqPrevious":0.205},{"totalVolume":1.6919E7,"percChangeClose":4.33071,"companyLink":"companyInfo.html?id=46&security=346&tab=0","sqClose":2.66,"lastTradePrice":2.66,"securitySymbol":"VUL","number":12,"securityName":"VULCAN INDUSTRIAL & MINING","changeClose":0.11,"marketStatus":"OPEN","totalValue":4.485698E7,"sqPrevious":2.54},{"totalVolume":79390,"percChangeClose":4.01146,"companyLink":"companyInfo.html?id=32&security=114&tab=0","sqClose":145.2,"lastTradePrice":145.2,"securitySymbol":"SECB","number":13,"securityName":"SECURITY BANK CORPORATION","changeClose":5.6,"marketStatus":"OPEN","totalValue":1.1419124E7,"sqPrevious":139.6},{"totalVolume":60,"percChangeClose":4,"companyLink":"companyInfo.html?id=227&security=159&tab=0","sqClose":52,"lastTradePrice":52,"securitySymbol":"LFM","number":14,"securityName":"LIBERTY FLOUR MILLS, INC.","changeClose":2,"marketStatus":"OPEN","totalValue":3190,"sqPrevious":50},{"totalVolume":5000,"percChangeClose":4,"companyLink":"companyInfo.html?id=103&security=213&tab=0","sqClose":1.04,"lastTradePrice":1.04,"securitySymbol":"NI","number":15,"securityName":"NIHAO MINERAL RESOURCES INTERNATIONAL, INC.","changeClose":0.04,"marketStatus":"OPEN","totalValue":5100,"sqPrevious":1},{"totalVolume":2229400,"percChangeClose":3.9604,"companyLink":"companyInfo.html?id=669&security=636&tab=0","sqClose":6.32,"lastTradePrice":6.32,"securitySymbol":"CLC","number":16,"securityName":"CHELSEA LOGISTICS HOLDINGS CORP.","changeClose":0.24,"marketStatus":"OPEN","totalValue":1.3853599E7,"sqPrevious":6.06},{"totalVolume":502000,"percChangeClose":3.84615,"companyLink":"companyInfo.html?id=37&security=377&tab=0","sqClose":0.54,"lastTradePrice":0.54,"securitySymbol":"LIHC","number":17,"securityName":"LODESTAR INVESTMENT HOLDINGS CORPORATION","changeClose":0.02,"marketStatus":"OPEN","totalValue":256410,"sqPrevious":0.52},{"totalVolume":389700,"percChangeClose":3.69231,"companyLink":"companyInfo.html?id=147&security=333&tab=0","sqClose":6.74,"lastTradePrice":6.74,"securitySymbol":"STR","number":18,"securityName":"STARMALLS, INC.","changeClose":0.24,"marketStatus":"OPEN","totalValue":2609472,"sqPrevious":6.5},{"totalVolume":55700,"percChangeClose":3.38346,"companyLink":"companyInfo.html?id=157&security=396&tab=0","sqClose":27.5,"lastTradePrice":27.5,"securitySymbol":"SCC","number":19,"securityName":"Semirara Mining and Power Corporation","changeClose":0.9,"marketStatus":"OPEN","totalValue":1525435,"sqPrevious":26.6},{"totalVolume":782600,"percChangeClose":3.3389,"companyLink":"companyInfo.html?id=188&security=192&tab=0","sqClose":12.38,"lastTradePrice":12.38,"securitySymbol":"DMC","number":20,"securityName":"DMCI HOLDINGS, INC.","changeClose":0.4,"marketStatus":"OPEN","totalValue":9577726,"sqPrevious":11.98}]}

Getting Error on FireBug

I'm getting this error when I debug my project using your API,

SyntaxError: missing ; before statement
{"stock":[{"name":"BPI","price":{"currency":"PHP","amount":97.9},"pe

and this is my code for request
$.ajax({
url: "http://phisix-api.appspot.com/stocks/" + symbolCode + ".json?callback=?",
dataType: 'JSONP',
type: 'GET',
success: function (response) {
alert("success!");
},
error: function(response) {
alert ("error: " + response.message);
}
});

Incomplete List of Symbols

Hi Edge,

I check the "all stock" and individual stock there are missing symbols/stock codes. There about 60-90 missing stocks. Sample here is LBC and FEU. Can you pls. confirm if this is the case? Thanks.

image
image

Opening price probably a mistake.

Sept 26, 2016 record of MPI, I noticed the opening price is not the same as what I have downloaded from the api eventhough the timestamp in "as_of" is 9:30 AM of that day. 7.1800 is what is in my COL account but in my downloaded price is 7.1600. Prior to that before the opening there's no data that can be downloaded because the "as_of" is null or empty so I'm pretty sure that the price 7.1600 is the first price I downloaded because my system starts before 9:30 and runs one minute thereafter.

Did this happen to you already? Is this a bug?

Please help, I really need accurate running prices or much better as enhancement if we have api of prices per minute of the day of different companies because the downside of this api if the price wasn't requested for the time, we miss the whole chance of getting the running prices.

Thanks,

Update?

Any plan to update or solve the issues/enhancements? Please? =)

Permission

Good day Mr. edgedalmacio,

Sir I would like to ask your permission in using this restful api for our thesis project. If you could kindly grant me the authority to use this in our project. Thank you in advance.

2 PSE symbols

Although I've already coded the work around ... but still ... it is best to tell you that the symbol for PSE and PSEi are the same ....

Request to change PSE index symbol to PSEi ... so that it will not conflict with the other PSE ...

API seems down

I created a web tool so i can monitor my ports through js alerts. It was working yesterday but it seems to be down now. Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.