Copyright 2024 Iguana2 Pty. Ltd.
The EZ API is intended to be used with Javascript Frameworks like React and NextJS in cases that the YourIR Javascript library cannot be made to work with the framework.
Whereas the YourIR Javascript library provides components for all your Investor Relations needs, the EZ API provides data only.
You can start using the EZ API right away without any setup.
Our servers set requests from localhost or unknown *.dev domains to an example config with a random stock (currently ).
You can prototype your Investor Relations and then contact us to set you up properly.
The following requests cover your Investor Relations data needs.
There is no need to specify a stock code or to authenticate, you can just fetch these URLs.
Click on a request for documentation and examples.
All responses (with the exception of announcement PDFs) have content type application/json; charset=utf-8
Successful responses are a JSON object with a result field, and optionally a paging field.
The result field is either an object or an array depending on the type of request.
The paging field is present when the request allows paged responses and a page is requested. If you don't supply the page parameter, all results are returned without paging unless otherwise stated.
{
"result": array or object,
"paging": {
"page": number,
"pageSize": number,
"pageCount": number,
"totalItems": number
}
}
Error responses are a JSON object with en error field.
{
"error": {
"status": number,
"code": short description,
"message": helpful description
}
}
Rather than using ticker codes which can change, the EZ API uses numbers to identify your stocks.
We will configure your main stock as number 1 and that is the default stock for all requests.
Most companies only need to display a single stock so you don't need to specify it.
You can also choose to manually specify the code.
If you do have multiple stocks, then we will configure them in the order you like and you request a particular stock by setting the stock parameter to its number.
For example, if your main ticker code is AAA and you also have two warrants AAAWB and AAAWC, then we would configure your stocks as follows:
AAAAAAWBAAAWCAnd you would then request different stocks by setting the stock parameter:
/quoteAAA/quote?stock=1AAA/quote?stock=2AAAWB/quote?stock=3AAAWCIn the event that your ticker code changes, your configuration will update automatically to reflect the new codes.
You will not need to make any changes.
If you have a lot of stocks, then you may find it easier to pass the stock's code rather than its number:
/quote?stock=aaaAAA/quote?stock=aaawbAAAWB/quote?stock=aaawcAAAWCIf your stock is listed on different exchanges, then you will need to add the exchange:
/quote?stock=aaa.asxAAA on ASX/quote?stock=aaa.nzxAAA on NZXNote that you will will have to make changes in the event of a name change.
If you want to compare your stock with an index, we can configure indices for you too.
Similar to stocks, the default index is number 1 and you request a different index by setting the index parameter to its number.
For example, if you want to compare your stock against All Ords and Mining, then we would configure XAO and XMM as your indices.
You would then request different indices by setting the index parameter:
/indexquoteXAO/indexquote?index=1XAO/indexquote?index=2XMMAs for stocks, you can pass the index code instead of its number:
/indexquote?index=xjoXJO
GET /quote
The result field is an object containing 20 minute delayed quote information:
asx or chia)
GET /trades
The result field is an array of trade objects:
asx or chia)Trades are always returned in descending time order.
Note that the maximum number of trades returned is 10,000. Paging should be used for this request for large cap stocks.
When you page through a large number of trades, the list of trades can change as new trades occur.
Similarly, if there is a delay between requesting the quote and requesting the trades, the trades could be ahead of the quote.
You can workaround these problems by providing the tradeCount and tradeCancellationCount fields that you received in the quote response to anchor the trade list to the same point in time.
GET /prices
capital or none. Prices are adjusted for reconstructions by defaultasc or desC. Prices are returned in descending date order by defaultThe result field is an array of objects.
The prices and volumes are adjusted for splits.
GET /announcements
asc or desc. Announcements are returned in descending time order by defaultThe result field is an array of objects:
GET /announcements/appID/fileID/filename
Use the path from the announcements request.
A PDF.
Historical quotes allow you to implement a return calculator.
GET /histquote?date=YYYY-MM-DD
An object containing quote information for the requested date.
If the requested date is not a trading date, then data for the first trading date prior to date is returned.
GET /indexquote
An object containing 20 minute delayed quote information.
GET /indexprices
asc or desc. Prices are returned in descending date order by defaultThe result field is an array of objects.
This example also demonstrates how to select something other than the default when multiple indexes are configured — it selects the 2nd index.