address — the contract: raw (0: + 64 hex digits), EQ… or UQ…, mainnet, workchain 0 or −1; not a .ton name (resolve one with Nft/Domain first). method — the name as declared in the contract (seqno, get_wallet_address, getPoolStateAndConfiguration), or method_id — the numeric id (−262144…262143; Details with get_methods: true lists the ids a code declares): exactly one of the two. stack — up to 16 arguments {type, value} in the order of the method's signature, the first parameter first (apiton puts the last one on top of the TVM stack, as toncenter's API does).type | value | Passed as |
|---|---|---|
int | signed decimal ("-1", "1000000000") or hex "0x…" / "-0x…", 257-bit range | an integer |
address | any address form (as address above) | a slice holding the standard address — what get_wallet_address(owner) takes |
cell | a BOC, standard or URL-safe base64, padded or not; one root, ≤ 256 cells, no exotic cells | a cell |
slice | a BOC as for cell | a slice over the whole root cell |
text | UTF-8, ≤ 127 bytes | a slice of those bytes (dnsresolve's domain) |
null | "" | null |
value is at most 8192 characters, and a tuple cannot be passed as an argument. The arguments serialized must stay under 16 KiB, and the whole request under 64 KiB.| Field | Meaning |
|---|---|
address | the contract, UQ… |
method_id | the id that ran (computed from method when a name was sent) |
exit_code | TVM exit code: 0 / 1 = success (0 is absent from the JSON). A non-zero code is an answer (HTTP 200), not an error: e.g. 11 no such method (FunC contracts), 2 stack underflow (an argument is missing), 7 type check (an argument of the wrong type), −14 out of gas (the stack then holds the gas used, about 300 000) |
stack | the result stack, first returned value first; on a non-zero exit code what the VM left (usually the exception's argument). Each entry: type — int · cell · slice · builder · null · nan · tuple; value — int: decimal (up to 257 bits), cell / builder: the cell as a BOC (standard base64), slice: its remaining bits and references as a one-root BOC, "" for null, nan and tuple; items — a tuple's values in order; address — slice only: the UQ… form when the slice is exactly one standard address |
stack_boc | the whole result stack as TL-B VmStack, a BOC in standard base64, serialized again by apiton from the liteserver's answer. Complete even when stack is truncated |
truncated | stack was shortened: more than 256 values (tuple items counted) or tuples nested deeper than 8; stack_boc has everything |
mc_seqno | the masterchain block the method ran on, about 10 s behind the chain (up to 45 s when nodes lag); two consecutive calls are not guaranteed to be in chain order — compare mc_seqno |
not_found included; errors are never kept. Compared with toncenter's runGetMethod: no gas_used (the liteserver protocol does not return it), no tuple arguments, and a continuation in the result is an error.unavailable: get-method capacity is busy, retry shortly (apiton's liteserver capacity, not your quota: retry after a moment).{"code":…,"message":…})| Code | When |
|---|---|
invalid_argument (400) | both or neither of method / method_id; a bad name; an address that does not parse, is a testnet form or a .ton name; a bad argument, named by its position (argument 2: not a BOC, argument 1: integer out of the 257-bit range); arguments too large |
failed_precondition (400) | request rules (more than 16 arguments, a value over 8192 characters, an unknown type, method_id out of range); result stack too large (over 256 KiB); a continuation in the result stack; check request parameters for any other final liteserver error |
not_found (404) | no contract at this address (not deployed, uninitialized or frozen) |
resource_exhausted (429) | the plan's limits, or the get-method share of 2/s per key or IP |
unavailable (503) | TON liteservers are rate-limiting / out of sync / unavailable, retry shortly; get-method capacity is busy, retry shortly; get-method calls are disabled |
deadline_exceeded (504) | get-method call timed out (10 s) |