The Direct Swap API provides seamless integration for cross-chain token swaps. This service supports:
Detailed Endpoint Descriptions
{
"status": "success",
"message": "Direct swap network list fetched successfully.",
"data": [
{
"Id": 2,
"Name": "Ethereum",
"Symbol": "ETH",
"DisplaySymbol": "ETH",
"Token": "ETH",
"Icon": "null",
"ChainId": 1,
"Rpc": "https://delicate-serene-voice.quiknode.pro/25ce84761d4718a40e0001c23c7dfa66ebfc16e8/",
"IsSwapActive": 1,
"XtalkNetworkName": "ethereum",
"DirectSwapTreasuryAddress": "0x2c2E354350095D6f51eac0d4D55d6c037744D431"
},
{
"Id": 3,
"Name": "Polygon",
"Symbol": "MATIC",
"DisplaySymbol": "MATIC",
"Token": "MATIC",
"Icon": "null",
"ChainId": 137,
"Rpc": "https://flashy-fragrant-diagram.matic.quiknode.pro/d3c0e5fab188019934559fdd7ebc05f93253181e/",
"IsSwapActive": 1,
"XtalkNetworkName": "polygon",
"DirectSwapTreasuryAddress": "0x7AD01f5297D3FD0b05D71C837D93848bff23B5C2"
},
{
"Id": 4,
"Name": "Binance",
"Symbol": "BSC",
"DisplaySymbol": "BSC",
"Token": "BNB",
"Icon": "null",
"ChainId": 56,
"Rpc": "https://skilled-prettiest-water.bsc.quiknode.pro/bda75739ae1640752fa827b4e4955cb57842efed/",
"IsSwapActive": 1,
"XtalkNetworkName": "bsc",
"DirectSwapTreasuryAddress": "0x4C46e01f22eEAD391ef9Fdbf2d002AdDe2d2d761"
},
{
"Id": 5,
"Name": "Avalanche",
"Symbol": "AVAX",
"DisplaySymbol": "AVAX",
"Token": "AVAX",
"Icon": "null",
"ChainId": 43114,
"Rpc": "https://blue-smart-layer.avalanche-mainnet.quiknode.pro/261948a9eac541da5075d92111592579ee96e3e3/ext/bc/C/rpc/",
"IsSwapActive": 1,
"XtalkNetworkName": "avalanche",
"DirectSwapTreasuryAddress": "0x337F42Fe0aa52e55A71D30059d790afB86770065"
},
{
"Id": 7,
"Name": "Optimism",
"Symbol": "OPTIMISM",
"DisplaySymbol": "OP",
"Token": "OP",
"Icon": "null",
"ChainId": 10,
"Rpc": "https://twilight-attentive-morning.optimism.quiknode.pro/446c3b7a34928b914462b9a1fdda567456bc3fc5/",
"IsSwapActive": 1,
"XtalkNetworkName": "optimism",
"DirectSwapTreasuryAddress": "0xa972f26F5Ea73Eb80C5031baCfaF0905087AaF18"
},
{
"Id": 8,
"Name": "Arbitrum",
"Symbol": "ARBITRUM",
"DisplaySymbol": "ARB",
"Token": "ARB",
"Icon": "null",
"ChainId": 42161,
"Rpc": "https://intensive-ancient-daylight.arbitrum-mainnet.quiknode.pro/b60eaf8acba45cfaf50164345f2beb3b1b09c649/",
"IsSwapActive": 1,
"XtalkNetworkName": "arbitrum",
"DirectSwapTreasuryAddress": "0xa972f26F5Ea73Eb80C5031baCfaF0905087AaF18"
}
]
}
{
"status": "success",
"message": "Transaction details fetched successfully.",
"data": {
"status": "confirmed_on_destination_chain",
"destination_transaction_hash": "0xcb309eedab7f4dfd562a115bc999c7ba60db96aab41abb31b630b250e74c41f6"
}
}
{
"status": "success",
"message": "Access key status fetched successfully.",
"data": {
"status": "Active",
"valid_till:": 1746879241
}
}
curl --location 'https://dev-api.l1xapp.com/api/v2/direct_swap/access_key/l1x_accessKeyRequest' \
--header 'accept: application/json' \
--header 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'Content-Type: application/json' \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcm9maWxlSWQiOjgxMCwiaWF0IjoxNzMxNDA4MDUxfQ.B-_wGNsSJldxq8_qLFgQqX7_J0_AqJ1iMVzH2YWuS-8' \
--data '{
"ips": ["192.168.68.127","0.0.0.0"]
}'
{
"status": "success",
"data": {
"accessKey": "7b66e86754a8439de729de67a3876309",
"validTill": 1746633887
},
"message": "Access key generated successfully"
}
{
"status": "success",
"message": "Transaction details fetched successfully.",
"data": {
"quoteId": "f56475cd-280f-48c4-985a-6a32bf0326bb",
"conversionRateId": 1732199177167,
"sourceChainId": 137,
"destinationChainId": 56,
"sourceAssetAddress": "0x0000000000000000000000000000000000000000",
"destinationAssetAddress": "0x0000000000000000000000000000000000000000",
"affiliateReceiverAddress": "0x4901E07F1d0712C92cEaEe10F60Ff2C2d41e8c76",
"sourceAmount": "100000000000000000000",
"destinationAssetDecimals": 18,
"destinationAmount": "64775650404042015",
"destinationAmountBeforeFee": "72770000000000001",
"fee_details": {
"sourceAmount": "100000000000000000000",
"sourceAmountInUSD": "45.636392",
"srcFixedFeeAmountInUSD": "0.07",
"destFixedFeeAmountInUSD": "0.1",
"srclpProviderPercent": "0.035",
"destlpProviderPercent": "0.05",
"srclpProviderPercentAmountInUSD": "0.01597273",
"destlpProviderPercentAmountInUSD": "0.02281819",
"xTalkNodeCommissionPecent": "5.0",
"xTalkNodeCommissionAmountInUSD": "0.01148959",
"totalFeeInUSD": "0.45007231",
"totalFeeNative": "986213612154089657",
"destinationGasFeeInUSD": "0.2297918",
"sourceRoundId": "55340232221130592293",
"destinationRoundId": "36893488147420489563",
"estimatedDestinationGas": "366069000000000",
"affiliateFeePercent": 10,
"totalFeeAtDestination": "717349595957986",
"affiliateFeeAtDestination": "7277000000000000"
},
"conversionDetails": {
"MATIC": {
"BNB": "72770",
"USDT": "45660000"
},
"BNB": {
"BNB": "100000000",
"USDT": "62741000000"
},
"conversionId": 1732199177167
}
}
}
{
"status": "success",
"message": "Affiliate tx history fetched successfully.",
"data": {
"meta": {
"total": 2,
"per_page": 1,
"current_page": 1,
"last_page": 2,
"first_page": 1,
"first_page_url": "/?page=1",
"last_page_url": "/?page=2",
"next_page_url": "/?page=2",
"previous_page_url": null
},
"data": [
{
"QuoteId": "563038bc-c37c-4631-85ec-1e0e3f9b45f0",
"AffiliateFeeAtDestination": "25099739000000003",
"AffiliateFeeReceiver": "0x4901E07F1d0712C92cEaEe10F60Ff2C2d41e8c76",
"GlobalTxId": "8C517FCCC4F803D7E8C9A1362448EE221CC5A632DEA5B1271CBFE3D6C3F38188",
"InternalId": "94301731416890045",
"SwapFulfilledTxHash": "0x7eb151a272c657f6c15ee770896cb4af0e3afc72a30999e6189df5af4dd22b53",
"DestNetwork": "MATIC"
}
]
}
}