I’m confused by your terms because a link is something you click on to get to another page so there’s no "current link" that the user could be on, unless you mean a link that the mouse is hovering over (in which case you’d probably use javascript to do what you want).
It’s also not clear whether you want the document ID or the current URL or whether you want this for use in a snippet, a chunk, as an argument in a snippet call, or in some document’s content. It’s important because you might use different methods depending on where you are.
I don’t mean to sound critical -- just trying to clarify things.
For the current document’s ID number, you can use the MODx tag:
For the current URL, you can combine that with the link tag:
Try one of those and see if it gets you what you want.
Hope this helps.