CFD Index Last Price
You can get the last quote for a symbol with this endpoint.
https://api.finage.co.uk/last/index/{ symbol }?apikey=YOUR_API_KEY
symbol
= Index symbol that you want to get prices
https://api.finage.co.uk/last/index/SPX?apikey=YOUR_API_KEY
With the given example above, you can get the last prices of the SPX.
Response
An example response given below when you make an API request.
Please login to make an API request
{
"symbol": "SPX",
"price": 3931.56,
"timestamp": 1670352198266
}
- Parameters
symbol
= Symbol of the index
price
= Last price of the index
timestamp
= Last update [ms]
CFD Index Market Aggregates API
With the Index Market Aggregates API, you can get the tick bars of the index market.
https://api.finage.co.uk/agg/index/{ symbol }/{ time }/{ from }/{ to }?apikey=YOUR_API_KEY
symbol
= Symbol of the index
time
= Size of the time. [1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 1day, 1week, 1month]
from
= Start date [yyyy-MM-dd]
to
= End date [yyyy-MM-dd]
apikey
= Your API key
limit
= Limit of the results. Default is 100, maximum allowed limit is 5000. Please set a limit if you are using the API in the production.
sort
= You can sort the results by timestamp. asc will return ascending results oldest to newest, desc will return descending results newest to oldest. Default is asc.
date_format
= You can change the format of the date in the results. ts is timestamp, dt is datetime. [Default is dt]
dbt_filter
= Daily-based time filter. You can allow the time filters to filter daily based. Otherwise, the filter will only trim the start and end of the output. Default is false.
st
= Start time in UTC. (Eg. 17:30)
et
= End time in UTC. (Eg. 17:45)
https://api.finage.co.uk/agg/index/spx/1day/2022-02-05/2022-03-02?apikey=YOUR_API_KEY
You can get the tick bars of the SPX with the given example above.
Response
Please login to make an API request
{
"symbol":"SPX",
"totalResults":16,
"results":[
{
"o":"4505.75000","h":"4521.85986",
"l":"4471.47021","c":"4483.87012",
"v":"2384441973",
"t":"2022-02-07T12:00:00"
},
{
"o":"4480.02002","h":"4531.31982",
"l":"4465.39990","c":"4521.54004",
"v":"2545874926",
"t":"2022-02-08T12:00:00"
},
{
"o":"4547.00000",
"h":"4590.02979",
"l":"4547.00000",
"c":"4587.18018",
"v":"2427726623",
"t":"2022-02-09T12:00:00"
},
...
]
}
- Parameters
symbol
= Symbol of the index
totalResults
= Total result size
o
= Open price
h
= High price
l
= Low price
c
= Close price
v
= Volume
t
= Timestamp [ms]
CFD Index Previous Close API
With the Index Previous Close API, you can get the previous day's last tick bar of the index market.
https://api.finage.co.uk/agg/index/prev-close/{ symbol }?apikey=YOUR_API_KEY
symbol
= Symbol of the index
https://api.finage.co.uk/agg/index/prev-close/SPX?apikey=YOUR_API_KEY
You can get the previous day's last tick bar of the SPX with the given example above.
Response
An example response given below when you make an API request.
Please login to make an API request
{
"symbol": "SPX",
"totalResults": 1,
"results": [
{
"o": 3996.62988,
"h": 4001.51001,
"l": 3930.55005,
"c": 3931.44995,
"v": 2785823451,
"t": 1670284800000
}
]
}
- Parameters
symbol
= Symbol of the index
totalResults
= Total result size
o
= Open price
h
= High price
l
= Low price
c
= Close price
v
= Volume
t
= Timestamp [ms]