# Object types

### Swap Object

| Field                    | Descripiton                                                                                                                                     |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| id                       | The id of the swap                                                                                                                              |
| source\_network          | Network name like `STARKNET_MAINNET`                                                                                                            |
| destination\_network     | Network name like `OPTIMISM_MAINNET`                                                                                                            |
| amount                   | The amount to be sent. Note that this is **NOT** the final amount sent by the user since the user can specify another amount while transferring |
| fee                      | The Layerswap fee. Note that fee is recalculated based on the transaction initiated by the user                                                 |
| source\_asset            | Asset Name transfered, like `USDC`                                                                                                              |
| destination\_address     | The address where the user funds will be received                                                                                               |
| reference\_id (optional) | Partner specified id that could be used for future reference to retrieve the swap                                                               |
| status                   | The status of the swap. Available values: \[user\_transfer\_pending, ls\_transfer\_pending, completed, failed, expired, canceled]               |
| transactions             | Array of [Transaction object](#transaction-object)                                                                                              |

### Network Object

| Field         | Description                                                                             |
| ------------- | --------------------------------------------------------------------------------------- |
| name          | The unique formatted name indicates the network and whether it is on Testnet or Mainnet |
| display\_name | The user-friendly name for the network                                                  |
| logo          | The URL for the network logo                                                            |

### Asset Object

| Field               | Descripiton                                                                 |
| ------------------- | --------------------------------------------------------------------------- |
| name                | The unique formatted name for the currency (e.g: ETH)                       |
| display\_name       | The user-friendly name for the currency                                     |
| logo                | The URL for the currency logo                                               |
| name                | The recent price in USD for the currency                                    |
| contract (optional) | The contract address for the currency                                       |
| decimals            | The floating decimal places for the currency                                |
| precision           | The number of decimal places for the currency amount to be used in rounding |

### Transaction Object

<table><thead><tr><th width="343">Field</th><th>Description</th></tr></thead><tbody><tr><td>timestamp</td><td>The timestamp of an actual blockchain transaction</td></tr><tr><td>type</td><td>Layerswap transaction types. Possible values: "input", "output", "refuel"</td></tr><tr><td>from</td><td>The sending party of the transaction</td></tr><tr><td>to</td><td>The receiving party of the transaction</td></tr><tr><td>transaction_hash</td><td>The blockchain transaction id</td></tr><tr><td>confirmations</td><td>The number of confirmations for the transaction</td></tr><tr><td>max_confirmations</td><td>The maximum number for the transaction to be confirmed at the blockchain</td></tr><tr><td>amount</td><td>The amount sent in the transaction</td></tr></tbody></table>

### Swap Rate Object

<table><thead><tr><th width="343">Field</th><th>Description</th></tr></thead><tbody><tr><td>min_amount</td><td>The minimal amount for the swap to be created for a given asset</td></tr><tr><td>max_amount</td><td>The maximal amount for the swap to be created for a given asset</td></tr><tr><td>fee_amount</td><td>The Layerswap fee amount</td></tr></tbody></table>


---

# 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://learn.layerswap.io/api/data/object-types.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.
