Direct Swap API
Introduction
The Direct Swap API provides seamless integration for cross-chain token swaps. This service supports:
Access Key Management: Create, check, and manage API access keys.
Quote Generation: Generate swap quotes with customizable parameters.
Swap Execution: Perform swaps securely across supported blockchain networks.
Transaction Tracking: Monitor swap progress and confirm transaction completion.

Endpoints
/l1x_getNetworkList
GET
Retrieve a list of all supported networks.
/l1x_getXtalkStatus?swapId=<id>
GET
Get the status of a specific swap using its Swap ID.
/access_key/l1x_accessKeyStatus
GET
Check the status of an existing access key.
/access_key/l1x_accessKeyRequest
POST
Request a new access key for API usage.
/l1x_getQuote
POST
Generate a swap quote with input parameters.
/l1x_createSwap
POST
Create and execute a swap using a quote ID.
Detailed Endpoint Descriptions
List Supported Networks
Method:
GETEndpoint:
/l1x_getNetworkListDescription: Retrieves a list of all blockchain networks supported by the Direct Swap service.
Response Example:
Get Direct X-Talk Status
Method:
GETEndpoint:
/l1x_getXtalkStatusDescription: Retrieves the current status of a specific swap.
Query Parameters:
swapId(required): The unique identifier of the swap.
Response Example
Check Access Key Status
Method:
GETEndpoint:
/access_key/l1x_accessKeyStatusDescription: Checks whether an access key is active and valid.
Response Example
Request Access Key
Method:
POSTEndpoint:
/access_key/l1x_accessKeyRequestDescription: Requests a new access key for API usage.
Request Body:
Response Body:
Generate Swap Quote
Method:
POSTEndpoint:
/l1x_getQuoteDescription: Generates a quote for a swap based on provided parameters.
Request Body Parameters:
sourceChainId(required): The ID of the source blockchain.destinationChainId(required): The ID of the destination blockchain.sourceAmount(required): The amount to be swapped.affiliatePercentage(optional): Commission percentage for affiliates (set to 0 if not applicable).affiliateAddress(optional): Wallet address for affiliate commissions.
Response Example:
Create Swap
Method:
POSTEndpoint:
/l1x_createSwapDescription: Creates and executes a swap using the generated quote.
Request Body Parameters:
quoteId(required): The ID of the generated quote.sender(required): The wallet address of the sender.receiver(required): The wallet address of the receiver.sourceAssetSymbol(required): Token symbol on the source chain.destinationAssetSymbol(required): Token symbol on the destination chain.
Response Example:
Get Affiliate History
Method:
GETEndpoint:
/l1x_getAffiliateHistoryDescription: Retrieves the affiliate commission history.
Last updated