> For the complete documentation index, see [llms.txt](https://timechain.gitbook.io/neucron/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://timechain.gitbook.io/neucron/api-references/asset-swap.md).

# Asset Swap

Exchange one supported asset for another at a quoted rate.

* List swappable pairs
* Get a rate quote
* Execute the swap

## Get Swappable Assets

> List assets and pairs available for swapping.

```json
{"openapi":"3.0.3","info":{"title":"Neucron API Documentation","version":"1.0.0"},"tags":[{"name":"Asset Swap","description":"Exchange one supported asset for another at a quoted rate.\n\n- List swappable pairs\n- Get a rate quote\n- Execute the swap"}],"servers":[{"url":"https://dev.neucron.io","description":"Development"},{"url":"https://api.neucron.io","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Access token from `POST /auth/login` or `POST /auth/signup`. Also send header `X-Identifier: NEUCRON`. For business APIs, include `X-Neucron-Business-ID`."}}},"paths":{"/asset-swap/swappable":{"get":{"tags":["Asset Swap"],"summary":"Get Swappable Assets","description":"List assets and pairs available for swapping.","operationId":"asset-swap_get_swappable_assets","responses":{"200":{"description":"200 OK — Request completed successfully.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"400 Bad Request — Invalid or missing parameters."},"401":{"description":"401 Unauthorized — Missing or invalid authentication."},"403":{"description":"403 Forbidden — Insufficient permissions."},"404":{"description":"404 Not Found — Resource does not exist."},"409":{"description":"409 Conflict — Resource conflict (e.g. duplicate)."},"500":{"description":"500 Internal Server Error — Server-side failure."}},"parameters":[{"name":"X-Identifier","in":"header","required":true,"description":"Platform identifier. Use `NEUCRON`.","schema":{"type":"string"}},{"name":"X-Neucron-Business-ID","in":"header","required":false,"description":"Active business context. Required for business-scoped operations.","schema":{"type":"string"}}]}}}}
```

## Get Swap Rate

> Quote the exchange rate for a proposed swap.

```json
{"openapi":"3.0.3","info":{"title":"Neucron API Documentation","version":"1.0.0"},"tags":[{"name":"Asset Swap","description":"Exchange one supported asset for another at a quoted rate.\n\n- List swappable pairs\n- Get a rate quote\n- Execute the swap"}],"servers":[{"url":"https://dev.neucron.io","description":"Development"},{"url":"https://api.neucron.io","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Access token from `POST /auth/login` or `POST /auth/signup`. Also send header `X-Identifier: NEUCRON`. For business APIs, include `X-Neucron-Business-ID`."}}},"paths":{"/asset-swap/rate":{"post":{"tags":["Asset Swap"],"summary":"Get Swap Rate","description":"Quote the exchange rate for a proposed swap.","operationId":"asset-swap_get_swap_rate","responses":{"200":{"description":"200 OK — Request completed successfully.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"400 Bad Request — Invalid or missing parameters."},"401":{"description":"401 Unauthorized — Missing or invalid authentication."},"403":{"description":"403 Forbidden — Insufficient permissions."},"404":{"description":"404 Not Found — Resource does not exist."},"409":{"description":"409 Conflict — Resource conflict (e.g. duplicate)."},"500":{"description":"500 Internal Server Error — Server-side failure."}},"parameters":[{"name":"X-Identifier","in":"header","required":true,"description":"Platform identifier. Use `NEUCRON`.","schema":{"type":"string"}},{"name":"X-Neucron-Business-ID","in":"header","required":false,"description":"Active business context. Required for business-scoped operations.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Request body (`application/json`)","content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","description":"Amount of the source asset."},"from_asset_name":{"type":"string","description":"Source asset name."},"from_network_name":{"type":"string","description":"Source network."},"to_asset_name":{"type":"string","description":"Destination asset name."},"to_network_name":{"type":"string","description":"Destination network."}},"required":["amount","from_asset_name","from_network_name","to_asset_name","to_network_name"]}}}}}}}}
```

## Swap Assets

> Execute an asset swap for the specified wallet.

```json
{"openapi":"3.0.3","info":{"title":"Neucron API Documentation","version":"1.0.0"},"tags":[{"name":"Asset Swap","description":"Exchange one supported asset for another at a quoted rate.\n\n- List swappable pairs\n- Get a rate quote\n- Execute the swap"}],"servers":[{"url":"https://dev.neucron.io","description":"Development"},{"url":"https://api.neucron.io","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Access token from `POST /auth/login` or `POST /auth/signup`. Also send header `X-Identifier: NEUCRON`. For business APIs, include `X-Neucron-Business-ID`."}}},"paths":{"/asset-swap/swap":{"post":{"tags":["Asset Swap"],"summary":"Swap Assets","description":"Execute an asset swap for the specified wallet.","operationId":"asset-swap_swap_assets","responses":{"200":{"description":"200 OK — Request completed successfully.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"400 Bad Request — Invalid or missing parameters."},"401":{"description":"401 Unauthorized — Missing or invalid authentication."},"403":{"description":"403 Forbidden — Insufficient permissions."},"404":{"description":"404 Not Found — Resource does not exist."},"409":{"description":"409 Conflict — Resource conflict (e.g. duplicate)."},"500":{"description":"500 Internal Server Error — Server-side failure."}},"parameters":[{"name":"walletID","in":"query","required":true,"description":"Wallet performing the swap.","schema":{"type":"string"}},{"name":"X-Identifier","in":"header","required":true,"description":"Platform identifier. Use `NEUCRON`.","schema":{"type":"string"}},{"name":"X-Neucron-Business-ID","in":"header","required":false,"description":"Active business context. Required for business-scoped operations.","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"Request body (`application/json`)","content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","description":"Amount of the source asset."},"from_asset_name":{"type":"string","description":"Source asset name."},"from_network_name":{"type":"string","description":"Source network."},"to_asset_name":{"type":"string","description":"Destination asset name."},"to_network_name":{"type":"string","description":"Destination network."}},"required":["amount","from_asset_name","from_network_name","to_asset_name","to_network_name"]}}}}}}}}
```
