MoreSwap API Documentation

Introduction

Authentication

To access the MoreSwap API you need to generate an API key. You can get one by emailing us at

[email protected]

Rate limits

Here are the rate limits for our API endpoints:
- 600 calls per minute
- 10 calls per second

Common

All requests must include the following headers:
  • x-api-key: string - You api key.
  • x-api-time: string - Current utc timestamp.

Methods

  • GET /api/v1/queryCurrencies

    Fetches a list of all supported currencies.

    Returns: CurrencyData[]

  • GET /api/v1/getCurrency

    Fetches detailed information for a specific currency by its symbol.

    Parameters:

    • symbol: string - The symbol of the currency.

    Returns: CurrencyData

  • GET /api/v1/queryPairs

    Fetches exchangeable pairs for a given currency and optional network.

    Parameters:

    • fromCurrency: string - The base currency for the pairs.

    Returns: CurrencyData[]

  • GET /api/v1/queryRange

    Fetches the exchange range for a currency pair.

    Parameters:

    • fromCurrency: string - The source currency.
    • toCurrency: string - The target currency.

    Returns: ExchangeRange

  • POST /api/v1/createExchange

    Creates an exchange transaction.

    Parameters:

    • fromCurrency: string - The source currency.
    • toCurrency: string - The target currency.
    • amount: string - The amount to exchange.
    • address: string - The recipient address.
    • extraId?: string - Optional extra identifier for the transaction.

    Returns: Result<StatusInfo>

  • GET /api/v1/queryStatus

    Fetches the status of a transaction.

    Parameters:

    • id: string - The transaction ID.

    Returns: StatusInfo

  • GET /api/v1/queryEstimatedAmount

    Fetches the estimated amount for a given exchange.

    Parameters:

    • amount: string - The amount to be exchanged.
    • fromCurrency: string - The source currency.
    • toCurrency: string - The target currency.

    Returns: EstimatedAmount

  • GET /api/v1/checkAddress

    Validates a given address for a specific network.

    • network: string - The network of the address.
    • address: string - The address to validate.

    Returns: boolean

Models

  • Result Interface

    FieldTypeDescription
    codenumberStatus code of the API response
    errorstring (optional)Error details if the request fails
    messagestring (optional)Human-readable message about the result
    dataT (generic)The actual data returned from the API
  • CurrencyData Interface

    FieldTypeDescription
    symbolstringTicker + network identifier
    namestringFull name of the cryptocurrency
    imagestringURL to the cryptocurrency image
    externalIdbooleanIndicates if there is an external ID
    networkstringBlockchain network
    tickerstringTicker symbol
  • ExchangeRange Interface

    FieldTypeDescription
    minAmountstringMinimum exchangeable amount
    maxAmountstring | undefinedMaximum exchangeable amount
  • EstimatedAmount Interface

    FieldTypeDescription
    amountstringEstimated amount received
    speedstring (optional)Transaction speed (e.g., fast, normal, slow)
    messagestring (optional)Additional information
  • StatusInfo interface

    FieldTypeDescription
    statusStatusThe current transaction status
    payinAddressstringBlockchain address to send funds
    payoutAddressstringBlockchain address to receive funds
    payinExtraIdstring (optional)Memo or payment ID for the pay-in
    payoutExtraIdstring (optional)Memo or payment ID for the pay-out
    fromCurrencystringTicker of the currency being sent
    toCurrencystringTicker of the currency being received
    fromNetworkstring (optional)Blockchain network of the sent currency
    toNetworkstring (optional)Blockchain network of the received currency
    idstringUnique transaction identifier
    expectedSendAmountstringAmount expected to be sent
    expectedReceiveAmountstringAmount expected to be received
    updatedAtstringTimestamp of the last update
    createdAtstringTimestamp when the transaction was created
    payinHashstring (optional)Blockchain transaction hash for the pay-in
    payoutHashstring (optional)Blockchain transaction hash for the pay-out
  • Status Enum

    StatusDescription
    newTransaction created but not yet initiated.
    waitingWaiting for the user to send cryptocurrency.
    confirmingBlockchain is confirming the pay-in transaction.
    exchangingCryptocurrency exchange is in progress.
    sendingFunds are being sent to the payout address.
    finishedTransaction completed successfully.
    failedTransaction failed due to an error.
    refundedTransaction was refunded to the user.
    verifyingTransaction details are being verified.