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.
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:
AAA
AAAWB
AAAWC
And you would then request different stocks by setting the stock
parameter:
/quote
AAA
/quote?stock=1
AAA
/quote?stock=2
AAAWB
/quote?stock=3
AAAWC
In 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 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:
/indexquote
XAO
/indexquote?index=1
XAO
/indexquote?index=2
XMM
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.
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.