record_wallet_trade
Store a user-supplied accounting record with quantity, USD consideration and provenance. Never invent a fill or cost basis.
Record verified cost basis
Store a user-supplied accounting record with quantity, USD consideration and provenance. Never invent a fill or cost basis.
Permission and calling convention
Required scope: monitors:write. This tool can change account-owned settings or prepare a request. Use only for an intentional user action.
This tool does not sign or broadcast a transaction. Check errors, source timestamps and explicit unavailable fields before using the result.
POST /api/tools/record_wallet_trade
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}$"
},
"kind": {
"type": "string",
"enum": [
"buy",
"sell",
"transfer_in",
"transfer_out"
]
},
"quantity": {
"type": "string",
"pattern": "^\\d{1,36}(?:\\.\\d{1,18})?$"
},
"usdValue": {
"type": "string",
"pattern": "^\\d{1,36}(?:\\.\\d{1,18})?$"
},
"occurredAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
"txHash": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{64}$"
},
"requestKey": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"source": {
"default": "user_statement",
"type": "string",
"enum": [
"user_statement",
"user_verified_trade"
]
}
},
"required": [
"wallet",
"token",
"kind",
"quantity",
"occurredAt",
"requestKey",
"source"
],
"additionalProperties": false
}