Get Sources
curl --request GET \
--url https://api.layerswap.io/api/v2/sources \
--header 'X-LS-APIKEY: <api-key>'{
"error": {
"code": "<string>",
"message": "<string>",
"metadata": {}
},
"data": [
{
"name": "<string>",
"display_name": "<string>",
"logo": "<string>",
"chain_id": "<string>",
"node_url": "<string>",
"nodes": [
"<string>"
],
"transaction_explorer_template": "<string>",
"account_explorer_template": "<string>",
"source_rank": 123,
"destination_rank": 123,
"token": {
"symbol": "<string>",
"display_asset": "<string>",
"logo": "<string>",
"contract": "<string>",
"decimals": 123,
"price_in_usd": 123,
"precision": 123,
"listing_date": "2023-11-07T05:31:56Z",
"source_rank": 123,
"destination_rank": 123,
"group": "<string>"
},
"metadata": {
"listing_date": "2023-11-07T05:31:56Z",
"evm_oracle_contract": "<string>",
"evm_multicall_contract": "<string>",
"zks_paymaster_contract": "<string>",
"watchdog_contract": "<string>"
},
"deposit_methods": [
"<string>"
],
"tokens": [
{
"symbol": "<string>",
"display_asset": "<string>",
"logo": "<string>",
"contract": "<string>",
"decimals": 123,
"price_in_usd": 123,
"precision": 123,
"listing_date": "2023-11-07T05:31:56Z",
"source_rank": 123,
"destination_rank": 123,
"group": "<string>",
"status": "<string>",
"refuel": {
"token": {
"symbol": "<string>",
"display_asset": "<string>",
"logo": "<string>",
"contract": "<string>",
"decimals": 123,
"price_in_usd": 123,
"precision": 123,
"listing_date": "2023-11-07T05:31:56Z",
"source_rank": 123,
"destination_rank": 123,
"group": "<string>"
},
"network": {
"name": "<string>",
"display_name": "<string>",
"logo": "<string>",
"chain_id": "<string>",
"node_url": "<string>",
"nodes": [
"<string>"
],
"transaction_explorer_template": "<string>",
"account_explorer_template": "<string>",
"source_rank": 123,
"destination_rank": 123,
"token": {
"symbol": "<string>",
"display_asset": "<string>",
"logo": "<string>",
"contract": "<string>",
"decimals": 123,
"price_in_usd": 123,
"precision": 123,
"listing_date": "2023-11-07T05:31:56Z",
"source_rank": 123,
"destination_rank": 123,
"group": "<string>"
},
"metadata": {
"listing_date": "2023-11-07T05:31:56Z",
"evm_oracle_contract": "<string>",
"evm_multicall_contract": "<string>",
"zks_paymaster_contract": "<string>",
"watchdog_contract": "<string>"
},
"deposit_methods": [
"<string>"
]
},
"amount": 123,
"amount_in_usd": 123
}
}
]
}
]
}Swaps
Get Sources
Retrieves all available source routes. Network parameters accept either network names (e.g. ETHEREUM_MAINNET) or numeric chain IDs for EVM networks (e.g. 1). Token parameters accept either asset names (e.g. USDC, ETH) or token contract addresses (e.g. 0xa0b8…). For native tokens via contract address, use the network’s zero address (e.g. 0x0000000000000000000000000000000000000000 for EVM, 11111111111111111111111111111111 for Solana).
GET
/
api
/
v2
/
sources
Get Sources
curl --request GET \
--url https://api.layerswap.io/api/v2/sources \
--header 'X-LS-APIKEY: <api-key>'{
"error": {
"code": "<string>",
"message": "<string>",
"metadata": {}
},
"data": [
{
"name": "<string>",
"display_name": "<string>",
"logo": "<string>",
"chain_id": "<string>",
"node_url": "<string>",
"nodes": [
"<string>"
],
"transaction_explorer_template": "<string>",
"account_explorer_template": "<string>",
"source_rank": 123,
"destination_rank": 123,
"token": {
"symbol": "<string>",
"display_asset": "<string>",
"logo": "<string>",
"contract": "<string>",
"decimals": 123,
"price_in_usd": 123,
"precision": 123,
"listing_date": "2023-11-07T05:31:56Z",
"source_rank": 123,
"destination_rank": 123,
"group": "<string>"
},
"metadata": {
"listing_date": "2023-11-07T05:31:56Z",
"evm_oracle_contract": "<string>",
"evm_multicall_contract": "<string>",
"zks_paymaster_contract": "<string>",
"watchdog_contract": "<string>"
},
"deposit_methods": [
"<string>"
],
"tokens": [
{
"symbol": "<string>",
"display_asset": "<string>",
"logo": "<string>",
"contract": "<string>",
"decimals": 123,
"price_in_usd": 123,
"precision": 123,
"listing_date": "2023-11-07T05:31:56Z",
"source_rank": 123,
"destination_rank": 123,
"group": "<string>",
"status": "<string>",
"refuel": {
"token": {
"symbol": "<string>",
"display_asset": "<string>",
"logo": "<string>",
"contract": "<string>",
"decimals": 123,
"price_in_usd": 123,
"precision": 123,
"listing_date": "2023-11-07T05:31:56Z",
"source_rank": 123,
"destination_rank": 123,
"group": "<string>"
},
"network": {
"name": "<string>",
"display_name": "<string>",
"logo": "<string>",
"chain_id": "<string>",
"node_url": "<string>",
"nodes": [
"<string>"
],
"transaction_explorer_template": "<string>",
"account_explorer_template": "<string>",
"source_rank": 123,
"destination_rank": 123,
"token": {
"symbol": "<string>",
"display_asset": "<string>",
"logo": "<string>",
"contract": "<string>",
"decimals": 123,
"price_in_usd": 123,
"precision": 123,
"listing_date": "2023-11-07T05:31:56Z",
"source_rank": 123,
"destination_rank": 123,
"group": "<string>"
},
"metadata": {
"listing_date": "2023-11-07T05:31:56Z",
"evm_oracle_contract": "<string>",
"evm_multicall_contract": "<string>",
"zks_paymaster_contract": "<string>",
"watchdog_contract": "<string>"
},
"deposit_methods": [
"<string>"
]
},
"amount": 123,
"amount_in_usd": 123
}
}
]
}
]
}Authorizations
Headers
X-LS-APIKEY
string
default:NDBxG+aon6WlbgIA2LfwmcbLU52qUL9qTnztTuTRPNSohf/VnxXpRaJlA5uLSQVqP8YGIiy/0mz+mMeZhLY4/Q
Query Parameters
Available options:
evm, starknet, solana, cosmos, starkex, zksynclite, ton, paradex, tron, fuel, bitcoin, hyperliquid Was this page helpful?
⌘I