swig.dex reads what Swig’s index recorded about a Swig your API key’s
organization owns: its DEX transaction history and the latest state of its
liquidity positions. The lists are API-key POSTs that carry their filters in
the body, and get is an API-key GET. All of them only read and follow the
client’s retry policy, so they are safe to repeat. Each call counts as one API
query against your organization’s monthly allowance, and so does each retried
attempt. The network may also come from the client.
TypeScript 0.12.0 and Python 0.11.0 add these reads.
List DEX transactions
TypeScript
Filters combine with AND. The action filters must all match the same action. A
matching transaction still carries every DEX action the Swig executed in it.
The backend answers
400 when startSlot / start_slot is after endSlot /
end_slot.
Protocols are pump-swap, meteora-dlmm, raydium-amm-v4, raydium-cpmm,
raydium-clmm, and orca-whirlpool. Action types are swap,
position-open, liquidity-add, liquidity-remove, position-rebalance,
fee-claim, reward-claim, and position-close. An unknown value is refused
before any request is sent.
Page through results
PassnextCursor / next_cursor back as cursor with the same network and
filters. The cursor is the page’s last row: { slot, transactionSignature }
for transactions and { protocol, dexPositionAddress } for positions
(DexTransactionCursor and DexPositionCursor in both SDKs). It is absent
(undefined / None) on the last page. The backend does not tie a cursor to
the filters it came from, so keep them the same yourself. pageSize /
page_size defaults to 25, and the backend caps it at 100. Each page is one
API query, so a larger page reads a long history in fewer requests.
TypeScript
Read one transaction
TypeScript
What a transaction carries
Each action carries
protocolInstruction / protocol_instruction and
protocolActorAddress / protocol_actor_address. Swaps add the pool and an
input and output amount. Position actions add the pool and position, plus
deposits, withdrawals, or claimed amounts. A position close carries the
pool only when the instruction names one.
Read the amounts as the venue saw them
amountRaw/amount_rawis a signed decimal string for the action’sprotocolActorAddress: a negative amount left its accounts. Keep it a string, or parse it into an arbitrary-precision integer.- That actor is the Swig vault on a direct call. When an aggregator such as Jupiter routed the trade, it is the router’s account, and the swap appears as one action per venue hop. For the wallet’s own inflows and outflows, use token activity.
- Only transactions the index interpreted are listed. One it could not
interpret, or has not processed yet, is omitted, and
getanswers404for it.
List latest positions
TypeScript
updatedSlot / updated_slot is the slot of the read the state came from.
Latest state is currently recorded for Raydium CLMM positions only.
Positions take positionStatus / position_status (open or closed),
protocol, and swigVaultAddress / swig_vault_address filters, each applied
to the position, and page the same way as transactions.
Underlying routes
See the DEX API for the exact parameters and response
shapes. These are API-key routes and must be called from a trusted server. If
your product shows the data elsewhere, return an authorized view through your
own application API.

