After successfully creating an offer via the Horizon API, I use the transaction hash to get the effects. This may include trades. Later I retrieve all trades for my account. Now I want to match the trade effects with the respective trades. However, the ids are not exactly the same.
The ids have the form
123456789012-1 for trades or
00123456789012-0 for the effects. The long prefix is shared (ignoring leading zeros) but the suffix is different for the same trades. What do the parts of the ids stand for and how can I match them?