Soroswap icon

Soroswap

Interact with Soroswap DEX on Stellar network

Overview

This node integrates with Soroswap, a decentralized exchange (DEX) on the Stellar network. It allows users to interact with various Soroswap functionalities such as retrieving available trading protocols, getting trading quotes, managing liquidity pools, and sending transactions.

The Get Protocols operation specifically fetches the list of available trading protocols supported by Soroswap on the selected Stellar network (Mainnet or Testnet). This is useful for users who want to discover which protocols they can trade on or use for liquidity operations.

Practical examples:

  • A trader wants to see all protocols available before deciding where to swap tokens.
  • A developer building a DeFi dashboard needs to display supported protocols dynamically.
  • An automated workflow that adjusts strategies based on available protocols on different networks.

Properties

Name Meaning
Network The Stellar network to use for the operation. Options: Mainnet, Testnet.

Output

The output JSON contains an array of protocol objects representing the available trading protocols on the selected network. Each protocol object typically includes metadata such as protocol name, identifier, and possibly other descriptive details provided by the Soroswap SDK.

Example output structure:

[
  {
    "id": "soroswap",
    "name": "Soroswap",
    "description": "Primary Soroswap protocol"
  },
  {
    "id": "phoenix",
    "name": "Phoenix",
    "description": "Phoenix protocol on Stellar"
  }
]

No binary data is produced by this operation.

Dependencies

  • Requires an API key credential for Soroswap's service.
  • Uses the Soroswap SDK (@soroswap/sdk) to communicate with the Soroswap API.
  • Needs network selection between Mainnet and Testnet.
  • The node expects proper configuration of the Soroswap API base URL and API key in credentials.

Troubleshooting

  • Common issues:

    • Invalid or missing API key credential will cause authentication failures.
    • Selecting the wrong network may result in empty or unexpected protocol lists.
    • Network connectivity issues to Soroswap API endpoints.
  • Error messages:

    • "Unknown operation: getProtocols" — indicates the operation parameter was not set correctly; ensure it is exactly "getProtocols".
    • API errors returned from Soroswap (e.g., unauthorized, timeout) will be surfaced in the node’s error output if "Continue On Fail" is enabled.
  • Resolutions:

    • Verify API key credential is correctly configured and active.
    • Confirm network choice matches intended environment.
    • Check internet connectivity and Soroswap API status.

Links and References

Discussion