> ## Documentation Index
> Fetch the complete documentation index at: https://goldrush.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# SwapTransaction

Decoded details for a token swap on a decentralized exchange

Implements: [`DecodedDetails`](/api-reference/streaming-api/types/decoded-details)

## Fields

<ResponseField name="type" type="enum">
  Enum value identifying the transaction type

  Type: [`TransactionType`](/api-reference/streaming-api/types/transaction-type)
</ResponseField>

<ResponseField name="amount_out" type="string">
  Amount of tokens received
</ResponseField>

<ResponseField name="amount_in" type="string">
  Amount of tokens sold
</ResponseField>

<ResponseField name="token_out" type="object">
  Metadata for the token bought

  Type: [`TokenContractMetadata`](/api-reference/streaming-api/types/token-contract-metadata)

  <Expandable title="properties">
    <ResponseField name="contract_name" type="string">
      Name of the token contract
    </ResponseField>

    <ResponseField name="contract_address" type="string">
      Address of the token contract
    </ResponseField>

    <ResponseField name="contract_decimals" type="int">
      Number of decimal places for the token
    </ResponseField>

    <ResponseField name="contract_ticker_symbol" type="string">
      Ticker symbol of the token
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="token_in" type="object">
  Metadata for the token sold

  Type: [`TokenContractMetadata`](/api-reference/streaming-api/types/token-contract-metadata)

  <Expandable title="properties">
    <ResponseField name="contract_name" type="string">
      Name of the token contract
    </ResponseField>

    <ResponseField name="contract_address" type="string">
      Address of the token contract
    </ResponseField>

    <ResponseField name="contract_decimals" type="int">
      Number of decimal places for the token
    </ResponseField>

    <ResponseField name="contract_ticker_symbol" type="string">
      Ticker symbol of the token
    </ResponseField>
  </Expandable>
</ResponseField>
