This endpoint returns futures contracts for the date falling on the number of days from the date you specified. This is useful for getting contracts closest to a date without having to determine the last date the contract was traded.
Consider wanting contracts for WTI Crude that were traded 30 days before December 25, 2021. With Thanksgiving in the US being November 25, which date were contracts last traded? This can be hard to determine so we take the guess work out.
Specifying the <dateFrom> parameter as "2021-12-25" and the <daysFrom> parameter as 30 returns the contracts traded on the date that is less-than-or-equal-to 30 days from the <dateFrom> parameter i.e. the date closest to 30 days ago.
Use the optional <month> parameter to get a specific month contract.
Use the optional <inPast> parameter to specify if <daysFrom> should be added or subtracted from <dateFrom>. Setting <inPast> to false will result in contracts that fall after the given date. Default is true.
symbol: string required
dateFrom: string required
daysFrom: string required
inPast: boolean default: true
format: string default: 'json'