Constructors

Methods

  • Retrieves the conversion rate between two currencies.

    Parameters

    Returns Promise<{
        error: string;
        success: false;
    } | {
        conversionRate: number;
        success: true;
    }>

    A Promise resolving to an object containing the conversion rate on success, or an error message on failure.

  • Retrieves the status of an order based on the order ID.

    Parameters

    • orderId: string

      The unique identifier of the order.

    Returns Promise<{
        error: string;
        success: false;
    } | {
        status: OrderStatusResponse;
        success: true;
    }>

    A Promise resolving to either an object containing the order status response (OrderStatusResponse) on success, or an error message on failure.

  • Requests a quote for a specified transaction.

    Parameters

    Returns Promise<{
        error: string;
        success: false;
    } | {
        quote: {
            asset: string;
            baseAmount: number;
            bridgeFee: number;
            bridgeFeeUsdAfterPromo: number;
            bridgePromotionModifier: number;
            expiresAt: number;
            feeAmount: number;
            networkFeePromotionModifier: number;
            networkFeeUsd: number;
            networkFeeUsdAfterPromo: number;
            pricePerUnit: number;
            processingFeePromotionModifier: number;
            processingFeeUsd: number;
            processingFeeUsdAfterPromo: number;
            quoteId: string;
            receiveUnitCountAfterFees: number;
            receiveUsdAmountAfterFees: number;
            slippageFeePromotionModifier: number;
            slippageFeeUsd: number;
            slippageFeeUsdAfterPromo: number;
            smartContractFeePromotionModifier: number;
            smartContractFeeUsd: number;
            smartContractFeeUsdAfterPromo: number;
            totalFeeUsd: number;
            totalFeeUsdAfterPromo: number;
            transactionType: "buy" | "sell";
            unitCount: number;
        };
        success: true;
    }>

    A Promise resolving to either an object containing the response quote (ResponseQuote) on success, or an error message on failure.

  • Fetches a list of supported blockchain chains from the Kado API.

    Returns Promise<{
        error: string;
        success: false;
    } | {
        chains: KadoAPIChainResponse[];
        success: true;
    }>

    A Promise resolving to either an object containing a list of chain responses (KadoAPIChainResponse[]) on success, or an error message on failure.

  • Fetches a list of supported currencies from the Kado API.

    Returns Promise<{
        error: string;
        success: false;
    } | {
        currencies: Currency[];
        success: true;
    }>

    A Promise resolving to either an object containing a list of currencies (Currency[]) on success, or an error message on failure.