Soroswap icon

Soroswap

Interact with Soroswap DEX on Stellar network

Overview

This node integrates with the Soroswap decentralized exchange (DEX) on the Stellar network, enabling users to interact programmatically with various Soroswap features. It supports multiple operations such as fetching asset prices, obtaining trading quotes, managing liquidity pools, building and sending transactions, and retrieving user positions.

The Get Asset Prices operation specifically allows users to retrieve current price information for one or more specified assets on either the Mainnet or Testnet Stellar networks. This is useful for applications that require up-to-date pricing data for tokens traded on Soroswap, such as portfolio trackers, trading bots, or analytics dashboards.

Practical examples:

  • A DeFi dashboard fetching live token prices to display portfolio valuations.
  • An automated trading system querying asset prices before executing swaps.
  • A reporting tool aggregating price data for multiple assets across networks.

Properties

Name Meaning
Network The Stellar network to use for the operation. Options: Mainnet, Testnet.
Assets Comma-separated list of asset addresses for which to fetch current prices.

Output

The output JSON contains the price data returned by the Soroswap SDK's getPrice method. When a single asset address is provided, the output corresponds to the price information for that asset. When multiple assets are specified, the output includes price data for all requested assets.

The exact structure depends on the Soroswap API response but generally includes fields such as asset identifiers and their corresponding prices.

This node does not output binary data.

Dependencies

  • Requires an API key credential for Soroswap's API service.
  • Uses the Soroswap SDK (@soroswap/sdk) internally to perform API calls.
  • Needs proper configuration of the API key and base URL in the node credentials.
  • Supports both Mainnet and Testnet Stellar networks.

Troubleshooting

  • Common issues:

    • Invalid or missing API key credential will cause authentication failures.
    • Incorrect asset addresses format (e.g., malformed or empty strings) may result in errors or empty responses.
    • Network selection mismatch can lead to unexpected results if assets do not exist on the chosen network.
  • Error messages:

    • "Unknown operation: getPrice" — indicates the operation parameter was not set correctly; ensure "Get Asset Prices" is selected.
    • API errors related to invalid assets or network issues will be returned from the Soroswap API and surfaced in the node output.
  • Resolution tips:

    • Verify the API key credential is correctly configured and active.
    • Double-check asset addresses for correctness and ensure they exist on the selected network.
    • Use the "continue on fail" option to handle partial failures gracefully when processing multiple items.

Links and References

Discussion