Transaction · Acts onchain
Returns the options every input of an action accepts for this address: the tokens it holds, the pools that exist, the chains it can act on, resolved against the live catalog. This is the surface the composer runs on. Send the action sequence being drafted and the response carries a valid option set for each unfilled input, plus request-scoped context such as a swap quote or a live maximum projected over what has been filled so far. The options are already filtered to what would actually compile. Reach for it while building a transaction, once per edit, so the person or agent doing the composing only ever sees choices that work.
Send a request
Response
{links: {self: stringprev: string | undefinednext: string | undefined} | undefinedheaders: unknown | undefineddata: Record<string, {name: stringsymbol: stringicon: stringdescription: string | undefinedtags: string[]chains: ({chain_id: numberaddress: stringname: stringsymbol: stringdecimals: numbericon: stringexternal: Record<string, {name: stringurl: string}>block_time: number})[]links: ({kind: stringurl: string})[] | undefinedactions: Record<string, {type: stringsentence: {raw: stringtemplate: stringinputs: ({name: string | undefinedtype: literal | object | undefineddefaultValue: string | undefinedrequires: number[] | undefineddelimiter: string | undefinedhidden: boolean | undefinedcoil: boolean | undefinedtags: ({kind: stringvalue: string | undefinedqualifiers: (self | undefined)[] | undefineddynamic: boolean | undefinedreference: number | undefined})[] | undefinedselectorTags: Record<string, ({kind: self | undefinedvalue: self | undefinedqualifiers: self | undefineddynamic: self | undefinedreference: self | undefined})[]> | undefined})[]outputs: ({name: stringtype: string | arrayoffset: numberdynamic: boolean | undefinedtags: ({kind: stringvalue: string | undefinedqualifiers: (self | undefined)[] | undefineddynamic: boolean | undefinedreference: number | undefined})[] | undefinedselectorTags: Record<string, ({kind: self | undefinedvalue: self | undefinedqualifiers: self | undefineddynamic: self | undefinedreference: self | undefined})[]> | undefinedselectorInput: number | undefined})[] | undefined}name: stringdescription: stringicon: stringattributes: {is:user_specific: boolean | undefinedis:unlisted: boolean | undefined} | undefinedfeeds: string[] | undefinedoptions: Record<string, array | Record<string, array | self>> | undefinedmeta: {action: Record<string, unknown> | undefinedinputs: Record<string, Record<string, unknown>> | undefined} | undefined}> | undefined}> | null}
Code samples
Language
Prompt
Call the Plug API endpoint "Get context".## EndpointPOST /address/{address}/Base URL: https://api.plug.to## DescriptionReturns the options every input of an action accepts for this address: the tokens it holds, the pools that exist, the chains it can act on, resolved against the live catalog.This is the surface the composer runs on. Send the action sequence being drafted and the response carries a valid option set for each unfilled input, plus request-scoped context such as a swap quote or a live maximum projected over what has been filled so far. The options are already filtered to what would actually compile.Reach for it while building a transaction, once per edit, so the person or agent doing the composing only ever sees choices that work.## Path Parameters- address (string, required) — The EVM address to get information for. In the case that you request an address we have never indexed, we will immediately index it.Current value: 0x62180042606624f02d8a130da8a3171e9b33894d## Query Parameters- filter[chain_id] (integer, optional) — Filter results to specific chains from the listed of supported options.- filter[protocol] (string, optional) — Filter results to specific protocols from the listed of supported options.- filter[action] (string, optional) — Filter results to specific actions from the listed of supported options.- filter[unlisted] (boolean, optional) — Include unlisted contracts in the results. [true, false]- search (string, optional) — Search within the returned options by input index of an action sentence. This is helpful when letting users refine the options shown for a specific action input such as tokens, vaults or liquidity pools.- intent (string, optional) — Whether an action's options are scoped to the caller's holdings (imperative, acting now) or the full universe of valid targets (declarative, composing a flow). Defaults to declarative. [imperative, declarative]- input (integer, optional) — The focused input index whose option list is being paginated. Paired with limit; the response windows only this input's list.- selections (string, optional) — Values already chosen for the focused input's dependency inputs, keyed by input index, so a dependent list (e.g. a market that hangs off a chosen token) windows against its parent.- draft (string, optional) — The full partial assignment, every input the user has filled so far keyed by input index, so the server can project request-scoped meta (a swap quote, a live max) over the complete in-flight request.- limit[count] (integer, required)- limit[offset] (integer, optional)## Headers- Accept (string, required) — For a typical single-time JSON response, set this to application/json. To receive realtime updates through a stream, set this to text/event-stream. (default: application/json) [application/json, text/event-stream]Current value: application/json## Response Schema- links (object, optional)- self (string, required)- prev (string, optional)- next (string, optional)- headers (unknown, optional)- data (Record<string, object>, optional)## Example RequestPOST https://api.plug.to/address/0x62180042606624f02d8a130da8a3171e9b33894d/