get_wallet_pnl
Calculate exact-decimal FIFO and mark-to-market from recorded trades. Unknown basis makes total PnL unavailable.
Position accounting
Calculate exact-decimal FIFO and mark-to-market from recorded trades. Unknown basis makes total PnL unavailable.
Permission and calling convention
Required scope: chain:read. This tool reads data or account-owned state.
This tool does not sign or broadcast a transaction. Check errors, source timestamps and explicit unavailable fields before using the result.
POST /api/tools/get_wallet_pnl
Authorization: Bearer <ULTRON_ACCESS_KEY>
Content-Type: application/jsonInput schema
Inputs are validated against this current schema. Use exact values from live source results rather than substituting a ticker for a contract or a different chain.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"wallet": {
"type": "string",
"maxLength": 80
},
"token": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$"
},
"markPriceUsd": {
"type": "string",
"pattern": "^\\d{1,36}(?:\\.\\d{1,18})?$"
},
"pool": {
"type": "string",
"pattern": "^0x(?:[0-9a-fA-F]{40}|[0-9a-fA-F]{64})$"
}
},
"required": [
"wallet",
"token"
],
"additionalProperties": false
}