Function QuoteApiAxiosParamCreator

  • QuoteApi - axios parameter creator

    Parameters

    Returns {
        quoteloanclose: ((height?, fromAsset?, repayBps?, toAsset?, loanOwner?, minOut?, options?) => Promise<RequestArgs>);
        quoteloanopen: ((height?, fromAsset?, amount?, toAsset?, destination?, minOut?, affiliateBps?, affiliate?, options?) => Promise<RequestArgs>);
        quotesaverdeposit: ((height?, asset?, amount?, options?) => Promise<RequestArgs>);
        quotesaverwithdraw: ((height?, asset?, address?, withdrawBps?, options?) => Promise<RequestArgs>);
        quoteswap: ((height?, fromAsset?, toAsset?, amount?, destination?, refundAddress?, streamingInterval?, streamingQuantity?, toleranceBps?, affiliateBps?, affiliate?, options?) => Promise<RequestArgs>);
    }

    • quoteloanclose: ((height?, fromAsset?, repayBps?, toAsset?, loanOwner?, minOut?, options?) => Promise<RequestArgs>)

      Provide a quote estimate for the provided loan close.

      Throws

        • (height?, fromAsset?, repayBps?, toAsset?, loanOwner?, minOut?, options?): Promise<RequestArgs>
        • Parameters

          • Optional height: number

            optional block height, defaults to current tip

          • Optional fromAsset: string

            the asset used to repay the loan

          • Optional repayBps: number

            the basis points of the existing position to repay

          • Optional toAsset: string

            the collateral asset of the loan

          • Optional loanOwner: string

            the owner of the loan collateral

          • Optional minOut: string

            the minimum amount of the target asset to accept

          • Optional options: AxiosRequestConfig<any> = {}

            Override http request option.

          Returns Promise<RequestArgs>

    • quoteloanopen: ((height?, fromAsset?, amount?, toAsset?, destination?, minOut?, affiliateBps?, affiliate?, options?) => Promise<RequestArgs>)

      Provide a quote estimate for the provided loan open.

      Throws

        • (height?, fromAsset?, amount?, toAsset?, destination?, minOut?, affiliateBps?, affiliate?, options?): Promise<RequestArgs>
        • Parameters

          • Optional height: number

            optional block height, defaults to current tip

          • Optional fromAsset: string

            the collateral asset

          • Optional amount: number

            the collateral asset amount in 1e8 decimals

          • Optional toAsset: string

            the target asset to receive (loan denominated in TOR regardless)

          • Optional destination: string

            the destination address, required to generate memo

          • Optional minOut: string

            the minimum amount of the target asset to accept

          • Optional affiliateBps: number

            the affiliate fee in basis points

          • Optional affiliate: string

            the affiliate (address or thorname)

          • Optional options: AxiosRequestConfig<any> = {}

            Override http request option.

          Returns Promise<RequestArgs>

    • quotesaverdeposit: ((height?, asset?, amount?, options?) => Promise<RequestArgs>)

      Provide a quote estimate for the provided saver deposit.

      Throws

        • (height?, asset?, amount?, options?): Promise<RequestArgs>
        • Parameters

          • Optional height: number

            optional block height, defaults to current tip

          • Optional asset: string

            the asset to deposit

          • Optional amount: number

            the source asset amount in 1e8 decimals

          • Optional options: AxiosRequestConfig<any> = {}

            Override http request option.

          Returns Promise<RequestArgs>

    • quotesaverwithdraw: ((height?, asset?, address?, withdrawBps?, options?) => Promise<RequestArgs>)

      Provide a quote estimate for the provided saver withdraw.

      Throws

        • (height?, asset?, address?, withdrawBps?, options?): Promise<RequestArgs>
        • Parameters

          • Optional height: number

            optional block height, defaults to current tip

          • Optional asset: string

            the asset to withdraw

          • Optional address: string

            the address for the position

          • Optional withdrawBps: number

            the basis points of the existing position to withdraw

          • Optional options: AxiosRequestConfig<any> = {}

            Override http request option.

          Returns Promise<RequestArgs>

    • quoteswap: ((height?, fromAsset?, toAsset?, amount?, destination?, refundAddress?, streamingInterval?, streamingQuantity?, toleranceBps?, affiliateBps?, affiliate?, options?) => Promise<RequestArgs>)

      Provide a quote estimate for the provided swap.

      Throws

        • (height?, fromAsset?, toAsset?, amount?, destination?, refundAddress?, streamingInterval?, streamingQuantity?, toleranceBps?, affiliateBps?, affiliate?, options?): Promise<RequestArgs>
        • Parameters

          • Optional height: number

            optional block height, defaults to current tip

          • Optional fromAsset: string

            the source asset

          • Optional toAsset: string

            the target asset

          • Optional amount: number

            the source asset amount in 1e8 decimals

          • Optional destination: string

            the destination address, required to generate memo

          • Optional refundAddress: string

            the refund address, refunds will be sent here if the swap fails

          • Optional streamingInterval: number

            the interval in which streaming swaps are swapped

          • Optional streamingQuantity: number

            the quantity of swaps within a streaming swap

          • Optional toleranceBps: number

            the maximum basis points from the current feeless swap price to set the limit in the generated memo

          • Optional affiliateBps: number

            the affiliate fee in basis points

          • Optional affiliate: string

            the affiliate (address or thorname)

          • Optional options: AxiosRequestConfig<any> = {}

            Override http request option.

          Returns Promise<RequestArgs>

    Export

Generated using TypeDoc