# Sample Transactions

## Overview

Here are some samples of the transaction object that is created in [create transaction](/api-integration/main-api-multi-step/api-reference/create-transaction.md) method. Rango currently returns 6 different types of transactions based on the blockchain that the transaction is happening on. This includes:

* **EVM**: For all EVM-based blockchains, including Ethereum, Polygon, Avalanche, etc.
* **COSMOS**: For all the cosmos-based networks, including the Cosmos itself, Osmosis, Akash, Thorchain, Maya and etc.
* **TRANSFER**: For UTXO blockchains, including Bitcoin, Litecoin, Doge, etc.
* **SOLANA:** For Solana transactions.
* **TRON:** For Tron Transactions.&#x20;
* **STARKNET:** For Starknet transactions.
* **SUI:** For SUI transactions.
* **XRPL:** For XRPL transactions.
* **STELLAR**: For Stellar transactions.

Let's see some examples here.

## EVM Sample Transaction: [(Test)](https://app.rango.exchange/bridge?fromBlockchain=BSC\&fromToken=BUSD--0xe9e7cea3dedca5984780bafc599bd69add087d56\&toBlockchain=AVAX_CCHAIN\&toToken=AVAX)

Here is the structure of an EVM transaction in the code below.

If the user lacks sufficient approval for the transaction, the create transaction method will respond with an approval transaction. (`isApproval` field is `true` in this case.) The user must first sign this approval transaction to ensure they have the necessary approval. Then, they should call the create transaction method again to obtain and sign the main transaction. The fields and schema for the approval and main transactions are identical.&#x20;

{% hint style="info" %}
For the gas price of the transaction, if the blockchain supports the new versions of gas price, such as `maxPriorityFeePerGas` and `maxFeePerGas`, these fields will be populated. However, for blockchains that have not yet updated their gas model, the gas price will be set in the `gasPrice` field as before. You can check the list of all chains that support the new gas price versions in the `meta` or `blockchains` methods. (There is an `enableGasV2` field in the response body, included for each blockchain.)
{% endhint %}

<pre class="language-json"><code class="lang-json">"transaction": {
<strong>    "type": "EVM",
</strong>    "blockChain": "BSC",
    "isApprovalTx": true,
    "from": "0x7abac41d46857b0b6c4d67eb966b4a29ba69b4f3",
    "to": "0xe9e7cea3dedca5984780bafc599bd69add087d56",
    "data": "0x095ea7b300000000000000000000000069460570c93f9de5e2edbc3052bf10125f0ca22d000000000000000000000000000000000000000000000000000775f05a074000",
    "value": null,
    "gasLimit": "0x12284",
    "gasPrice": "1100000000",
    "maxPriorityFeePerGas": null,
    "maxFeePerGas": null,
    "nonce": null
}
</code></pre>

Sample for non-approval:

<pre class="language-json"><code class="lang-json">"transaction": {
<strong>  "type": "EVM",
</strong>  "blockChain": "BSC",
  "isApprovalTx": false,
  "from": "0xccf3d872b01762aba74b41b1958a9a86ee8f34a2",
  "to": "0x69460570c93f9DE5E2edbC3052bf10125f0Ca22d",
  "data": "0xb17d0e6e000000000000000000000000000000002358d41a5a8f4afa87403e161e2955e900000000000000000000000055d398326f99059ff775485246999027b3197955000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000081fe9fae05d8094c0000000000000000000000000000000000000000000000000031fe30556285140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000037f73c93f73fac000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000ccf3d872b01762aba74b41b1958a9a86ee8f34a3000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb140000000000000000000000001b81d678ffb9c0263b24a97847620c99d213eb1400000000000000000000000055d398326f99059ff775485246999027b31979550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000081fe9fae05d8094c00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000264ac9650d800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000124c04b8d59000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000190ff9d543500000000000000000000000000000000000000000000000081fe9fae05d8094c0000000000000000000000000000000000000000000000000037f4872b410e24000000000000000000000000000000000000000000000000000000000000002b55d398326f99059ff775485246999027b31979550001f4bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004449404b7c0000000000000000000000000000000000000000000000000037f73c93f73fac00000000000000000000000069460570c93f9de5e2edbc3052bf10125f0ca22d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  "value": null,
  "gasLimit": "0x91bc6",
  "gasPrice": "1100000000",
  "maxPriorityFeePerGas": null,
  "maxFeePerGas": null,
  "nonce": null
}
</code></pre>

## COSMOS Sample Transaction:

For Cosmos based blockchains, we have two type of transactions based on `signType` field: `AMINO` and `DIRECT`.&#x20;

### Cosmos Amino Sample Transaction: [(Test)](https://app.rango.exchange/bridge/?fromBlockchain=OSMOSIS\&fromToken=OSMO\&toBlockchain=OSMOSIS\&toToken=ATOM--ibc%2F27394fb092d2eccd56123c74f36e4c1f926001ceada9ca97ea622b25f41e5eb2)

<pre class="language-json"><code class="lang-json">{
<strong>  "type": "COSMOS",
</strong>  "fromWalletAddress": "osmo1unf2rcytjxfpz8x8ar63h4qeftadptg5t0nqcl",
  "blockChain": "OSMOSIS",
  "data": {
    "chainId": "osmosis-1",
    "account_number": 102721,
    "sequence": "892",
    "msgs": [
      {
        "type": "wasm/MsgExecuteContract",
        "value": {
          "sender": "osmo1unf2rcytjxfpz8x8ar63h4qeftadptg5t0nqcl",
          "contract": "osmo1clp46dz247hck0ns5jkv49hqzg8x0vh5hsx8yfvk6w87hnvc6hgs563ew3",
          "msg": {
            "swap_and_action": {
              "user_swap": {
                "swap_exact_asset_in": {
                  "swap_venue_name": "osmosis-poolmanager",
                  "operations": [
                    {
                      "pool": "1464",
                      "denom_in": "uosmo",
                      "denom_out": "ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4"
                    },
                    {
                      "pool": "1838",
                      "denom_in": "ibc/498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4",
                      "denom_out": "ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2"
                    }
                  ]
                }
              },
              "min_asset": {
                "native": {
                  "denom": "ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2",
                  "amount": "74944"
                }
              },
              "timeout_timestamp": 1722276105002000000,
              "post_swap_action": {
                "transfer": {
                  "to_address": "osmo1unf2rcytjxfpz8x8ar63h4qeftadptg5t0nqcl"
                }
              },
              "affiliates": []
            }
          },
          "funds": [
            {
              "denom": "uosmo",
              "amount": "1000000"
            }
          ]
        }
      }
    ],
    "protoMsgs": [
      {
        "type_url": "/cosmwasm.wasm.v1.MsgExecuteContract",
        "value": [
          10,
          43,
          111,
          // ...
        ]
      }
    ],
    "memo": "",
    "source": null,
    "fee": {
      "gas": "2000000",
      "amount": [
        {
          "denom": "uosmo",
          "amount": "50000"
        }
      ]
    },
    // Sign type, could be AMINO or DIRECT
<strong>    "signType": "AMINO",
</strong>    "rpcUrl": "https://osmosis-rpc.polkachu.com"
  },
  // @deprecated An alternative to CosmosMessage object for the cosmos wallets 
  "rawTransfer": null
}
</code></pre>

### Cosmos Direct Sample Transaction: [(Test)](https://app.rango.exchange/bridge/?fromBlockchain=JUNO\&fromToken=JUNO\&toBlockchain=JUNO\&toToken=USDC--ibc%2Feac38d55372f38f1afd68df7fe9ef762dcf69f26520643cf3f9d292a738d8034\&fromAmount=1)

This type is only used in limited swappers like WYNDDex (and Juno Blockchain) and we are going to deprecate support for Cosmos Direct transaction types whenever possible.  You could sign this type of transactions using Stargate Client library.

<pre class="language-json"><code class="lang-json">"transaction": {
  "type": "COSMOS",
  "fromWalletAddress": "juno1unf2rcytjxfpz8x8ar63h4qeftadptg54xrtf3",
  "blockChain": "JUNO",
  "data": {
    "chainId": "juno-1",
    "account_number": 125507,
    "sequence": "309",
    "msgs": [
      {
        "typeUrl": "/cosmwasm.wasm.v1.MsgExecuteContract",
        "value": {
          "sender": "juno1unf2rcytjxfpz8x8ar63h4qeftadptg54xrtf3",
          "contract": "juno1pctfpv9k03v0ff538pz8kkw5ujlptntzkwjg6c0lrtqv87s9k28qdtl50w",
          "msg": "eyJleGVjdXRlX3N3YXBfb3BlcmF0aW9ucyI6eyJvcGVyYXRpb25zIjpbeyJ3eW5kZXhfc3dhcCI6eyJhc2tfYXNzZXRfaW5mbyI6eyJuYXRpdmUiOiJpYmMvQzRDRkY0NkZENkRFMzVDQTRDRjRDRTAzMUU2NDNDOEZEQzlCQTRCOTlBRTU5OEU5QjBFRDk4RkUzQTIzMTlGOSJ9LCJvZmZlcl9hc3NldF9pbmZvIjp7Im5hdGl2ZSI6InVqdW5vIn19fV0sIm1heF9zcHJlYWQiOiIwLjAxIn19",
          "funds": [
            {
              "denom": "ujuno",
              "amount": "1000000"
            }
          ]
        }
      }
    ],
    "protoMsgs": [],
    "memo": "",
    "source": null,
    "fee": {
      "gas": "1000000",
      "amount": [
        {
          "denom": "ujuno",
          "amount": "2500"
        }
      ]
    },
    // Sign type, could be AMINO or DIRECT
<strong>    "signType": "DIRECT",
</strong>    "rpcUrl": "https://rpc-juno.itastakers.com:443/"
  },

  // @deprecated An alternative to CosmosMessage object for the cosmos wallets 
  "rawTransfer": null
}
</code></pre>

## Transfer Sample Transaction: [(Test)](https://app.rango.exchange/bridge/?fromBlockchain=BTC\&fromToken=BTC\&toBlockchain=LTC\&toToken=LTC\&fromAmount=1)

Here is the structure of an UTXO (Transfer) transaction:&#x20;

```json
"transaction": {
  // This field equals to TRANSFER for all UTXO Transactions
  "type": "TRANSFER",

  // The method that should be passed to wallet including deposit, transfer
  "method": "transfer",

  // Source wallet address that can sign this transaction
  "fromWalletAddress": "bc1qagtumlttplyp93fnxndkkcf80ladl4gpnmv25u",

  // Destination wallet address that the fund should be sent to
  "recipientAddress": "bc1qeqc7py84yjrtc3cnfnjx9p9xyvjm8887kexdfu",

  // The memo of transaction, can be null
  "memo": "=:ETH.ETH:0x6f33bb1763eebead07cf8815a62fcd7b30311fa3:1080176077:rg:0",

  // The machine-readable amount of transaction
  "amount": "1000000000",

  // The decimals of the asset
  "decimals": 8,

  // An asset with its ticker
  "asset": {
    "blockchain": "BTC",
    "symbol": "BTC",
    "address": null,
    "ticker": "BTC"
  },
  
  // Partially signed bitcoin transaction
  "psbt": {
            "unsignedPsbtBase64": "cHNidP8BAH0CAAAAAdeeknt27QIuENUtqyEuDWKi0HjMR6J8OyFIH0AeCowYAAAAAAD/////AoCWmAAAAAAAIlEgD5gCxhBANQBrbG92Di7Y0wPGEgBXxa9K7mVT0IIvONIM+SMCAAAAABYAFOoXzf1rD8gSxTM022thJ3/639UBAAAAAAABAR9QkbwCAAAAABYAFOoXzf1rD8gSxTM022thJ3/639UBAAAA",
            "inputsToSign": [
                {
                    "address": "bc1qagtumlttplyp93fnxndkkcf80ladl4gpnmv25u",
                    "signingIndexes": [
                        0
                    ]
                }
            ]
        }
}
```

## Tron Sample Transaction: [(Test)](https://app.rango.exchange/bridge/?fromBlockchain=TRON\&fromToken=TRX\&toBlockchain=TRON\&toToken=USDT--TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t)

Here is the structure of a Tron transaction. Similar to EVM transactions, it can be either an approval transaction or a main transaction, depending on the `isApproval` field

```json
{
  "type": "TRON",
  "blockChain": "TRON",
  "isApprovalTx": false,
  "raw_data": {
    "contract": [
      {
        "parameter": {
          "value": {
            "data": "b24ebddb000000000000000000000000000000000000000000000000000000000002091100000000000000000000000000000000000000000000000000000190ffaa951100000000000000000000000000000000000000000000000000000000000f4240",
            "owner_address": "413a51fc0bc19accbea62fac65bad2660bbcffd08a",
            "contract_address": "41a2726afbecbd8e936000ed684cef5e2f5cf43008",
            "call_value": 1000000
          },
          "type_url": "type.googleapis.com/protocol.TriggerSmartContract"
        },
        "type": "TriggerSmartContract"
      }
    ],
    "ref_block_bytes": "af01",
    "ref_block_hash": "e4752a1cdaf3e944",
    "expiration": 1722276345000,
    "fee_limit": 1500000000,
    "timestamp": 1722276287817
  },
  "raw_data_hex": "0a02af012208e4752a1cdaf3e94440a8e9adfd8f325ad301081f12ce010a31747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e54726967676572536d617274436f6e74726163741298010a15413a51fc0bc19accbea62fac65bad2660bbcffd08a121541a2726afbecbd8e936000ed684cef5e2f5cf4300818c0843d2264b24ebddb000000000000000000000000000000000000000000000000000000000002091100000000000000000000000000000000000000000000000000000190ffaa951100000000000000000000000000000000000000000000000000000000000f424070c9aaaafd8f32900180dea0cb05",
  "externalTxId": null,
  "__payload__": {
    "owner_address": "413a51fc0bc19accbea62fac65bad2660bbcffd08a",
    "call_value": 1000000,
    "contract_address": "41a2726afbecbd8e936000ed684cef5e2f5cf43008",
    "fee_limit": 1500000000,
    "function_selector": "trxToTokenSwapInput(uint256,uint256,uint256)",
    "parameter": "000000000000000000000000000000000000000000000000000000000002091100000000000000000000000000000000000000000000000000000190ffaa951100000000000000000000000000000000000000000000000000000000000f4240",
    "chainType": 0
  },
  "txID": "10d1428e0ccc8870b9334d73da2313cfaff29ec27930e68a6947ea8bb1d6b181",
  "visible": false
}
```

## Starknet Sample Transaction: [(Test)](https://app.rango.exchange/bridge/?fromBlockchain=STARKNET\&fromToken=ETH--0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7\&toBlockchain=STARKNET\&toToken=USDT--0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8\&fromAmount=1)

Here is the structure of a Starknet transaction. Like EVM transactions, it can be either an approval transaction or a main transaction, depending on the `isApproval` field. Whenever possible, in Starknet, we batch the approval and main transactions into a single transaction using the `calls` array, as shown in the example below.

```json
"transaction": {
    "type": "STARKNET",
    "blockChain": "STARKNET",
    "calls": [
        {
            "contractAddress": "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
            "entrypoint": "approve",
            "calldata": [
                "0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f",
                "0x00000000000000000ddb6275b03a4000",
                "0x00000000000000000000000000000000"
            ]
        },
        {
            "contractAddress": "0x4270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f",
            "entrypoint": "multi_route_swap",
            "calldata": [
                "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
                "0xddb6275b03a4000",
                "0x0",
                // ...
            ]
        },
        {
            "contractAddress": "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
            "entrypoint": "transfer",
            "calldata": [
                "0x01d8b73b49d8cb653570929260e8e01033278d6840f706faa421f08b992f8083",
                "0x00000000000000000005543df729c000",
                "0x00000000000000000000000000000000"
            ]
        }
    ],
    "maxFee": null,
    "isApprovalTx": false,
    "spender": null
}
```

## Solana Sample Transaction: [(Test)](https://app.rango.exchange/bridge/?fromBlockchain=SOLANA\&fromToken=USDT--Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB\&toBlockchain=SOLANA\&toToken=SOL\&fromAmount=1)

{% hint style="warning" %}
**Base64 Encoding**

Remember to broadcast the signed transaction to Solana RPCs with **base64** encoding. The **base58 encoding is deprecated**, but it is still the default method in Solana [docs](https://solana.com/docs/rpc/http/sendtransaction).&#x20;
{% endhint %}

{% hint style="info" %}
**Versioned vs Legacy**

All supported routes for Solana are `VERSIONED` transactions except a special case of converting `SOL` to `WSOL` or vice versa via Solana Wrapper. (which you can ignore it.)

* [Sample for versioned transaction](https://app.rango.exchange/bridge/?fromBlockchain=SOLANA\&fromToken=USDT--Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB\&toBlockchain=SOLANA\&toToken=SOL\&fromAmount=1)
* [Sample for legacy transaction](https://app.rango.exchange/bridge/?fromBlockchain=SOLANA\&fromToken=SOL\&toBlockchain=SOLANA\&toToken=WSOL--So11111111111111111111111111111111111111112\&fromAmount=1)
  {% endhint %}

<pre class="language-json"><code class="lang-json"><strong>"transaction": {
</strong>     // This field equals to SOLANA for all SOLANA Transactions
    "type": "SOLANA",
    
    // Transaction blockchain
    "blockChain": "SOLANA",
    
    // Wallet address of transaction initiator
    "from": "3HsNMDtxPRUzwLpDJemmNVbasm11Ei5CGGCjktgHh27F",
    
    // Transaction identifier in case of retry
    "identifier": "Swap",
    
    // List of instructions
    "instructions": [ ],

    // Recent blockHash. Nullable. Filled only if message is already partially signed
    "recentBlockhash": null,
    
    // List of signatures. Filled only if message is already partially signed
    "signatures": [ ],
    
    // When serialized message appears, there is no need for other fields and you just sign and send it
    "serializedMessage": [1, 0, 95, 96, ..., 1, 253], 
    
    // Could be LEGACY or VERSIONED
<strong>    "txType": "VERSIONED"
</strong>  }
</code></pre>

## SUI Sample Transaction:[(Test)](https://app.rango.exchange/bridge/?fromBlockchain=SUI\&fromToken=SUI--0x2%3A%3Asui%3A%3ASUI\&toBlockchain=BSC\&toToken=BNB\&fromAmount=15)

{% hint style="info" %}
**Key Notes:**

* The **unsignedPtbBase64** field is a base64-encoded string that contains the transaction's raw data. This is typically used to create the signed transaction, which would then be broadcasted to the blockchain.
  {% endhint %}

```json
"transaction": {
    "type": "SUI",
    "blockChain": "SUI",
    // Base64-encoded unsigned transaction data
    "unsignedPtbBase64": "AAAA...<base64_encoded_data>..."
  }
```

## XRPL Sample Transaction:[(Test)](https://api.rango.exchange/basic/swap?from=XRPL.XRP\&to=BASE.ETH\&amount=50000000)

{% hint style="info" %}
**Key Notes:**

* **Trust lines (IOUs):** When the destination token is not the native XRP, you need to set up a trust line to the issuer account before the swap (wallets can sign this as a pre-tx)
  {% endhint %}

```json
 "transaction": {
        "type": "XRPL",
        "blockChain": "XRPL",
        "data": {
            "TransactionType": "Payment",
            "Destination": "rM27yzkCw6WA3T4g1sPaeC1kpxHUhuxRWn",
            "Amount": "10231000",
            "Memos": [
                {
                    "Memo": {
                        "MemoData": "7B2266726F6D546F6B656E223A22307865656565656565656565656565656565656565656565656565656565656565656565656565656565222C22746F546F6B656E223A2258525041594E45547C72616E676F4465787C302E3031222C2273656E646572223A22724769537053387177614B4E62386E6D6A3234616831794767724434346B36543663222C2264657374696E6174696F6E223A22724769537053387177614B4E62386E6D6A3234616831794767724434346B36543663222C226D696E52657475726E416D6F756E74223A22393136393338353234373034303030303030303030303030222C2266726F6D416D6F756E74223A223130323331303030227D"
                    }
                }
            ]
        },
        "type": "XRPL""prerequisites": [
                {
                        "type": "XRPL_CHANGE_TRUSTLINE",
                        "currency": "The Xrpl output asset currency, such as USDC",
                        "issuer": "The Xrpl output asset issuer",
                        "value": "Minimum expected value of trust for the Xrpl asset",
                        "wallet": "User's wallet address which must have this trustline allowed for the Xrpl asset" 
                }
        ],
}


```

```json
 "transaction": {
        "type": "XRPL",
        "blockChain": "XRPL",
        "data": {
            "TransactionType": "Payment",
            "Destination": "rM27yzkCw6WA3T4g1sPaeC1kpxHUhuxRWn",
            "Amount": {
                "currency": "CSC",
                "value": "256461.000000000000000000",
                "issuer": "rCSCManTZ8ME9EoLrSHHYKW8PPwWMgkwr"
            },
            "Memos": [
                {
                    "Memo": {
                        "MemoData": "7B2266726F6D546F6B656E223A22724353434D616E545A384D4539456F4C72534848594B5738505077574D676B7772222C22746F546F6B656E223A22307865656565656565656565656565656565656565656565656565656565656565656565656565656565222C2273656E646572223A22724769537053387177614B4E62386E6D6A3234616831794767724434346B36543663222C2264657374696E6174696F6E223A22724769537053387177614B4E62386E6D6A3234616831794767724434346B36543663222C226D696E52657475726E416D6F756E74223A2237303230333339222C2266726F6D416D6F756E74223A22323536343631303030303030303030303030303030303030227D"
                    }
                }
            ]
        },
        "prerequisites": [
                {
                        "type": "XRPL_CHANGE_TRUSTLINE",
                        "currency": "The Xrpl output asset currency, such as USDC",
                        "issuer": "The Xrpl output asset issuer",
                        "value": "Minimum expected value of trust for the Xrpl asset",
                        "wallet": "User's wallet address which must have this trustline allowed for the Xrpl asset" 
                }
        ],
    }


```

## Stellar Sample Transaction: [(Test)](https://api.rango.exchange/basic/swap?from=STELLAR.XLM\&to=STELLAR.USDC--USDC-GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN\&amount=50000000)

In order to execute a transaction on stellar network, Rango provides you a base64 encoded External Data Representation or XDR for operations and memo of the transaction, and preconditions of a PreconditionsV2. You can check the [official Stellar docs regarding XDRs](https://developers.stellar.org/docs/learn/fundamentals/data-format/xdr) in Stellar Network. This value must be signed by user's wallet.

{% hint style="info" %}
**Key Notes:**

* **Trust lines:** When the destination token is not the native XLM, the API returns a trust-line precondition which must be signed and broadcasted before signing and broadcasting the swap transaction. In some of the swaps, Rango would be able to include the `ChangeTrustOperation` in the transaction itself, and so no trust-line precondition would be returned by the API.
  {% endhint %}

Note that for non-native Stellar assets, user's wallet must allow a trustline for the asset in order to receive it.&#x20;

<pre class="language-json"><code class="lang-json"><strong> "transaction": {
</strong>        "type": "STELLAR",
        "blockChain": "STELLAR",
        "data": {
                "baseFee": null, // Optional BigInt value, Recommended base fee (in stroops) for building the stellar transaction
                "preconditions": {        // CAP-21 PreconditionsV2 of transaction transaction
                        "timeBounds": { // Optional, time bounds of stellar transaction data
                                "minTime": 1778506995, // BigInt value, Unix timestamped constraint for minimum time of transaction validity
                                "maxTime": 1779506995 // Unix timestamped constraint for maximum time of transaction validity
                        },
                        "ledgerBounds": { // Optional, ledger bounds of stellar transaction data, Transaction only valid for ledger numbers n such that minLedger &#x3C;= n &#x3C; maxLedger
                                "minLedger": 1000, // BigInt value, Minimum ledger for transaction validity
                                "maxLedger": 0 // BigInt value, Maximum ledger for transaction validity, 0 here means NO maxLedger
                        },
                        "minSeqNumber": null, // BigInt value, If NULL, only valid when sourceAccount's sequence number is seqNum - 1.  Otherwise, valid when sourceAccount's sequence number n satisfies minSeqNum &#x3C;= n &#x3C; tx.seqNum
                        "minSeqAge": null, // BigInt value, For the transaction to be valid, the current ledger time must be at least minSeqAge greater than sourceAccount's seqTime
                        "minSeqLedgerGap": null, // BigInt value, For the transaction to be valid, the current ledger number must be at least minSeqLedgerGap greater than sourceAccount's seqLedger
                        "extraSigners": null // Optional, list of strings, For the transaction to be valid, there must be a signature corresponding to every Signer in this array
                },
                "operationsXdrBase64": [ // list of operations as base 64 encoded strings
                        "AAA...",
                        "AAA..."
                ],
                "memoXdrBase64": null // base 64 encoded memo of transaction
        },
        "prerequisites": [
                {
                        "type": "STELLAR_CHANGE_TRUSTLINE",
                        "code": "The stellar output asset code, such as USDC",
                        "issuer": "The stellar asset issuer, e.g.: GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
                        "value": "The minimum amount of required trustline for this stellar asset, such as 11.50",
                        "wallet": "User's wallet address which must have this trustline allowed for the stellar asset" 
                }
        ]
    }
</code></pre>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rango.exchange/api-integration/main-api-multi-step/sample-transactions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
