API currently returns only 5 values for "faction/chain" selection. When a chain is on cooldown, there is no way to know when the chain ended or got broke, with the given data.
I suggest another value in the array with the key "end" resulting in something like: apiReturn[] = { end: (cooldown > 0) ? timestamp_ended : 0 }; so we know for sure with did_it_end = (end > 0 && cooldown > 0);
You could get the timestamp_ended from the last hit of the chain from faction/attacks selection and if it died from timing out you would need to add 5 minutes to the timestamp.
But yeah, having the timestamp_ended in the faction/chain selection would make things a little bit easier.
oh yeah... i was thinking about it right before they released that specific update, and even noticed it when it rolled out: i could see other's awesome chains