Documentation › Account
Coin API
The Coin API lets you read your own account's Tibia Coin data through an external HTTP API and build your own scripts. You can, for example, make a Tibia Coin "bank": track who sent and who received coins and know the current balance.
The data is recorded by the bot itself, running in the client. It stores the coin data the client already receives and uploads it to your account's private ledger. It is observation only: the bot never sends coins — it only records the transfer you make yourself in the client.
How it works#
- With the add-on active, the bot records the coin data the client receives and uploads it to your account's ledger.
- You log in to the API with the same username and password as the launcher and the community/forum, and get a token.
- With the token, you read your balance, your history and your transfers, and build whatever script you want.
The base URL is https://api.drenoxbot.com. It is also shown in the API dashboard, inside your Panel.
How to subscribe#
The add-on is not a separate plan: it comes with Pro or Pro Max.
- New plan: at checkout, tick Coin API in the Add-on step. It lasts the same period as the plan (monthly, semiannual or annual), in the same payment.
- Plan already active: in your Panel, the Coin API card turns on the add-on for 30 days with PIX, or as a monthly card subscription that renews on its own. Cancel anytime in Manage subscription, in the same Panel.
API dashboard#
With the add-on active, your Panel gets the API dashboard, with everything you need to use the API:
- when the add-on expires and the button to renew it;
- the balance (total, transferable and in auctions) and when it was updated;
- the base URL, the endpoints and the token scope;
- ready-made examples in curl, Python and JavaScript, already filled in with your username, with a copy button;
- the latest transactions and the transfers you sent.
POST /coins/login#
Log in to get a token. The body is JSON:
{ "user": "<your account>", "password": "<your password>" }These are the same credentials that log into the launcher and the community/forum. The response:
{ "token": "...", "exp": 1730000000 }The token is valid for 7 days (exp is its expiry, in Unix seconds).
Errors
401— invalid credentials.403—coin API requires an active Pro plan and the Coin API add-on.
GET /coins#
Send the token in the Authorization: Bearer <token> header. The response:
{
"balance": { "total": 0, "transferable": 0, "auction": 0, "at": 1730000000 },
"entries": [
{
"id": 1,
"ts": 1730000000,
"delta": 25,
"kind": "received",
"counterparty": "<other character>",
"desc": "...",
"hasDetails": true
}
],
"sends": [
{ "to": "<character>", "amount": 25, "at": 1730000000 }
]
}balance— your current coin totals:total,transferableandauction, withat(when it was measured).entries— the transaction history.deltais the signed coin change (+ received / - spent);kindisreceived,sentorstore;counterpartyis the other character for transfers;hasDetailssays whether more detail is available.sends— the outgoing transfers you made: to whom (to), how much (amount) and when (at).
curl example#
First log in to get the token:
curl -s -X POST https://api.drenoxbot.com/coins/login \
-H "Content-Type: application/json" \
-d '{"user":"your-account","password":"your-password"}'Then, using the token from the response, read your coins:
curl -s https://api.drenoxbot.com/coins \
-H "Authorization: Bearer YOUR_TOKEN"Python example#
import requests
API = "https://api.drenoxbot.com"
token = requests.post(f"{API}/coins/login", json={"user": "your-account", "password": "your-password"}).json()["token"]
data = requests.get(f"{API}/coins", headers={"Authorization": f"Bearer {token}"}).json()
print(data["balance"]["total"])
for e in data["entries"][:10]:
print(e["kind"], e["delta"], e.get("counterparty") or e.get("desc"))
Comments
to comment.